diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CXXModules/RunCMakeTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt | 9 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/ISPCTargets-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/RunCMakeTest.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/Verbose.c | 7 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/Verbose.cmake | 15 |
9 files changed, 37 insertions, 4 deletions
diff --git a/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt b/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt index 2bee19f..a0b2572 100644 --- a/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt +++ b/Tests/RunCMake/CXXModules/NoDyndepSupport-stderr.txt @@ -15,7 +15,7 @@ CMake Error: .* - due to lack of required features. Ninja 1.10 or higher is required. + due to lack of required features. Ninja 1.11 or higher is required. |CMake Error in CMakeLists.txt: The "nodyndep" target contains C\+\+ module sources which are not supported diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake index 01d59f8..78afd5e 100644 --- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake @@ -38,7 +38,7 @@ endif () set(generator_supports_cxx_modules 0) if (RunCMake_GENERATOR MATCHES "Ninja" AND - ninja_version VERSION_GREATER_EQUAL "1.10" AND + ninja_version VERSION_GREATER_EQUAL "1.11" AND "cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES) set(generator_supports_cxx_modules 1) endif () diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt index 130de2b..b61ccd2 100644 --- a/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt +++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG-stderr.txt @@ -25,4 +25,13 @@ CMake Error at BadCONFIG.cmake:1 \(add_custom_target\): Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + +CMake Warning at BadCONFIG.cmake:1 \(add_custom_target\): + Warning evaluating generator expression: + + \$<CONFIG:Release,Foo-Second> + + The config name of "Foo-Second" is invalid +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ CMake Generate step failed\. Build files cannot be regenerated correctly\.$ diff --git a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake index 1735ab7..4d7a357 100644 --- a/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake +++ b/Tests/RunCMake/GeneratorExpression/BadCONFIG.cmake @@ -2,4 +2,5 @@ add_custom_target(check ALL COMMAND check $<CONFIG:.> $<CONFIG:Foo-Bar> $<$<CONFIG:Foo-Nested>:foo> + $<$<CONFIG:Release,Foo-Second>:foo> VERBATIM) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 8d8c8dc..2d545d9 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -12,7 +12,6 @@ run_cmake(BadTargetTypeInterface) run_cmake(BadTargetTypeObject) run_cmake(BadInstallPrefix) run_cmake(BadSHELL_PATH) -run_cmake(BadCONFIG) run_cmake(CMP0044-WARN) run_cmake(NonValidTarget-C_COMPILER_ID) run_cmake(NonValidTarget-CXX_COMPILER_ID) diff --git a/Tests/RunCMake/try_compile/ISPCTargets-stderr.txt b/Tests/RunCMake/try_compile/ISPCTargets-stderr.txt index 72e0a01..91dfa6d 100644 --- a/Tests/RunCMake/try_compile/ISPCTargets-stderr.txt +++ b/Tests/RunCMake/try_compile/ISPCTargets-stderr.txt @@ -1 +1 @@ -.*Linking ISPC static library* +(Linking ISPC static library|[ \/]libcmTC_[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]\.a|out:([A-Za-z]+[\/])?cmTC_[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]\.lib) diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index 51ccac8..29c0538 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -45,6 +45,8 @@ run_cmake(ProjectCopyFile) run_cmake(NonSourceCopyFile) run_cmake(NonSourceCompileDefinitions) +run_cmake(Verbose) + set(RunCMake_TEST_OPTIONS --debug-trycompile) run_cmake(PlatformVariables) run_cmake(WarnDeprecated) diff --git a/Tests/RunCMake/try_compile/Verbose.c b/Tests/RunCMake/try_compile/Verbose.c new file mode 100644 index 0000000..5953879 --- /dev/null +++ b/Tests/RunCMake/try_compile/Verbose.c @@ -0,0 +1,7 @@ +#ifndef EXAMPLE_DEFINITION +# error "EXAMPLE_DEFINITION not defined." +#endif +int main(void) +{ + return 0; +} diff --git a/Tests/RunCMake/try_compile/Verbose.cmake b/Tests/RunCMake/try_compile/Verbose.cmake new file mode 100644 index 0000000..3f2a7dd --- /dev/null +++ b/Tests/RunCMake/try_compile/Verbose.cmake @@ -0,0 +1,15 @@ +enable_language(C) + +try_compile(COMPILE_RESULT + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Verbose.c + COMPILE_DEFINITIONS -DEXAMPLE_DEFINITION + OUTPUT_VARIABLE out + ) +string(REPLACE "\n" "\n " out " ${out}") +if(NOT COMPILE_RESULT) + message(FATAL_ERROR "try_compile failed:\n${out}") +endif() +if(NOT out MATCHES "EXAMPLE_DEFINITION" + AND NOT CMAKE_GENERATOR MATCHES "NMake|Borland") + message(FATAL_ERROR "try_compile output does not contain EXAMPLE_DEFINITION:\n${out}") +endif() |