diff options
author | Brad King <brad.king@kitware.com> | 2017-04-04 13:07:18 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-04-04 13:07:44 (GMT) |
commit | bc04c6ba1e1442a973d652df94a2548005c97b24 (patch) | |
tree | 992da3f9640058495f1ee7d7075211ed3a5309f2 | |
parent | 0f51d44aea0e469543b4c19fd1a04f8c3b817b63 (diff) | |
parent | fe21ccc4860d38bdb80f4dc8a0785661484e7024 (diff) | |
download | CMake-bc04c6ba1e1442a973d652df94a2548005c97b24.zip CMake-bc04c6ba1e1442a973d652df94a2548005c97b24.tar.gz CMake-bc04c6ba1e1442a973d652df94a2548005c97b24.tar.bz2 |
Merge topic 'test-CMakeOnly.AllFindModules-local-exclude'
fe21ccc4 Tests: Optionally skip local packages versions in CMakeOnly.AllFindModules
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !661
-rw-r--r-- | Tests/CMakeOnly/AllFindModules/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/CMakeOnly/CMakeLists.txt | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt index 8f842d6..7eb679c 100644 --- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt @@ -56,7 +56,10 @@ if (NOT QT4_FOUND) endif () macro(check_version_string MODULE_NAME VERSION_VAR) - if (${MODULE_NAME}_FOUND) + string(FIND " ${CMake_TEST_CMakeOnly.AllFindModules_NO_VERSION} " " ${MODULE_NAME} " _exclude_pos) + if (NOT _exclude_pos EQUAL -1) + message(STATUS "excluding check of ${VERSION_VAR}='${${VERSION_VAR}}' due to local configuration") + elseif (${MODULE_NAME}_FOUND) if (DEFINED ${VERSION_VAR}) message(STATUS "${VERSION_VAR}='${${VERSION_VAR}}'") if (NOT ${VERSION_VAR} MATCHES "^[0-9]") diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt index d44c836..2b25766 100644 --- a/Tests/CMakeOnly/CMakeLists.txt +++ b/Tests/CMakeOnly/CMakeLists.txt @@ -37,7 +37,11 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio ([^789]|[789][0-9])") add_CMakeOnly_test(CompilerIdCSharp) endif() -add_CMakeOnly_test(AllFindModules) +add_test(CMakeOnly.AllFindModules ${CMAKE_CMAKE_COMMAND} + -DTEST=AllFindModules + -DCMAKE_ARGS=-DCMake_TEST_CMakeOnly.AllFindModules_NO_VERSION=${CMake_TEST_CMakeOnly.AllFindModules_NO_VERSION} + -P ${CMAKE_CURRENT_BINARY_DIR}/Test.cmake + ) add_CMakeOnly_test(SelectLibraryConfigurations) |