mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 23:59:53 -05:00
Tests: Optionally skip local packages versions in CMakeOnly.AllFindModules
Some machines have incomplete or otherwise broken installations of specific packages. Allow local configuration to prevent the test from failing on such packages if the version number cannot be extracted.
This commit is contained in:
@@ -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]")
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user