summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r--Tests/RunCMake/CMakeLists.txt80
1 files changed, 72 insertions, 8 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 0b2ef6a..5d00554 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -81,7 +81,9 @@ endif()
# Test MSVC for older host CMake versions, and test
# WIN32/CMAKE_C_COMPILER_ID to fix check on Intel for Windows.
if(MSVC OR (WIN32 AND CMAKE_C_COMPILER_ID MATCHES "MSVC|Intel"))
- set(GeneratorExpression_ARGS -DLINKER_SUPPORTS_PDB=1)
+ set(LINKER_SUPPORTS_PDB 1)
+else()
+ set(LINKER_SUPPORTS_PDB 0)
endif()
add_RunCMake_test(CMP0019)
@@ -116,6 +118,12 @@ endif()
add_RunCMake_test(CMP0069)
add_RunCMake_test(CMP0081)
add_RunCMake_test(CMP0102)
+if(CMake_TEST_CUDA)
+ add_RunCMake_test(CMP0104)
+ set_property(TEST RunCMake.CMP0104 APPEND
+ PROPERTY LABELS "CUDA")
+endif()
+add_RunCMake_test(CMP0106)
# The test for Policy 65 requires the use of the
# CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode
@@ -148,6 +156,8 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
list(APPEND NinjaMultiConfig_ARGS -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
endif()
add_RunCMake_test(NinjaMultiConfig)
+ set_property(TEST RunCMake.NinjaMultiConfig APPEND
+ PROPERTY LABELS "CUDA")
endif()
add_RunCMake_test(CTest)
@@ -172,7 +182,20 @@ if(CMake_TEST_Qt5 AND Qt5Widgets_FOUND)
set(autogen_with_qt5 TRUE)
endif ()
add_RunCMake_test(Autogen -Dwith_qt5=${autogen_with_qt5})
-add_RunCMake_test(BuildDepends)
+if(NOT DEFINED CMake_TEST_BuildDepends_GNU_AS
+ AND CMAKE_C_COMPILER_ID STREQUAL "GNU"
+ AND CMAKE_GENERATOR MATCHES "^Ninja"
+ )
+ execute_process(COMMAND "${CMAKE_C_COMPILER}" -print-prog-name=as
+ RESULT_VARIABLE _gnu_res
+ OUTPUT_VARIABLE _gnu_as OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+ if(_gnu_res EQUAL 0 AND _gnu_as)
+ set(CMake_TEST_BuildDepends_GNU_AS "${_gnu_as}")
+ endif()
+endif()
+add_RunCMake_test(BuildDepends
+ -DCMake_TEST_BuildDepends_GNU_AS=${CMake_TEST_BuildDepends_GNU_AS}
+ )
if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
add_RunCMake_test(Byproducts)
endif()
@@ -183,19 +206,32 @@ endif()
add_RunCMake_test(CompilerNotFound)
add_RunCMake_test(Configure -DMSVC_IDE=${MSVC_IDE})
add_RunCMake_test(DisallowedCommands)
+if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles|Ninja")
+ add_RunCMake_test(ExportCompileCommands)
+endif()
add_RunCMake_test(ExternalData)
add_RunCMake_test(FeatureSummary)
add_RunCMake_test(FPHSA)
-add_RunCMake_test(FileAPI -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE})
+add_RunCMake_test(FileAPI -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
+ -DCMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID})
add_RunCMake_test(FindBoost)
add_RunCMake_test(FindLua)
add_RunCMake_test(FindOpenGL)
if(CMake_TEST_UseSWIG)
+ add_RunCMake_test(FindSWIG)
add_RunCMake_test(UseSWIG -DCMake_TEST_FindPython=${CMake_TEST_FindPython})
endif()
if(NOT CMAKE_C_COMPILER_ID MATCHES "Watcom")
add_RunCMake_test(GenerateExportHeader)
endif()
+add_RunCMake_test(GenEx-COMPILE_LANGUAGE)
+add_RunCMake_test(GenEx-COMPILE_LANG_AND_ID)
+add_RunCMake_test(GenEx-LINK_LANGUAGE)
+add_RunCMake_test(GenEx-LINK_LANG_AND_ID)
+add_RunCMake_test(GenEx-HOST_LINK)
+add_RunCMake_test(GenEx-DEVICE_LINK)
+add_RunCMake_test(GenEx-TARGET_FILE -DLINKER_SUPPORTS_PDB=${LINKER_SUPPORTS_PDB})
+add_RunCMake_test(GenEx-GENEX_EVAL)
add_RunCMake_test(GeneratorExpression)
add_RunCMake_test(GeneratorInstance)
add_RunCMake_test(GeneratorPlatform)
@@ -262,6 +298,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
endif()
add_RunCMake_test(execute_process)
add_RunCMake_test(export)
+add_RunCMake_test(cmake_language)
add_RunCMake_test(cmake_minimum_required)
add_RunCMake_test(cmake_parse_arguments)
add_RunCMake_test(continue)
@@ -282,7 +319,7 @@ add_RunCMake_test(ctest_upload)
add_RunCMake_test(ctest_fixtures)
add_RunCMake_test(file)
add_RunCMake_test(find_file)
-add_RunCMake_test(find_library)
+add_RunCMake_test(find_library -DCYGWIN=${CYGWIN})
add_RunCMake_test(find_package)
add_RunCMake_test(find_path)
add_RunCMake_test(find_program -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
@@ -335,6 +372,7 @@ function(add_RunCMake_test_try_compile)
CMAKE_CXX_COMPILER_VERSION
CMAKE_CXX_STANDARD_DEFAULT
CMake_TEST_CUDA
+ CMake_TEST_FILESYSTEM_1S
CMAKE_OBJC_STANDARD_DEFAULT
CMAKE_OBJCXX_STANDARD_DEFAULT
)
@@ -343,6 +381,8 @@ function(add_RunCMake_test_try_compile)
endif()
endforeach()
add_RunCMake_test(try_compile)
+ set_property(TEST RunCMake.try_compile APPEND
+ PROPERTY LABELS "CUDA")
endfunction()
add_RunCMake_test_try_compile()
@@ -395,9 +435,13 @@ endif()
if(TARGET ctresalloc)
add_RunCMake_test(CTestResourceAllocation -DCTRESALLOC_COMMAND=$<TARGET_FILE:ctresalloc>)
else()
- message(WARNING "Could not find or build ctresalloc")
+ message(STATUS "Could not find ctresalloc")
endif()
+if(NOT WIN32)
+ add_RunCMake_test(SymlinkTrees)
+endif ()
+
find_package(Qt4 QUIET)
find_package(Qt5Core QUIET)
if (QT4_FOUND AND Qt5Core_FOUND AND NOT Qt5Core_VERSION VERSION_LESS 5.1.0)
@@ -450,12 +494,20 @@ if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang"
add_RunCMake_test(Framework)
endif()
+add_RunCMake_test(File_Archive)
+add_RunCMake_test(File_Configure)
add_RunCMake_test(File_Generate)
add_RunCMake_test(ExportWithoutLanguage)
add_RunCMake_test(target_link_directories)
add_RunCMake_test(target_link_libraries)
+add_RunCMake_test(target_link_libraries-ALIAS)
+add_RunCMake_test(target_link_libraries-LINK_LANGUAGE)
+add_RunCMake_test(target_link_libraries-LINK_LANG_AND_ID)
add_RunCMake_test(add_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
-add_RunCMake_test(target_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
+add_RunCMake_test(target_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
+ -DCMake_TEST_CUDA=${CMake_TEST_CUDA})
+set_property(TEST RunCMake.target_link_options APPEND
+ PROPERTY LABELS "CUDA")
add_RunCMake_test(target_compile_definitions)
add_RunCMake_test(target_compile_features)
@@ -464,6 +516,12 @@ add_RunCMake_test(target_include_directories)
add_RunCMake_test(target_sources)
add_RunCMake_test(CheckModules)
add_RunCMake_test(CheckIPOSupported)
+if (CMAKE_SYSTEM_NAME MATCHES "(Linux|Darwin)"
+ AND (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU" OR CMAKE_Fortran_COMPILER_ID MATCHES "GNU"))
+ add_RunCMake_test(CheckLinkerFlag -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
+ -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID})
+endif()
+
add_RunCMake_test(CommandLine -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DCYGWIN=${CYGWIN} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE})
add_RunCMake_test(CommandLineTar)
@@ -473,11 +531,15 @@ else()
set(NO_NAMELINK 0)
endif()
-add_RunCMake_test(install -DNO_NAMELINK=${NO_NAMELINK} -DCYGWIN=${CYGWIN} -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
+add_RunCMake_test(install -DNO_NAMELINK=${NO_NAMELINK} -DCYGWIN=${CYGWIN}
-DCMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN=${CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN}
-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-DCMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG=${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}
-DCMAKE_EXECUTABLE_FORMAT=${CMAKE_EXECUTABLE_FORMAT}
+ )
+
+add_RunCMake_test(file-GET_RUNTIME_DEPENDENCIES
+ -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
-DCMake_INSTALL_NAME_TOOL_BUG=${CMake_INSTALL_NAME_TOOL_BUG}
)
@@ -559,6 +621,8 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
list(APPEND CompilerLauncher_ARGS -DCMake_TEST_OBJC=1)
endif()
add_RunCMake_test(CompilerLauncher)
+ set_property(TEST RunCMake.CompilerLauncher APPEND
+ PROPERTY LABELS "CUDA")
add_RunCMake_test(ctest_labels_for_subprojects)
endif()
@@ -652,5 +716,5 @@ endif()
add_RunCMake_test("CTestCommandExpandLists")
-add_RunCMake_test(PrecompileHeaders)
+add_RunCMake_test(PrecompileHeaders -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
add_RunCMake_test("UnityBuild")