Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
d32d3157
Commit
d32d3157
authored
Nov 10, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15835 from alalek:cmake_cpu_optimizations_fix_15802
parents
e9dcecf9
21c38bbd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
OpenCVCompilerOptimizations.cmake
cmake/OpenCVCompilerOptimizations.cmake
+4
-1
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+0
-1
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+13
-0
No files found.
cmake/OpenCVCompilerOptimizations.cmake
View file @
d32d3157
...
@@ -714,7 +714,10 @@ macro(ocv_compiler_optimization_process_sources SOURCES_VAR_NAME LIBS_VAR_NAME T
...
@@ -714,7 +714,10 @@ macro(ocv_compiler_optimization_process_sources SOURCES_VAR_NAME LIBS_VAR_NAME T
foreach
(
OPT
${
CPU_DISPATCH_FINAL
}
)
foreach
(
OPT
${
CPU_DISPATCH_FINAL
}
)
if
(
__result_
${
OPT
}
)
if
(
__result_
${
OPT
}
)
#message("${OPT}: ${__result_${OPT}}")
#message("${OPT}: ${__result_${OPT}}")
if
(
CMAKE_GENERATOR MATCHES
"^Visual"
)
if
(
CMAKE_GENERATOR MATCHES
"^Visual"
OR OPENCV_CMAKE_CPU_OPTIMIZATIONS_FORCE_TARGETS
)
# MSVS generator is not able to properly order compilation flags:
# extra flags are added before common flags, so switching between optimizations doesn't work correctly
# extra flags are added before common flags, so switching between optimizations doesn't work correctly
# Also CMAKE_CXX_FLAGS doesn't work (it is directory-based, so add_subdirectory is required)
# Also CMAKE_CXX_FLAGS doesn't work (it is directory-based, so add_subdirectory is required)
add_library
(
${
TARGET_BASE_NAME
}
_
${
OPT
}
OBJECT
${
__result_
${
OPT
}}
)
add_library
(
${
TARGET_BASE_NAME
}
_
${
OPT
}
OBJECT
${
__result_
${
OPT
}}
)
...
...
cmake/OpenCVModule.cmake
View file @
d32d3157
...
@@ -63,7 +63,6 @@ foreach(mod ${OPENCV_MODULES_BUILD} ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MOD
...
@@ -63,7 +63,6 @@ foreach(mod ${OPENCV_MODULES_BUILD} ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MOD
unset
(
OPENCV_MODULE_
${
mod
}
_PRIVATE_OPT_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_PRIVATE_OPT_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_LINK_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_LINK_DEPS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_WRAPPERS CACHE
)
unset
(
OPENCV_MODULE_
${
mod
}
_WRAPPERS CACHE
)
unset
(
OPENCV_DEPENDANT_TARGETS_
${
mod
}
CACHE
)
endforeach
()
endforeach
()
# clean modules info which needs to be recalculated
# clean modules info which needs to be recalculated
...
...
cmake/OpenCVUtils.cmake
View file @
d32d3157
...
@@ -288,9 +288,22 @@ function(ocv_append_target_property target prop)
...
@@ -288,9 +288,22 @@ function(ocv_append_target_property target prop)
endif
()
endif
()
endfunction
()
endfunction
()
if
(
DEFINED OPENCV_DEPENDANT_TARGETS_LIST
)
foreach
(
v
${
OPENCV_DEPENDANT_TARGETS_LIST
}
)
unset
(
${
v
}
CACHE
)
endforeach
()
unset
(
OPENCV_DEPENDANT_TARGETS_LIST CACHE
)
endif
()
function
(
ocv_append_dependant_targets target
)
function
(
ocv_append_dependant_targets target
)
#ocv_debug_message("ocv_append_dependant_targets(${target} ${ARGN})")
#ocv_debug_message("ocv_append_dependant_targets(${target} ${ARGN})")
_ocv_fix_target
(
target
)
_ocv_fix_target
(
target
)
list
(
FIND OPENCV_DEPENDANT_TARGETS_LIST
"OPENCV_DEPENDANT_TARGETS_
${
target
}
"
__id
)
if
(
__id EQUAL -1
)
list
(
APPEND OPENCV_DEPENDANT_TARGETS_LIST
"OPENCV_DEPENDANT_TARGETS_
${
target
}
"
)
list
(
SORT OPENCV_DEPENDANT_TARGETS_LIST
)
set
(
OPENCV_DEPENDANT_TARGETS_LIST
"
${
OPENCV_DEPENDANT_TARGETS_LIST
}
"
CACHE INTERNAL
""
)
endif
()
set
(
OPENCV_DEPENDANT_TARGETS_
${
target
}
"
${
OPENCV_DEPENDANT_TARGETS_
${
target
}}
;
${
ARGN
}
"
CACHE INTERNAL
""
FORCE
)
set
(
OPENCV_DEPENDANT_TARGETS_
${
target
}
"
${
OPENCV_DEPENDANT_TARGETS_
${
target
}}
;
${
ARGN
}
"
CACHE INTERNAL
""
FORCE
)
endfunction
()
endfunction
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment