diff options
Diffstat (limited to 'Tests/RunCMake')
46 files changed, 195 insertions, 63 deletions
diff --git a/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt b/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt index c23ab89..f32056a 100644 --- a/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt +++ b/Tests/RunCMake/CMakePresets/NoDebug-stdout.txt @@ -1,2 +1,2 @@ --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) diff --git a/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt b/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt index 55bb894..da548a6 100644 --- a/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt +++ b/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-stdout.txt @@ -1,2 +1 @@ -- Configuring incomplete, errors occurred! -See also ".*/Tests/RunCMake/CTestCommandExpandLists/multipleExpandOptions-build/CMakeFiles/CMakeOutput\.log". diff --git a/Tests/RunCMake/CXXModules/examples/internal-partitions/importable.cxx b/Tests/RunCMake/CXXModules/examples/internal-partitions/importable.cxx index b872ae9..3b3d313 100644 --- a/Tests/RunCMake/CXXModules/examples/internal-partitions/importable.cxx +++ b/Tests/RunCMake/CXXModules/examples/internal-partitions/importable.cxx @@ -1,5 +1,5 @@ export module importable; -import : internal_partition; +import :internal_partition; #include "internal-partitions_export.h" diff --git a/Tests/RunCMake/CXXModules/examples/internal-partitions/partition.cxx b/Tests/RunCMake/CXXModules/examples/internal-partitions/partition.cxx index b15f53c..c828612 100644 --- a/Tests/RunCMake/CXXModules/examples/internal-partitions/partition.cxx +++ b/Tests/RunCMake/CXXModules/examples/internal-partitions/partition.cxx @@ -1,4 +1,4 @@ -module importable : internal_partition; +module importable:internal_partition; int from_partition() { diff --git a/Tests/RunCMake/CXXModules/examples/partitions/importable.cxx b/Tests/RunCMake/CXXModules/examples/partitions/importable.cxx index d0ac2f4..fbd5f90 100644 --- a/Tests/RunCMake/CXXModules/examples/partitions/importable.cxx +++ b/Tests/RunCMake/CXXModules/examples/partitions/importable.cxx @@ -1,5 +1,5 @@ export module importable; -export import : partition; +export import :partition; #include "partitions_export.h" diff --git a/Tests/RunCMake/CXXModules/examples/partitions/partition.cxx b/Tests/RunCMake/CXXModules/examples/partitions/partition.cxx index a47a4fd..20131cf 100644 --- a/Tests/RunCMake/CXXModules/examples/partitions/partition.cxx +++ b/Tests/RunCMake/CXXModules/examples/partitions/partition.cxx @@ -1,4 +1,4 @@ -export module importable : partition; +export module importable:partition; #include "partitions_export.h" diff --git a/Tests/RunCMake/CXXModules/sources/module-internal-part-impl.cxx b/Tests/RunCMake/CXXModules/sources/module-internal-part-impl.cxx index be77b0d..cab19ec 100644 --- a/Tests/RunCMake/CXXModules/sources/module-internal-part-impl.cxx +++ b/Tests/RunCMake/CXXModules/sources/module-internal-part-impl.cxx @@ -1,6 +1,6 @@ #ifdef _MSC_VER // Only MSVC supports this pattern. -module M : internal_part; +module M:internal_part; #else module M; #endif diff --git a/Tests/RunCMake/CXXModules/sources/module-internal-part.cxx b/Tests/RunCMake/CXXModules/sources/module-internal-part.cxx index fa82afb..0dc749f 100644 --- a/Tests/RunCMake/CXXModules/sources/module-internal-part.cxx +++ b/Tests/RunCMake/CXXModules/sources/module-internal-part.cxx @@ -1,3 +1,3 @@ -module M : internal_part; +module M:internal_part; int i(); diff --git a/Tests/RunCMake/CXXModules/sources/module-part-impl.cxx b/Tests/RunCMake/CXXModules/sources/module-part-impl.cxx index 46d5d9f..f3b6ba8 100644 --- a/Tests/RunCMake/CXXModules/sources/module-part-impl.cxx +++ b/Tests/RunCMake/CXXModules/sources/module-part-impl.cxx @@ -1,11 +1,11 @@ #ifdef _MSC_VER // Only MSVC supports this pattern. -module M : part; +module M:part; #else module M; #endif -import M : internal_part; +import M:internal_part; int p() { diff --git a/Tests/RunCMake/CXXModules/sources/module-part.cxx b/Tests/RunCMake/CXXModules/sources/module-part.cxx index 137c16f..307781b 100644 --- a/Tests/RunCMake/CXXModules/sources/module-part.cxx +++ b/Tests/RunCMake/CXXModules/sources/module-part.cxx @@ -1,3 +1,3 @@ -export module M : part; +export module M:part; int p(); diff --git a/Tests/RunCMake/CXXModules/sources/module.cxx b/Tests/RunCMake/CXXModules/sources/module.cxx index a631354..37eedeb 100644 --- a/Tests/RunCMake/CXXModules/sources/module.cxx +++ b/Tests/RunCMake/CXXModules/sources/module.cxx @@ -1,5 +1,5 @@ export module M; -export import M : part; -import M : internal_part; +export import M:part; +import M:internal_part; int f(); diff --git a/Tests/RunCMake/CommandLine/cmake_depends/.gitattributes b/Tests/RunCMake/CommandLine/cmake_depends/.gitattributes index d9a4db4..9c22288 100644 --- a/Tests/RunCMake/CommandLine/cmake_depends/.gitattributes +++ b/Tests/RunCMake/CommandLine/cmake_depends/.gitattributes @@ -1,2 +1,2 @@ # Do not format a source encoded in UTF-16. -test_UTF-16LE.h -format.clang-format-6.0 +test_UTF-16LE.h -format.clang-format diff --git a/Tests/RunCMake/CommandLine/cmake_depends/test.c b/Tests/RunCMake/CommandLine/cmake_depends/test.c index 92c056f..5b42255 100644 --- a/Tests/RunCMake/CommandLine/cmake_depends/test.c +++ b/Tests/RunCMake/CommandLine/cmake_depends/test.c @@ -1,2 +1,3 @@ #include "test.h" + #include "test_UTF-16LE.h" diff --git a/Tests/RunCMake/Configure/CopyFileABI-stdout.txt b/Tests/RunCMake/Configure/CopyFileABI-stdout.txt index 6a856a4..2176554 100644 --- a/Tests/RunCMake/Configure/CopyFileABI-stdout.txt +++ b/Tests/RunCMake/Configure/CopyFileABI-stdout.txt @@ -1,4 +1,4 @@ -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done.* --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) diff --git a/Tests/RunCMake/Configure/ErrorLogs-result.txt b/Tests/RunCMake/Configure/ErrorLogs-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/Configure/ErrorLogs-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt b/Tests/RunCMake/Configure/ErrorLogs-stderr.txt deleted file mode 100644 index 4eee45d..0000000 --- a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Error at ErrorLogs.cmake:3 \(message\): - Some error! -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Configure/ErrorLogs-stdout.txt b/Tests/RunCMake/Configure/ErrorLogs-stdout.txt deleted file mode 100644 index c467b62..0000000 --- a/Tests/RunCMake/Configure/ErrorLogs-stdout.txt +++ /dev/null @@ -1,3 +0,0 @@ --- Configuring incomplete, errors occurred! -See also ".*/Tests/RunCMake/Configure/ErrorLogs-build/CMakeFiles/CMakeOutput\.log"\. -See also ".*/Tests/RunCMake/Configure/ErrorLogs-build/CMakeFiles/CMakeError\.log"\. diff --git a/Tests/RunCMake/Configure/ErrorLogs.cmake b/Tests/RunCMake/Configure/ErrorLogs.cmake deleted file mode 100644 index e8cf062..0000000 --- a/Tests/RunCMake/Configure/ErrorLogs.cmake +++ /dev/null @@ -1,3 +0,0 @@ -file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Some detailed error information!\n") -message(SEND_ERROR "Some error!") diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake index 750fa3c..df6849e 100644 --- a/Tests/RunCMake/Configure/RunCMakeTest.cmake +++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake @@ -3,7 +3,6 @@ include(RunCMake) run_cmake(ContinueAfterError) run_cmake(CopyFileABI) run_cmake(CustomTargetAfterError) -run_cmake(ErrorLogs) # Use a single build tree for a few tests without cleaning. set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RerunCMake-build) diff --git a/Tests/RunCMake/FileAPI/configureLog-v1-check.py b/Tests/RunCMake/FileAPI/configureLog-v1-check.py index ea5beb4..05c7893 100644 --- a/Tests/RunCMake/FileAPI/configureLog-v1-check.py +++ b/Tests/RunCMake/FileAPI/configureLog-v1-check.py @@ -14,7 +14,7 @@ def check_object_configureLog(o): assert os.path.exists(path) eventKindNames = o["eventKindNames"] assert is_list(eventKindNames) - assert sorted(eventKindNames) == ["try_compile-v1", "try_run-v1"] + assert sorted(eventKindNames) == ["message-v1", "try_compile-v1", "try_run-v1"] assert is_dict(index) assert sorted(index.keys()) == ["cmake", "objects", "reply"] diff --git a/Tests/RunCMake/GenEx-TARGET_FILE/OUTPUT_NAME-recursion-stderr.txt b/Tests/RunCMake/GenEx-TARGET_FILE/OUTPUT_NAME-recursion-stderr.txt index 013c4f2..9af0573 100644 --- a/Tests/RunCMake/GenEx-TARGET_FILE/OUTPUT_NAME-recursion-stderr.txt +++ b/Tests/RunCMake/GenEx-TARGET_FILE/OUTPUT_NAME-recursion-stderr.txt @@ -1,5 +1,5 @@ CMake Error at OUTPUT_NAME-recursion.cmake:[0-9]+ \(add_executable\): - Target 'empty2' OUTPUT_NAME depends on itself. + Target 'empty1' OUTPUT_NAME depends on itself. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GenerateExportHeader/reference/.gitattributes b/Tests/RunCMake/GenerateExportHeader/reference/.gitattributes index d9b566e..883a7f1 100644 --- a/Tests/RunCMake/GenerateExportHeader/reference/.gitattributes +++ b/Tests/RunCMake/GenerateExportHeader/reference/.gitattributes @@ -1,2 +1,2 @@ # Exclude reference content from formatting. -* -format.clang-format-6.0 +* -format.clang-format diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt index 8877451..8c1c301 100644 --- a/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt +++ b/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-config-ninja-stdout.txt @@ -1,4 +1,4 @@ --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) -- Build files have been written to: [^ ]*/Tests/RunCMake/NinjaMultiConfig/Simple-build diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt b/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt index 8877451..8c1c301 100644 --- a/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt +++ b/Tests/RunCMake/NinjaMultiConfig/Simple-reconfigure-noconfig-ninja-stdout.txt @@ -1,4 +1,4 @@ --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) -- Build files have been written to: [^ ]*/Tests/RunCMake/NinjaMultiConfig/Simple-build diff --git a/Tests/RunCMake/Swift/NoWorkToDo.cmake b/Tests/RunCMake/Swift/NoWorkToDo.cmake index e86a861..51c2ff3 100644 --- a/Tests/RunCMake/Swift/NoWorkToDo.cmake +++ b/Tests/RunCMake/Swift/NoWorkToDo.cmake @@ -1,2 +1,5 @@ enable_language(Swift) -add_executable(hello hello.swift) +add_executable(hello1 hello.swift) +set_target_properties(hello1 PROPERTIES ENABLE_EXPORTS TRUE) + +add_executable(hello2 hello.swift) diff --git a/Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt b/Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt index 34c873c..9f4f24e 100644 --- a/Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt +++ b/Tests/RunCMake/configure_file/RerunCMake-rerun-stdout.txt @@ -1,3 +1,3 @@ --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) -- Build files have been written to: .*/Tests/RunCMake/configure_file/RerunCMake-build diff --git a/Tests/RunCMake/configure_file/RerunCMake-stdout.txt b/Tests/RunCMake/configure_file/RerunCMake-stdout.txt index 34c873c..9f4f24e 100644 --- a/Tests/RunCMake/configure_file/RerunCMake-stdout.txt +++ b/Tests/RunCMake/configure_file/RerunCMake-stdout.txt @@ -1,3 +1,3 @@ --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) -- Build files have been written to: .*/Tests/RunCMake/configure_file/RerunCMake-build diff --git a/Tests/RunCMake/message/ConfigureLog-config.txt b/Tests/RunCMake/message/ConfigureLog-config.txt new file mode 100644 index 0000000..49c12de --- /dev/null +++ b/Tests/RunCMake/message/ConfigureLog-config.txt @@ -0,0 +1,30 @@ +^ +--- +events: + - + kind: "message-v1" + backtrace: + - "ConfigureLog.cmake:[0-9]+ \(message\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + message: | + Message 0 + - + kind: "message-v1" + backtrace: + - "ConfigureLog.cmake:[0-9]+ \(message\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Check 1" + message: | + Message 1 + - + kind: "message-v1" + backtrace: + - "ConfigureLog.cmake:[0-9]+ \(message\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Check 2" + - "Check 1" + message: | + Message 2 +\.\.\.$ diff --git a/Tests/RunCMake/message/ConfigureLog-stdout.txt b/Tests/RunCMake/message/ConfigureLog-stdout.txt new file mode 100644 index 0000000..ba32642 --- /dev/null +++ b/Tests/RunCMake/message/ConfigureLog-stdout.txt @@ -0,0 +1,4 @@ +-- Check 1 +-- Check 2 +-- Check 2 - passed +-- Check 1 - passed diff --git a/Tests/RunCMake/message/ConfigureLog.cmake b/Tests/RunCMake/message/ConfigureLog.cmake new file mode 100644 index 0000000..6f2c1b0 --- /dev/null +++ b/Tests/RunCMake/message/ConfigureLog.cmake @@ -0,0 +1,7 @@ +message(CONFIGURE_LOG "Message 0") +message(CHECK_START "Check 1") +message(CONFIGURE_LOG "Message 1") +message(CHECK_START "Check 2") +message(CONFIGURE_LOG "Message 2") +message(CHECK_PASS "passed") +message(CHECK_PASS "passed") diff --git a/Tests/RunCMake/message/ConfigureLogScript-config.txt b/Tests/RunCMake/message/ConfigureLogScript-config.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/message/ConfigureLogScript-config.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/message/ConfigureLogScript-stdout.txt b/Tests/RunCMake/message/ConfigureLogScript-stdout.txt new file mode 100644 index 0000000..ba32642 --- /dev/null +++ b/Tests/RunCMake/message/ConfigureLogScript-stdout.txt @@ -0,0 +1,4 @@ +-- Check 1 +-- Check 2 +-- Check 2 - passed +-- Check 1 - passed diff --git a/Tests/RunCMake/message/ConfigureLogScript.cmake b/Tests/RunCMake/message/ConfigureLogScript.cmake new file mode 100644 index 0000000..e1cd21b --- /dev/null +++ b/Tests/RunCMake/message/ConfigureLogScript.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/ConfigureLog.cmake") diff --git a/Tests/RunCMake/message/RunCMakeTest.cmake b/Tests/RunCMake/message/RunCMakeTest.cmake index 1233838..c54e8f2 100644 --- a/Tests/RunCMake/message/RunCMakeTest.cmake +++ b/Tests/RunCMake/message/RunCMakeTest.cmake @@ -1,7 +1,9 @@ include(RunCMake) +run_cmake_script(ConfigureLogScript) run_cmake_script(newline) +run_cmake(ConfigureLog) run_cmake(defaultmessage) run_cmake(nomessage) run_cmake(message-internal-warning) diff --git a/Tests/RunCMake/try_compile/CMP0128-common.cmake b/Tests/RunCMake/try_compile/CMP0128-common.cmake index 0b8a12b..64b1a77 100644 --- a/Tests/RunCMake/try_compile/CMP0128-common.cmake +++ b/Tests/RunCMake/try_compile/CMP0128-common.cmake @@ -1,10 +1,6 @@ cmake_policy(SET CMP0067 NEW) enable_language(CXX) -# Isolate the one try_compile below in the error log. -set(CMakeError_log "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log") -file(REMOVE "${CMakeError_log}") - # Add our own -std= flag to the try_compile check. set(CMAKE_REQUIRED_FLAGS -std=c++11) @@ -24,8 +20,21 @@ int main() } " SRC_COMPILED) if(NOT SRC_COMPILED) - if(EXISTS "${CMakeError_log}") - file(READ "${CMakeError_log}" err_log) + message("Check failed to compile:") + set(configure_log "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeConfigureLog.yaml") + if(EXISTS "${configure_log}") + file(READ "${configure_log}" log_content) + else() + set(log_content "") + endif() + if(log_content MATCHES [[( - + kind: "try_compile-v1"( ++ [^ +]+)+ + checks: + - "Performing Test SRC_COMPILED"( ++ [^ +]+)+)]]) + message("${configure_log} contains:\n${CMAKE_MATCH_1}") endif() - message("${err_log}") endif() diff --git a/Tests/RunCMake/try_compile/ConfigureLog-config.txt b/Tests/RunCMake/try_compile/ConfigureLog-config.txt index 262ed3c..1f848bf 100644 --- a/Tests/RunCMake/try_compile/ConfigureLog-config.txt +++ b/Tests/RunCMake/try_compile/ConfigureLog-config.txt @@ -1,6 +1,13 @@ ^ --- -events: +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ - kind: "try_compile-v1" backtrace: @@ -17,7 +24,14 @@ events: variable: "CMAKE_C_ABI_COMPILED" cached: true stdout: \|.* - exitCode: 0 + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)* - kind: "try_compile-v1" backtrace: 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/Inspect-config.txt b/Tests/RunCMake/try_compile/Inspect-config.txt index e09fe55..7a39335 100644 --- a/Tests/RunCMake/try_compile/Inspect-config.txt +++ b/Tests/RunCMake/try_compile/Inspect-config.txt @@ -1,6 +1,13 @@ ^ --- -events: +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ - kind: "try_compile-v1" backtrace: @@ -17,7 +24,14 @@ events: variable: "CMAKE_C_ABI_COMPILED" cached: true stdout: \|.* - exitCode: 0 + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ - kind: "try_compile-v1" backtrace: @@ -34,5 +48,12 @@ events: variable: "CMAKE_CXX_ABI_COMPILED" cached: true stdout: \|.* - exitCode: 0 + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)* \.\.\.$ diff --git a/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt b/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt index b0438f5..a5ca781 100644 --- a/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt +++ b/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt @@ -1,5 +1,5 @@ Running CMake on RerunCMake FALSE --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) -- Build files have been written to: .*/Tests/RunCMake/try_compile/RerunCMake-build diff --git a/Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt b/Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt index 9c78b26..e37d210 100644 --- a/Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt +++ b/Tests/RunCMake/try_compile/RerunCMake-rerun-stdout.txt @@ -1,3 +1,3 @@ --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) -- Build files have been written to: .*/Tests/RunCMake/try_compile/RerunCMake-build diff --git a/Tests/RunCMake/try_compile/RerunCMake-stdout.txt b/Tests/RunCMake/try_compile/RerunCMake-stdout.txt index 9c78b26..e37d210 100644 --- a/Tests/RunCMake/try_compile/RerunCMake-stdout.txt +++ b/Tests/RunCMake/try_compile/RerunCMake-stdout.txt @@ -1,3 +1,3 @@ --- Configuring done --- Generating done +-- Configuring done \([0-9]+\.[0-9]s\) +-- Generating done \([0-9]+\.[0-9]s\) -- Build files have been written to: .*/Tests/RunCMake/try_compile/RerunCMake-build 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/SourceFromBadName-config.txt b/Tests/RunCMake/try_compile/SourceFromBadName-config.txt index 10f3293..cb76565 100644 --- a/Tests/RunCMake/try_compile/SourceFromBadName-config.txt +++ b/Tests/RunCMake/try_compile/SourceFromBadName-config.txt @@ -1 +1,11 @@ -^$ +^ +--- +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ +\.\.\.$ 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() diff --git a/Tests/RunCMake/try_run/ConfigureLog-config.txt b/Tests/RunCMake/try_run/ConfigureLog-config.txt index ba396e0..bf3c3bd 100644 --- a/Tests/RunCMake/try_run/ConfigureLog-config.txt +++ b/Tests/RunCMake/try_run/ConfigureLog-config.txt @@ -1,6 +1,13 @@ ^ --- -events: +events:( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)+ - kind: "try_compile-v1" backtrace: @@ -16,7 +23,14 @@ events: variable: "CMAKE_C_ABI_COMPILED" cached: true stdout: \|.* - exitCode: 0 + exitCode: 0( + - + kind: "message-v1" + backtrace:( + - "[^"]+")+ + message: \|( ++ [^ +]*)*)* - kind: "try_run-v1" backtrace: |