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
d6a8e08a
Commit
d6a8e08a
authored
Oct 21, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: fix variable expand in CMake conditions
parent
d8ffddd0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
16 deletions
+20
-16
CMakeLists.txt
CMakeLists.txt
+4
-0
OpenCVCompilerOptimizations.cmake
cmake/OpenCVCompilerOptimizations.cmake
+3
-3
OpenCVDetectCUDA.cmake
cmake/OpenCVDetectCUDA.cmake
+2
-2
OpenCVDetectVTK.cmake
cmake/OpenCVDetectVTK.cmake
+4
-4
OpenCVFindIPP.cmake
cmake/OpenCVFindIPP.cmake
+2
-2
OpenCVFindMKL.cmake
cmake/OpenCVFindMKL.cmake
+1
-1
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+2
-2
OpenCVPackaging.cmake
cmake/OpenCVPackaging.cmake
+1
-1
OpenCVConfig-CUDA.cmake.in
cmake/templates/OpenCVConfig-CUDA.cmake.in
+1
-1
No files found.
CMakeLists.txt
View file @
d6a8e08a
...
...
@@ -96,6 +96,10 @@ if(POLICY CMP0051)
cmake_policy
(
SET CMP0051 NEW
)
endif
()
if
(
POLICY CMP0054
)
# CMake 3.1: Only interpret if() arguments as variables or keywords when unquoted.
cmake_policy
(
SET CMP0054 NEW
)
endif
()
if
(
POLICY CMP0056
)
cmake_policy
(
SET CMP0056 NEW
)
endif
()
...
...
cmake/OpenCVCompilerOptimizations.cmake
View file @
d6a8e08a
...
...
@@ -50,13 +50,13 @@ endforeach()
# process legacy flags
macro
(
ocv_optimization_process_obsolete_option legacy_flag OPT legacy_warn
)
if
(
DEFINED
${
legacy_flag
}
)
if
(
${
legacy_warn
}
)
if
(
DEFINED
"
${
legacy_flag
}
"
)
if
(
"
${
legacy_warn
}
"
)
message
(
STATUS
"WARNING: Option
${
legacy_flag
}
='
${${
legacy_flag
}}
' is deprecated and should not be used anymore"
)
message
(
STATUS
" Behaviour of this option is not backward compatible"
)
message
(
STATUS
" Refer to 'CPU_BASELINE'/'CPU_DISPATCH' CMake options documentation"
)
endif
()
if
(
${
legacy_flag
}
)
if
(
"
${
legacy_flag
}
"
)
if
(
NOT
";
${
CPU_BASELINE_REQUIRE
}
;"
MATCHES
";
${
OPT
}
;"
)
set
(
CPU_BASELINE_REQUIRE
"
${
CPU_BASELINE_REQUIRE
}
;
${
OPT
}
"
CACHE STRING
"
${
HELP_CPU_BASELINE_REQUIRE
}
"
FORCE
)
endif
()
...
...
cmake/OpenCVDetectCUDA.cmake
View file @
d6a8e08a
...
...
@@ -114,9 +114,9 @@ if(CUDA_FOUND)
endif
()
set
(
__cuda_arch_ptx
""
)
else
()
if
(
${
CUDA_VERSION
}
VERSION_LESS
"9.0"
)
if
(
CUDA_VERSION
VERSION_LESS
"9.0"
)
set
(
__cuda_arch_bin
"2.0 3.0 3.5 3.7 5.0 5.2 6.0 6.1"
)
elseif
(
${
CUDA_VERSION
}
VERSION_LESS
"10.0"
)
elseif
(
CUDA_VERSION
VERSION_LESS
"10.0"
)
set
(
__cuda_arch_bin
"3.0 3.5 3.7 5.0 5.2 6.0 6.1 7.0"
)
else
()
set
(
__cuda_arch_bin
"3.0 3.5 3.7 5.0 5.2 6.0 6.1 7.0 7.5"
)
...
...
cmake/OpenCVDetectVTK.cmake
View file @
d6a8e08a
...
...
@@ -20,27 +20,27 @@ if(NOT VTK_FOUND)
endif
()
# Don't support earlier VTKs
if
(
${
VTK_VERSION
}
VERSION_LESS
"5.8.0"
)
if
(
VTK_VERSION
VERSION_LESS
"5.8.0"
)
message
(
STATUS
"VTK support is disabled. VTK ver. 5.8.0 is minimum required, but found VTK ver.
${
VTK_VERSION
}
"
)
return
()
endif
()
# Different Qt versions can't be linked together
if
(
HAVE_QT5 AND
${
VTK_VERSION
}
VERSION_LESS
"6.0.0"
)
if
(
HAVE_QT5 AND
VTK_VERSION
VERSION_LESS
"6.0.0"
)
if
(
VTK_USE_QT
)
message
(
STATUS
"VTK support is disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.
${
VTK_VERSION
}
+ Qt4"
)
endif
()
endif
()
# Different Qt versions can't be linked together. VTK 6.0.0 doesn't provide a way to get Qt version it was linked with
if
(
HAVE_QT5 AND
${
VTK_VERSION
}
VERSION_EQUAL
"6.0.0"
AND NOT DEFINED FORCE_VTK
)
if
(
HAVE_QT5 AND
VTK_VERSION
VERSION_EQUAL
"6.0.0"
AND NOT DEFINED FORCE_VTK
)
message
(
STATUS
"VTK support is disabled. Possible incompatible combination: OpenCV+Qt5, and VTK ver.
${
VTK_VERSION
}
with Qt4"
)
message
(
STATUS
"If it is known that VTK was compiled without Qt4, please define '-DFORCE_VTK=TRUE' flag in CMake"
)
return
()
endif
()
# Different Qt versions can't be linked together
if
(
HAVE_QT AND
${
VTK_VERSION
}
VERSION_GREATER
"6.0.0"
AND NOT
${
VTK_QT_VERSION
}
STREQUAL
""
)
if
(
HAVE_QT AND
VTK_VERSION
VERSION_GREATER
"6.0.0"
AND NOT
${
VTK_QT_VERSION
}
STREQUAL
""
)
if
(
HAVE_QT5 AND
${
VTK_QT_VERSION
}
EQUAL
"4"
)
message
(
STATUS
"VTK support is disabled. Incompatible combination: OpenCV + Qt5 and VTK ver.
${
VTK_VERSION
}
+ Qt4"
)
return
()
...
...
cmake/OpenCVFindIPP.cmake
View file @
d6a8e08a
...
...
@@ -105,7 +105,7 @@ macro(ipp_detect_version)
message
(
STATUS
"found Intel IPP
${
__msg
}
:
${
_MAJOR
}
.
${
_MINOR
}
.
${
_BUILD
}
[
${
IPP_VERSION_STR
}
]"
)
message
(
STATUS
"at:
${
IPP_ROOT_DIR
}
"
)
if
(
${
IPP_VERSION_STR
}
VERSION_LESS
"7.0"
)
if
(
IPP_VERSION_STR
VERSION_LESS
"7.0"
)
_ipp_not_supported
(
"Intel IPP
${
IPP_VERSION_STR
}
is not supported"
)
endif
()
...
...
@@ -166,7 +166,7 @@ macro(ipp_detect_version)
endmacro
()
set
(
IPP_PREFIX
"ipp"
)
if
(
${
IPP_VERSION_STR
}
VERSION_LESS
"8.0"
)
if
(
IPP_VERSION_STR
VERSION_LESS
"8.0"
)
if
(
BUILD_WITH_DYNAMIC_IPP AND NOT HAVE_IPP_ICV
)
set
(
IPP_SUFFIX
""
)
# dynamic not threaded libs suffix Intel IPP 7.x
else
()
...
...
cmake/OpenCVFindMKL.cmake
View file @
d6a8e08a
...
...
@@ -94,7 +94,7 @@ else()
set
(
MKL_ARCH_SUFFIX
"c"
)
endif
()
if
(
${
MKL_VERSION_STR
}
VERSION_GREATER
"11.3.0"
OR
${
MKL_VERSION_STR
}
VERSION_EQUAL
"11.3.0"
)
if
(
MKL_VERSION_STR VERSION_GREATER
"11.3.0"
OR MKL_VERSION_STR
VERSION_EQUAL
"11.3.0"
)
set
(
mkl_lib_find_paths
${
MKL_ROOT_DIR
}
/lib
${
MKL_ROOT_DIR
}
/lib/
${
MKL_ARCH
}
${
MKL_ROOT_DIR
}
/../tbb/lib/
${
MKL_ARCH
}
)
...
...
cmake/OpenCVModule.cmake
View file @
d6a8e08a
...
...
@@ -615,7 +615,7 @@ function(__ocv_resolve_dependencies)
list
(
APPEND LINK_DEPS opencv_world
)
endif
()
endif
()
if
(
${
m
}
STREQUAL opencv_world
)
if
(
"
${
m
}
"
STREQUAL opencv_world
)
list
(
APPEND OPENCV_MODULE_opencv_world_DEPS_EXT
${
OPENCV_MODULE_
${
m2
}
_DEPS_EXT
}
)
endif
()
endif
()
...
...
@@ -842,7 +842,7 @@ macro(ocv_create_module)
if
(
NOT
"
${
ARGN
}
"
STREQUAL
" "
)
set
(
OPENCV_MODULE_
${
the_module
}
_LINK_DEPS
"
${
OPENCV_MODULE_
${
the_module
}
_LINK_DEPS
}
;
${
ARGN
}
"
CACHE INTERNAL
""
)
endif
()
if
(
${
BUILD_opencv_world
}
AND OPENCV_MODULE_
${
the_module
}
_IS_PART_OF_WORLD
)
if
(
BUILD_opencv_world
AND OPENCV_MODULE_
${
the_module
}
_IS_PART_OF_WORLD
)
# nothing
set
(
the_module_target opencv_world
)
else
()
...
...
cmake/OpenCVPackaging.cmake
View file @
d6a8e08a
...
...
@@ -89,7 +89,7 @@ set(CPACK_COMPONENT_TESTS_DEPENDS libs)
if
(
HAVE_CUDA
)
string
(
REPLACE
"."
"-"
cuda_version_suffix
${
CUDA_VERSION
}
)
if
(
${
CUDA_VERSION
}
VERSION_LESS
"6.5"
)
if
(
CUDA_VERSION
VERSION_LESS
"6.5"
)
set
(
CPACK_DEB_libs_PACKAGE_DEPENDS
"cuda-core-libs-
${
cuda_version_suffix
}
, cuda-extra-libs-
${
cuda_version_suffix
}
"
)
set
(
CPACK_DEB_dev_PACKAGE_DEPENDS
"cuda-headers-
${
cuda_version_suffix
}
"
)
else
()
...
...
cmake/templates/OpenCVConfig-CUDA.cmake.in
View file @
d6a8e08a
...
...
@@ -16,7 +16,7 @@ endif()
set(OpenCV_CUDA_LIBS_ABSPATH ${CUDA_LIBRARIES})
if(
${CUDA_VERSION}
VERSION_LESS "5.5")
if(
CUDA_VERSION
VERSION_LESS "5.5")
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_npp_LIBRARY})
else()
find_cuda_helper_libs(nppc)
...
...
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