diff options
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake new file mode 100644 index 0000000..b163369 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake @@ -0,0 +1,38 @@ +cmake_policy(SET CMP0057 NEW) +include(RunCMake) + +function(run_test name) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build) + run_cmake(${name}) + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(${name}-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(${name}-test ${CMAKE_CTEST_COMMAND} -C Debug) +endfunction() + +run_cmake(DisabledPch) +run_cmake(PchDebugGenex) +run_test(PchInterface) +run_cmake(PchPrologueEpilogue) +run_test(SkipPrecompileHeaders) +run_test(CXXnotC) +run_test(PchReuseFrom-CMP0141-OLD) +run_test(PchReuseFrom-CMP0141-NEW) +if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") + run_test(PchReuseFrom-CMP0141-NEW-empty) +endif() +run_test(PchReuseFromPrefixed) +run_test(PchReuseFromSubdir) +run_cmake(PchMultilanguage) +if(RunCMake_GENERATOR MATCHES "Make|Ninja") + run_cmake(PchWarnInvalid) + + if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND + CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0.0 AND + NOT CMAKE_C_SIMULATE_ID STREQUAL "MSVC") + run_cmake(PchInstantiateTemplates) + endif() +endif() +run_test(PchReuseFromObjLib) +run_test(PchIncludedAllLanguages) +run_test(PchIncludedOneLanguage) +run_test(PchLibObjLibExe) |