diff options
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 4945b31..60a2cbb 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -46,7 +46,7 @@ if(BUILD_TESTING) set(CMake_TEST_DEVENV "") if(CMAKE_VS_DEVENV_COMMAND) set(CMake_TEST_DEVENV "${CMAKE_VS_DEVENV_COMMAND}") - elseif(CMAKE_GENERATOR MATCHES "Visual Studio [7-9] " AND + elseif(CMAKE_GENERATOR MATCHES "Visual Studio [89] " AND NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]") set(CMake_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}") endif() @@ -325,7 +325,7 @@ if(BUILD_TESTING) endif() endif() - if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^789]|[789][0-9])") + if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])") ADD_TEST_MACRO(CSharpOnly CSharpOnly) endif() @@ -477,6 +477,17 @@ if(BUILD_TESTING) ADD_TEST_MACRO(Module.CheckTypeSize CheckTypeSize) + set(Module.CheckIPOSupported-C_BUILD_OPTIONS -DCMake_TEST_IPO_WORKS_C=${CMake_TEST_IPO_WORKS_C}) + ADD_TEST_MACRO(Module.CheckIPOSupported-C CheckIPOSupported-C) + + set(Module.CheckIPOSupported-CXX_BUILD_OPTIONS -DCMake_TEST_IPO_WORKS_CXX=${CMake_TEST_IPO_WORKS_CXX}) + ADD_TEST_MACRO(Module.CheckIPOSupported-CXX CheckIPOSupported-CXX) + + if(CMAKE_Fortran_COMPILER) + set(Module.CheckIPOSupported-Fortran_BUILD_OPTIONS -DCMake_TEST_IPO_WORKS_Fortran=${CMake_TEST_IPO_WORKS_Fortran}) + ADD_TEST_MACRO(Module.CheckIPOSupported-Fortran CheckIPOSupported-Fortran) + endif() + add_test(Module.ExternalData ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/Module/ExternalData" @@ -615,8 +626,8 @@ if(BUILD_TESTING) endif() # test for correct sub-project generation - # not implemented in VS 7.0, Xcode, or Ninja - if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 7$|Xcode|Ninja") + # not implemented in Xcode or Ninja + if(NOT CMAKE_GENERATOR MATCHES "Xcode|Ninja") # run cmake and configure all of SubProject # but only build the independent executable car add_test(SubProject ${CMAKE_CTEST_COMMAND} @@ -1158,6 +1169,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CMakeTestAllGenerators") + # This test runs a lot of processes. Do not make them compete + # for resources with other tests. + set_property(TEST CMakeTestAllGenerators PROPERTY RUN_SERIAL 1) endif() if(NOT DEFINED CTEST_RUN_CMakeTestMultipleConfigures) @@ -1411,6 +1425,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(FindOpenSSL) endif() + if(CMake_TEST_FindMPI) + add_subdirectory(FindMPI) + endif() + if(CMake_TEST_FindPNG) add_subdirectory(FindPNG) endif() @@ -1924,7 +1942,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() if(MSVC AND NOT MSVC_VERSION LESS 1310 - AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7( |$)" AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio [89]( |$)" OR CMAKE_SIZEOF_VOID_P EQUAL 4) ) @@ -1936,7 +1953,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ADD_TEST_MACRO(SBCS SBCS) endif() - if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio [789]( |$)" + if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio [89]( |$)" AND NOT CMAKE_GENERATOR_TOOLSET) ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx) endif() @@ -2043,7 +2060,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set(reg_wp81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.1;InstallationFolder]") select_wince_sdk(reg_wince wince_sdk) set(reg_tegra "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Nsight Tegra;sdkRoot]") - foreach(reg vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra) + set(reg_nasm "[HKEY_CURRENT_USER\\SOFTWARE\\nasm]") + foreach(reg vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra nasm) get_filename_component(r "${reg_${reg}}" ABSOLUTE) if(IS_DIRECTORY "${r}") set(${reg} 1) @@ -2134,6 +2152,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif() endif() + if(CMAKE_GENERATOR MATCHES "Visual Studio ([^89]|[89][0-9])" AND nasm) + ADD_TEST_MACRO(VSNASM VSNASM) + endif() + if (CMake_TEST_GreenHillsMULTI) macro(add_test_GhsMulti name primaryTarget bspName) add_test(NAME GhsMulti.${name} COMMAND ${CMAKE_CTEST_COMMAND} |