Commit 28ae243c authored by Brad King's avatar Brad King
Browse files

Tests: Run FindGTK2 tests only when explicitly enabled

Do not `find_package(GTK2)` by default, as it gives the impression that
CMake depends on it to build.  We will set `CMake_TEST_FindGTK2` in the
cache of automated builds where GTK2 is expected to work.
parent 32a569e8
...@@ -1454,6 +1454,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ...@@ -1454,6 +1454,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
add_subdirectory(GoogleTest) add_subdirectory(GoogleTest)
endif() endif()
if(CMake_TEST_FindGTK2)
add_subdirectory(FindGTK2)
endif()
if(CMake_TEST_FindIconv) if(CMake_TEST_FindIconv)
add_subdirectory(FindIconv) add_subdirectory(FindIconv)
endif() endif()
...@@ -1597,11 +1601,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ...@@ -1597,11 +1601,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
ADD_TEST_MACRO(FindMatlab.r2018a_check ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>) ADD_TEST_MACRO(FindMatlab.r2018a_check ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>)
endif() endif()
find_package(GTK2 QUIET)
if(GTK2_FOUND)
add_subdirectory(FindGTK2)
endif()
add_test(ExternalProject ${CMAKE_CTEST_COMMAND} add_test(ExternalProject ${CMAKE_CTEST_COMMAND}
--build-and-test --build-and-test
"${CMake_SOURCE_DIR}/Tests/ExternalProject" "${CMake_SOURCE_DIR}/Tests/ExternalProject"
......
...@@ -339,8 +339,7 @@ if(PKG_CONFIG_FOUND) ...@@ -339,8 +339,7 @@ if(PKG_CONFIG_FOUND)
add_RunCMake_test(FindPkgConfig) add_RunCMake_test(FindPkgConfig)
endif() endif()
find_package(GTK2 QUIET) if(CMake_TEST_FindGTK2)
if (GTK2_FOUND)
add_RunCMake_test(FindGTK2) add_RunCMake_test(FindGTK2)
endif() endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment