From 96ce3581ab77371f8e794fe4d29da6989f66cdcc Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 13 Jan 2023 13:21:13 -0500 Subject: Help: Clarify backtrace order in cmake-configure-log(7) --- Help/manual/cmake-configure-log.7.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Help/manual/cmake-configure-log.7.rst b/Help/manual/cmake-configure-log.7.rst index f909717..aa2c20c 100644 --- a/Help/manual/cmake-configure-log.7.rst +++ b/Help/manual/cmake-configure-log.7.rst @@ -115,8 +115,9 @@ The keys common to all events are: ``backtrace`` A YAML block sequence reporting the call stack of CMake source - locations at which the event occurred. Each node is a string - specifying one location formatted as ``: ()``. + locations at which the event occurred, from most-recent to + least-recent. Each node is a string specifying one location + formatted as ``: ()``. Additional mapping keys are specific to each (versioned) event kind, described below. -- cgit v0.12 From 189557bd74345590d3f5378c6e00cf1dad9778dc Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 13 Jan 2023 12:58:35 -0500 Subject: cmake: Make entire in-progress check stack available internally Represent it as a `vector` so we can iterate over the whole stack. --- Source/cmake.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/cmake.h b/Source/cmake.h index 10db87d..12160ad 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -472,13 +471,13 @@ public: } std::string GetTopCheckInProgressMessage() { - auto message = this->CheckInProgressMessages.top(); - this->CheckInProgressMessages.pop(); + auto message = this->CheckInProgressMessages.back(); + this->CheckInProgressMessages.pop_back(); return message; } void PushCheckInProgressMessage(std::string message) { - this->CheckInProgressMessages.emplace(std::move(message)); + this->CheckInProgressMessages.emplace_back(std::move(message)); } //! Should `message` command display context. @@ -773,7 +772,7 @@ private: bool LogLevelWasSetViaCLI = false; bool LogContext = false; - std::stack CheckInProgressMessages; + std::vector CheckInProgressMessages; std::unique_ptr GlobalGenerator; -- cgit v0.12 From 0418efb7added53ff83e0868d44ea8965ec15027 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 13 Jan 2023 11:27:52 -0500 Subject: Tests: Add explicit ConfigureLog case to RunCMake.try_compile --- Tests/RunCMake/try_compile/ConfigureLog-bad.c | 1 + Tests/RunCMake/try_compile/ConfigureLog-config.txt | 45 ++++++++++++++++++++++ Tests/RunCMake/try_compile/ConfigureLog-test.c | 4 ++ Tests/RunCMake/try_compile/ConfigureLog.cmake | 9 +++++ Tests/RunCMake/try_compile/RunCMakeTest.cmake | 1 + 5 files changed, 60 insertions(+) create mode 100644 Tests/RunCMake/try_compile/ConfigureLog-bad.c create mode 100644 Tests/RunCMake/try_compile/ConfigureLog-config.txt create mode 100644 Tests/RunCMake/try_compile/ConfigureLog-test.c create mode 100644 Tests/RunCMake/try_compile/ConfigureLog.cmake diff --git a/Tests/RunCMake/try_compile/ConfigureLog-bad.c b/Tests/RunCMake/try_compile/ConfigureLog-bad.c new file mode 100644 index 0000000..6508ead --- /dev/null +++ b/Tests/RunCMake/try_compile/ConfigureLog-bad.c @@ -0,0 +1 @@ +#error "This does not compile!" diff --git a/Tests/RunCMake/try_compile/ConfigureLog-config.txt b/Tests/RunCMake/try_compile/ConfigureLog-config.txt new file mode 100644 index 0000000..6ed3bfe --- /dev/null +++ b/Tests/RunCMake/try_compile/ConfigureLog-config.txt @@ -0,0 +1,45 @@ +^ +--- +events: + - + kind: "try_compile-v1" + backtrace: + - "[^"]*/Modules/CMakeDetermineCompilerABI.cmake:[0-9]+ \(try_compile\)" + - "[^"]*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(CMAKE_DETERMINE_COMPILER_ABI\)" + - "ConfigureLog.cmake:[0-9]+ \(enable_language\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + directories: + source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" + binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" + buildResult: + variable: "CMAKE_C_ABI_COMPILED" + cached: true + stdout: \|.* + exitCode: 0 + - + kind: "try_compile-v1" + backtrace: + - "ConfigureLog.cmake:[0-9]+ \(try_compile\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + directories: + source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" + binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" + buildResult: + variable: "COMPILE_RESULT" + cached: true + stdout: \|.* + exitCode: [1-9][0-9]* + - + kind: "try_compile-v1" + backtrace: + - "ConfigureLog.cmake:[0-9]+ \(try_compile\)" + - "CMakeLists.txt:[0-9]+ \(include\)" + directories: + source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" + binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" + buildResult: + variable: "COMPILE_RESULT" + cached: true + stdout: \|.* + exitCode: 0 +\.\.\.$ diff --git a/Tests/RunCMake/try_compile/ConfigureLog-test.c b/Tests/RunCMake/try_compile/ConfigureLog-test.c new file mode 100644 index 0000000..8488f4e --- /dev/null +++ b/Tests/RunCMake/try_compile/ConfigureLog-test.c @@ -0,0 +1,4 @@ +int main(void) +{ + return 0; +} diff --git a/Tests/RunCMake/try_compile/ConfigureLog.cmake b/Tests/RunCMake/try_compile/ConfigureLog.cmake new file mode 100644 index 0000000..f475014 --- /dev/null +++ b/Tests/RunCMake/try_compile/ConfigureLog.cmake @@ -0,0 +1,9 @@ +enable_language(C) + +try_compile(COMPILE_RESULT + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-bad.c + ) + +try_compile(COMPILE_RESULT + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c + ) diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index ad1cc29..51ccac8 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -15,6 +15,7 @@ run_cmake_with_options(Inspect ) include("${RunCMake_BINARY_DIR}/Inspect-build/info.cmake") +run_cmake(ConfigureLog) run_cmake(NoArgs) run_cmake(OneArg) run_cmake(TwoArgs) -- cgit v0.12 From 65ed5c2ca816f8ba4068b163a2dcdab079df0038 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 16 Jan 2023 11:08:47 -0500 Subject: try_compile: Report underlying error when COPY_FILE fails --- Source/cmCoreTryCompile.cxx | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 2a4ea80..1883816 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -1099,23 +1099,35 @@ cm::optional cmCoreTryCompile::TryCompileCode( if ((res == 0) && arguments.CopyFileTo) { std::string const& copyFile = *arguments.CopyFileTo; - if (this->OutputFile.empty() || - !cmSystemTools::CopyFileAlways(this->OutputFile, copyFile)) { - std::ostringstream emsg; + cmsys::SystemTools::CopyStatus status = + cmSystemTools::CopyFileAlways(this->OutputFile, copyFile); + if (!status) { + std::string err = status.GetString(); + switch (status.Path) { + case cmsys::SystemTools::CopyStatus::SourcePath: + err = cmStrCat(err, " (input)"); + break; + case cmsys::SystemTools::CopyStatus::DestPath: + err = cmStrCat(err, " (output)"); + break; + default: + break; + } /* clang-format off */ - emsg << "Cannot copy output executable\n" - << " '" << this->OutputFile << "'\n" - << "to destination specified by COPY_FILE:\n" - << " '" << copyFile << "'\n"; + err = cmStrCat( + "Cannot copy output executable\n", + " '", this->OutputFile, "'\n", + "to destination specified by COPY_FILE:\n", + " '", copyFile, "'\n", + "because:\n", + " ", err, "\n", + this->FindErrorMessage); /* clang-format on */ - if (!this->FindErrorMessage.empty()) { - emsg << this->FindErrorMessage; - } if (!arguments.CopyFileError) { - this->Makefile->IssueMessage(MessageType::FATAL_ERROR, emsg.str()); + this->Makefile->IssueMessage(MessageType::FATAL_ERROR, err); return cm::nullopt; } - copyFileErrorMessage = emsg.str(); + copyFileErrorMessage = std::move(err); } } -- cgit v0.12 From 9d9e8450a872a4a9ec1a74cc7a73df100c32c7e8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 13 Jan 2023 11:19:29 -0500 Subject: try_compile: Add optional LOG_DESCRIPTION to record in configure log Issue: #23200 --- Help/command/try_compile.rst | 10 ++++++++++ Help/command/try_run.rst | 2 ++ Help/manual/cmake-configure-log.7.rst | 6 ++++++ Help/release/dev/configure-log.rst | 4 ++++ Source/cmCoreTryCompile.cxx | 7 +++++++ Source/cmCoreTryCompile.h | 3 +++ Tests/RunCMake/try_compile/ConfigureLog-config.txt | 2 ++ Tests/RunCMake/try_compile/ConfigureLog.cmake | 2 ++ Tests/RunCMake/try_compile/EmptyValueArgs-stderr.txt | 8 ++++++++ Tests/RunCMake/try_compile/EmptyValueArgs.cmake | 3 +++ Tests/RunCMake/try_compile/NoLogDescription-result.txt | 1 + Tests/RunCMake/try_compile/NoLogDescription-stderr.txt | 7 +++++++ Tests/RunCMake/try_compile/NoLogDescription.cmake | 4 ++++ Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake | 1 + Tests/RunCMake/try_run/ConfigureLog-config.txt | 2 ++ Tests/RunCMake/try_run/ConfigureLog.cmake | 2 ++ 16 files changed, 64 insertions(+) create mode 100644 Tests/RunCMake/try_compile/NoLogDescription-result.txt create mode 100644 Tests/RunCMake/try_compile/NoLogDescription-stderr.txt create mode 100644 Tests/RunCMake/try_compile/NoLogDescription.cmake diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst index 52c0ae8..208be46 100644 --- a/Help/command/try_compile.rst +++ b/Help/command/try_compile.rst @@ -18,6 +18,7 @@ Try Compiling Whole Projects SOURCE_DIR [BINARY_DIR ] [TARGET ] + [LOG_DESCRIPTION ] [NO_CACHE] [CMAKE_FLAGS ...] [OUTPUT_VARIABLE ]) @@ -47,6 +48,7 @@ which was present in older versions of CMake: try_compile( [] + [LOG_DESCRIPTION ] [NO_CACHE] [CMAKE_FLAGS ...] [OUTPUT_VARIABLE ]) @@ -63,6 +65,7 @@ Try Compiling Source Files SOURCE_FROM_CONTENT | SOURCE_FROM_VAR | SOURCE_FROM_FILE >... + [LOG_DESCRIPTION ] [NO_CACHE] [CMAKE_FLAGS ...] [COMPILE_DEFINITIONS ...] @@ -115,6 +118,7 @@ which was present in older versions of CMake: .. code-block:: cmake try_compile( + [LOG_DESCRIPTION ] [NO_CACHE] [CMAKE_FLAGS ...] [COMPILE_DEFINITIONS ...] @@ -171,6 +175,12 @@ The options are: set the :prop_tgt:`STATIC_LIBRARY_OPTIONS` target property in the generated project, depending on the :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` variable. +``LOG_DESCRIPTION `` + .. versionadded:: 3.26 + + Specify a non-empty text description of the purpose of the check. + This is recorded in the :manual:`cmake-configure-log(7)` entry. + ``NO_CACHE`` .. versionadded:: 3.25 diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst index cd41a4b..ab4742e 100644 --- a/Help/command/try_run.rst +++ b/Help/command/try_run.rst @@ -17,6 +17,7 @@ Try Compiling and Running Source Files SOURCE_FROM_CONTENT | SOURCE_FROM_VAR | SOURCE_FROM_FILE >... + [LOG_DESCRIPTION ] [NO_CACHE] [CMAKE_FLAGS ...] [COMPILE_DEFINITIONS ...] @@ -55,6 +56,7 @@ which was present in older versions of CMake: try_run( + [LOG_DESCRIPTION ] [NO_CACHE] [CMAKE_FLAGS ...] [COMPILE_DEFINITIONS ...] diff --git a/Help/manual/cmake-configure-log.7.rst b/Help/manual/cmake-configure-log.7.rst index aa2c20c..98f20ff 100644 --- a/Help/manual/cmake-configure-log.7.rst +++ b/Help/manual/cmake-configure-log.7.rst @@ -141,6 +141,7 @@ A ``try_compile-v1`` event is a YAML mapping: kind: "try_compile-v1" backtrace: - "CMakeLists.txt:123 (try_compile)" + description: "Explicit LOG_DESCRIPTION" directories: source: "/path/to/.../TryCompile-01234" binary: "/path/to/.../TryCompile-01234" @@ -153,6 +154,10 @@ A ``try_compile-v1`` event is a YAML mapping: The keys specific to ``try_compile-v1`` mappings are: +``description`` + An optional key that is present when the ``LOG_DESCRIPTION `` option + was used. Its value is a string containing the description ````. + ``directories`` A mapping describing the directories associated with the compilation attempt. It has the following keys: @@ -207,6 +212,7 @@ A ``try_run-v1`` event is a YAML mapping: kind: "try_run-v1" backtrace: - "CMakeLists.txt:456 (try_run)" + description: "Explicit LOG_DESCRIPTION" directories: source: "/path/to/.../TryCompile-56789" binary: "/path/to/.../TryCompile-56789" diff --git a/Help/release/dev/configure-log.rst b/Help/release/dev/configure-log.rst index 34b8fb3..298137b 100644 --- a/Help/release/dev/configure-log.rst +++ b/Help/release/dev/configure-log.rst @@ -6,3 +6,7 @@ Configure Log * The :manual:`cmake-file-api(7)` gained a new "configureLog" object kind that enables stable access to the :manual:`cmake-configure-log(7)`. + +* The :command:`try_compile` and :command:`try_run` commands gained + a ``LOG_DESCRIPTION`` option specifying text to be recorded in the + :manual:`cmake-configure-log(7)`. diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 1883816..29f6a98 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -151,6 +151,7 @@ cmArgumentParser makeTryRunParser( auto const TryCompileBaseArgParser = cmArgumentParser{} .Bind(0, &Arguments::CompileResultVariable) + .Bind("LOG_DESCRIPTION"_s, &Arguments::LogDescription) .Bind("NO_CACHE"_s, &Arguments::NoCache) .Bind("CMAKE_FLAGS"_s, &Arguments::CMakeFlags) .Bind("__CMAKE_INTERNAL"_s, &Arguments::CMakeInternal) @@ -1138,6 +1139,9 @@ cm::optional cmCoreTryCompile::TryCompileCode( } cmTryCompileResult result; + if (arguments.LogDescription) { + result.LogDescription = *arguments.LogDescription; + } result.SourceDirectory = sourceDirectory; result.BinaryDirectory = this->BinaryDirectory; result.Variable = *arguments.CompileResultVariable; @@ -1290,6 +1294,9 @@ void cmCoreTryCompile::WriteTryCompileEventFields( cmConfigureLog& log, cmTryCompileResult const& compileResult) { #ifndef CMAKE_BOOTSTRAP + if (compileResult.LogDescription) { + log.WriteValue("description"_s, *compileResult.LogDescription); + } log.BeginObject("directories"_s); log.WriteValue("source"_s, compileResult.SourceDirectory); log.WriteValue("binary"_s, compileResult.BinaryDirectory); diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h index 6d29586..efd58e5 100644 --- a/Source/cmCoreTryCompile.h +++ b/Source/cmCoreTryCompile.h @@ -21,6 +21,8 @@ class cmRange; struct cmTryCompileResult { + cm::optional LogDescription; + std::string SourceDirectory; std::string BinaryDirectory; @@ -71,6 +73,7 @@ public: cm::optional OutputVariable; cm::optional CopyFileTo; cm::optional CopyFileError; + cm::optional> LogDescription; bool NoCache = false; // Argument for try_run only. diff --git a/Tests/RunCMake/try_compile/ConfigureLog-config.txt b/Tests/RunCMake/try_compile/ConfigureLog-config.txt index 6ed3bfe..caf8a71 100644 --- a/Tests/RunCMake/try_compile/ConfigureLog-config.txt +++ b/Tests/RunCMake/try_compile/ConfigureLog-config.txt @@ -21,6 +21,7 @@ events: backtrace: - "ConfigureLog.cmake:[0-9]+ \(try_compile\)" - "CMakeLists.txt:[0-9]+ \(include\)" + description: "Source that should not compile\." directories: source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" @@ -34,6 +35,7 @@ events: backtrace: - "ConfigureLog.cmake:[0-9]+ \(try_compile\)" - "CMakeLists.txt:[0-9]+ \(include\)" + description: "Source that should compile\." directories: source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" diff --git a/Tests/RunCMake/try_compile/ConfigureLog.cmake b/Tests/RunCMake/try_compile/ConfigureLog.cmake index f475014..4502d24 100644 --- a/Tests/RunCMake/try_compile/ConfigureLog.cmake +++ b/Tests/RunCMake/try_compile/ConfigureLog.cmake @@ -2,8 +2,10 @@ enable_language(C) try_compile(COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-bad.c + LOG_DESCRIPTION "Source that should not compile." ) try_compile(COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c + LOG_DESCRIPTION "Source that should compile." ) diff --git a/Tests/RunCMake/try_compile/EmptyValueArgs-stderr.txt b/Tests/RunCMake/try_compile/EmptyValueArgs-stderr.txt index b1344bd..b03e0b3 100644 --- a/Tests/RunCMake/try_compile/EmptyValueArgs-stderr.txt +++ b/Tests/RunCMake/try_compile/EmptyValueArgs-stderr.txt @@ -7,3 +7,11 @@ CMake Error at EmptyValueArgs.cmake:[0-9]+ \(try_compile\): COPY_FILE_ERROR must be followed by a variable name Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) ++ +CMake Error at EmptyValueArgs.cmake:[0-9]+ \(try_compile\): + Error after keyword "LOG_DESCRIPTION": + + empty string not allowed + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/try_compile/EmptyValueArgs.cmake b/Tests/RunCMake/try_compile/EmptyValueArgs.cmake index fda4f10..f0052c5 100644 --- a/Tests/RunCMake/try_compile/EmptyValueArgs.cmake +++ b/Tests/RunCMake/try_compile/EmptyValueArgs.cmake @@ -5,3 +5,6 @@ try_compile(RESULT ${try_compile_bindir_or_SOURCES} try_compile(RESULT ${try_compile_bindir_or_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/src.c COPY_FILE "x" COPY_FILE_ERROR "") +try_compile(RESULT ${try_compile_bindir_or_SOURCES} + ${CMAKE_CURRENT_SOURCE_DIR}/src.c + LOG_DESCRIPTION "") diff --git a/Tests/RunCMake/try_compile/NoLogDescription-result.txt b/Tests/RunCMake/try_compile/NoLogDescription-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/try_compile/NoLogDescription-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/try_compile/NoLogDescription-stderr.txt b/Tests/RunCMake/try_compile/NoLogDescription-stderr.txt new file mode 100644 index 0000000..9005bcd --- /dev/null +++ b/Tests/RunCMake/try_compile/NoLogDescription-stderr.txt @@ -0,0 +1,7 @@ +CMake Error at NoLogDescription.cmake:[0-9]+ \(try_compile\): + Error after keyword "LOG_DESCRIPTION": + + missing required value + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/try_compile/NoLogDescription.cmake b/Tests/RunCMake/try_compile/NoLogDescription.cmake new file mode 100644 index 0000000..904763f --- /dev/null +++ b/Tests/RunCMake/try_compile/NoLogDescription.cmake @@ -0,0 +1,4 @@ +include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS}) +try_compile(RESULT ${try_compile_bindir_or_SOURCES} + ${CMAKE_CURRENT_SOURCE_DIR}/src.c + LOG_DESCRIPTION) diff --git a/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake b/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake index 3158e32..0e4cc20 100644 --- a/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake +++ b/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake @@ -12,6 +12,7 @@ run_cmake(NoCopyFile) run_cmake(NoCopyFile2) run_cmake(NoCopyFileError) run_cmake(NoCStandard) +run_cmake(NoLogDescription) run_cmake(NoOutputVariable) run_cmake(NoOutputVariable2) run_cmake(BadLinkLibraries) diff --git a/Tests/RunCMake/try_run/ConfigureLog-config.txt b/Tests/RunCMake/try_run/ConfigureLog-config.txt index 602437e..18903d8 100644 --- a/Tests/RunCMake/try_run/ConfigureLog-config.txt +++ b/Tests/RunCMake/try_run/ConfigureLog-config.txt @@ -20,6 +20,7 @@ events: backtrace: - "ConfigureLog.cmake:[0-9]+ \(try_run\)" - "CMakeLists.txt:[0-9]+ \(include\)" + description: "Source that should not compile\." directories: source: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" @@ -36,6 +37,7 @@ events: backtrace: - "ConfigureLog.cmake:[0-9]+ \(try_run\)" - "CMakeLists.txt:[0-9]+ \(include\)" + description: "Source that should compile\." directories: source: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" diff --git a/Tests/RunCMake/try_run/ConfigureLog.cmake b/Tests/RunCMake/try_run/ConfigureLog.cmake index 4b5c7cb..8a4b8a7 100644 --- a/Tests/RunCMake/try_run/ConfigureLog.cmake +++ b/Tests/RunCMake/try_run/ConfigureLog.cmake @@ -1,9 +1,11 @@ try_run(RUN_RESULT COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-bad.c + LOG_DESCRIPTION "Source that should not compile." ) try_run(RUN_RESULT COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c + LOG_DESCRIPTION "Source that should compile." ) try_run(RUN_RESULT COMPILE_RESULT -- cgit v0.12 From d4bf7d80c618930e6b88c35d271a5b0a0656bb7b Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 16 Jan 2023 11:49:35 -0500 Subject: try_compile: Add a NO_LOG option to skip recording in the configure log --- Help/command/try_compile.rst | 9 +++++++++ Help/command/try_run.rst | 2 ++ Help/release/dev/configure-log.rst | 4 ++++ Source/cmCoreTryCompile.cxx | 1 + Source/cmCoreTryCompile.h | 1 + Source/cmTryCompileCommand.cxx | 7 ++++--- Source/cmTryRunCommand.cxx | 2 +- Tests/RunCMake/try_compile/ConfigureLog.cmake | 5 +++++ Tests/RunCMake/try_run/ConfigureLog.cmake | 5 +++++ 9 files changed, 32 insertions(+), 4 deletions(-) diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst index 208be46..8f6a4eb 100644 --- a/Help/command/try_compile.rst +++ b/Help/command/try_compile.rst @@ -20,6 +20,7 @@ Try Compiling Whole Projects [TARGET ] [LOG_DESCRIPTION ] [NO_CACHE] + [NO_LOG] [CMAKE_FLAGS ...] [OUTPUT_VARIABLE ]) @@ -50,6 +51,7 @@ which was present in older versions of CMake: [] [LOG_DESCRIPTION ] [NO_CACHE] + [NO_LOG] [CMAKE_FLAGS ...] [OUTPUT_VARIABLE ]) @@ -67,6 +69,7 @@ Try Compiling Source Files SOURCE_FROM_FILE >... [LOG_DESCRIPTION ] [NO_CACHE] + [NO_LOG] [CMAKE_FLAGS ...] [COMPILE_DEFINITIONS ...] [LINK_OPTIONS ...] @@ -120,6 +123,7 @@ which was present in older versions of CMake: try_compile( [LOG_DESCRIPTION ] [NO_CACHE] + [NO_LOG] [CMAKE_FLAGS ...] [COMPILE_DEFINITIONS ...] [LINK_OPTIONS ...] @@ -201,6 +205,11 @@ The options are: the test is part of a larger inspection), ``NO_CACHE`` may be useful to avoid leaking the intermediate result variable into the cache. +``NO_LOG`` + .. versionadded:: 3.26 + + Do not record a :manual:`cmake-configure-log(7)` entry for this call. + ``OUTPUT_VARIABLE `` Store the output from the build process in the given variable. diff --git a/Help/command/try_run.rst b/Help/command/try_run.rst index ab4742e..ef8ec96 100644 --- a/Help/command/try_run.rst +++ b/Help/command/try_run.rst @@ -19,6 +19,7 @@ Try Compiling and Running Source Files SOURCE_FROM_FILE >... [LOG_DESCRIPTION ] [NO_CACHE] + [NO_LOG] [CMAKE_FLAGS ...] [COMPILE_DEFINITIONS ...] [LINK_OPTIONS ...] @@ -58,6 +59,7 @@ which was present in older versions of CMake: [LOG_DESCRIPTION ] [NO_CACHE] + [NO_LOG] [CMAKE_FLAGS ...] [COMPILE_DEFINITIONS ...] [LINK_OPTIONS ...] diff --git a/Help/release/dev/configure-log.rst b/Help/release/dev/configure-log.rst index 298137b..f802a8c 100644 --- a/Help/release/dev/configure-log.rst +++ b/Help/release/dev/configure-log.rst @@ -10,3 +10,7 @@ Configure Log * The :command:`try_compile` and :command:`try_run` commands gained a ``LOG_DESCRIPTION`` option specifying text to be recorded in the :manual:`cmake-configure-log(7)`. + +* The :command:`try_compile` and :command:`try_run` commands gained a + ``NO_LOG`` option to skip recording a :manual:`cmake-configure-log(7)` + entry. diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 29f6a98..2084b33 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -153,6 +153,7 @@ auto const TryCompileBaseArgParser = .Bind(0, &Arguments::CompileResultVariable) .Bind("LOG_DESCRIPTION"_s, &Arguments::LogDescription) .Bind("NO_CACHE"_s, &Arguments::NoCache) + .Bind("NO_LOG"_s, &Arguments::NoLog) .Bind("CMAKE_FLAGS"_s, &Arguments::CMakeFlags) .Bind("__CMAKE_INTERNAL"_s, &Arguments::CMakeInternal) /* keep semicolon on own line */; diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h index efd58e5..1ec4405 100644 --- a/Source/cmCoreTryCompile.h +++ b/Source/cmCoreTryCompile.h @@ -75,6 +75,7 @@ public: cm::optional CopyFileError; cm::optional> LogDescription; bool NoCache = false; + bool NoLog = false; // Argument for try_run only. // Keep in sync with warnings in cmCoreTryCompile::ParseArgs. diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index c70c03e..ebbb4f2 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -81,14 +81,15 @@ bool cmTryCompileCommand(std::vector const& args, return true; } - if (cm::optional compileResult = - tc.TryCompileCode(arguments, targetType)) { + cm::optional compileResult = + tc.TryCompileCode(arguments, targetType); #ifndef CMAKE_BOOTSTRAP + if (compileResult && !arguments.NoLog) { if (cmConfigureLog* log = mf.GetCMakeInstance()->GetConfigureLog()) { WriteTryCompileEvent(*log, mf, *compileResult); } -#endif } +#endif // if They specified clean then we clean up what we can if (tc.SrcFileSignature) { diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index ef59c32..a8e8b48 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -246,7 +246,7 @@ bool TryRunCommandImpl::TryRunCode(std::vector const& argv) } #ifndef CMAKE_BOOTSTRAP - if (compileResult) { + if (compileResult && !arguments.NoLog) { cmMakefile const& mf = *(this->Makefile); if (cmConfigureLog* log = mf.GetCMakeInstance()->GetConfigureLog()) { WriteTryRunEvent(*log, mf, *compileResult, runResult); diff --git a/Tests/RunCMake/try_compile/ConfigureLog.cmake b/Tests/RunCMake/try_compile/ConfigureLog.cmake index 4502d24..511ade9 100644 --- a/Tests/RunCMake/try_compile/ConfigureLog.cmake +++ b/Tests/RunCMake/try_compile/ConfigureLog.cmake @@ -7,5 +7,10 @@ try_compile(COMPILE_RESULT try_compile(COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c + NO_LOG + ) + +try_compile(COMPILE_RESULT + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c LOG_DESCRIPTION "Source that should compile." ) diff --git a/Tests/RunCMake/try_run/ConfigureLog.cmake b/Tests/RunCMake/try_run/ConfigureLog.cmake index 8a4b8a7..e39310c 100644 --- a/Tests/RunCMake/try_run/ConfigureLog.cmake +++ b/Tests/RunCMake/try_run/ConfigureLog.cmake @@ -5,6 +5,11 @@ try_run(RUN_RESULT COMPILE_RESULT try_run(RUN_RESULT COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c + NO_LOG + ) + +try_run(RUN_RESULT COMPILE_RESULT + SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c LOG_DESCRIPTION "Source that should compile." ) -- cgit v0.12 From 48292c8624b901a842b6d4f8a88ca00f898e5639 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 13 Jan 2023 11:55:56 -0500 Subject: try_compile: Record stack of in-progess checks in configure log Many `try_compile` and `try_run` calls occur inside check modules between `message(CHECK_START)` and `message(CHECK_{PASS,FAIL})` pairs. Add a field to configure log entries to report this context. Issue: #23200 --- Help/manual/cmake-configure-log.7.rst | 13 +++++++++++++ Source/cmConfigureLog.cxx | 16 ++++++++++++++++ Source/cmConfigureLog.h | 1 + Source/cmTryCompileCommand.cxx | 1 + Source/cmTryRunCommand.cxx | 1 + Source/cmake.h | 4 ++++ Tests/RunCMake/try_compile/ConfigureLog-config.txt | 5 +++++ Tests/RunCMake/try_compile/ConfigureLog-stdout.txt | 4 ++++ Tests/RunCMake/try_compile/ConfigureLog.cmake | 9 +++++++++ Tests/RunCMake/try_compile/Inspect-config.txt | 4 ++++ Tests/RunCMake/try_run/ConfigureLog-config.txt | 7 +++++++ Tests/RunCMake/try_run/ConfigureLog-stdout.txt | 4 ++++ Tests/RunCMake/try_run/ConfigureLog.cmake | 9 +++++++++ 13 files changed, 78 insertions(+) create mode 100644 Tests/RunCMake/try_compile/ConfigureLog-stdout.txt create mode 100644 Tests/RunCMake/try_run/ConfigureLog-stdout.txt diff --git a/Help/manual/cmake-configure-log.7.rst b/Help/manual/cmake-configure-log.7.rst index 98f20ff..2620124 100644 --- a/Help/manual/cmake-configure-log.7.rst +++ b/Help/manual/cmake-configure-log.7.rst @@ -106,6 +106,8 @@ Every event kind is represented by a YAML mapping of the form: kind: "-v" backtrace: - ": ()" + checks: + - "Checking for something" #...event-specific keys... The keys common to all events are: @@ -119,6 +121,13 @@ The keys common to all events are: least-recent. Each node is a string specifying one location formatted as ``: ()``. +``checks`` + An optional key that is present when the event occurred with + at least one pending :command:`message(CHECK_START)`. Its value + is a YAML block sequence reporting the stack of pending checks, + from most-recent to least-recent. Each node is a string containing + a pending check message. + Additional mapping keys are specific to each (versioned) event kind, described below. @@ -141,6 +150,8 @@ A ``try_compile-v1`` event is a YAML mapping: kind: "try_compile-v1" backtrace: - "CMakeLists.txt:123 (try_compile)" + checks: + - "Checking for something" description: "Explicit LOG_DESCRIPTION" directories: source: "/path/to/.../TryCompile-01234" @@ -212,6 +223,8 @@ A ``try_run-v1`` event is a YAML mapping: kind: "try_run-v1" backtrace: - "CMakeLists.txt:456 (try_run)" + checks: + - "Checking for something" description: "Explicit LOG_DESCRIPTION" directories: source: "/path/to/.../TryCompile-56789" diff --git a/Source/cmConfigureLog.cxx b/Source/cmConfigureLog.cxx index c2a5b5e..1b00b4f 100644 --- a/Source/cmConfigureLog.cxx +++ b/Source/cmConfigureLog.cxx @@ -17,6 +17,7 @@ #include "cmListFileCache.h" #include "cmMakefile.h" +#include "cmRange.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include "cmake.h" @@ -78,6 +79,21 @@ void cmConfigureLog::WriteBacktrace(cmMakefile const& mf) this->WriteValue("backtrace"_s, backtrace); } +void cmConfigureLog::WriteChecks(cmMakefile const& mf) +{ + if (!mf.GetCMakeInstance()->HasCheckInProgress()) { + return; + } + this->BeginObject("checks"_s); + for (auto const& value : + cmReverseRange(mf.GetCMakeInstance()->GetCheckInProgressMessages())) { + this->BeginLine() << "- "; + this->Encoder->write(value, &this->Stream); + this->EndLine(); + } + this->EndObject(); +} + void cmConfigureLog::EnsureInit() { if (this->Opened) { diff --git a/Source/cmConfigureLog.h b/Source/cmConfigureLog.h index 9caac66..d672445 100644 --- a/Source/cmConfigureLog.h +++ b/Source/cmConfigureLog.h @@ -29,6 +29,7 @@ public: bool IsAnyLogVersionEnabled(std::vector const& v) const; void WriteBacktrace(cmMakefile const& mf); + void WriteChecks(cmMakefile const& mf); void EnsureInit(); diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx index ebbb4f2..789ffe9 100644 --- a/Source/cmTryCompileCommand.cxx +++ b/Source/cmTryCompileCommand.cxx @@ -27,6 +27,7 @@ void WriteTryCompileEvent(cmConfigureLog& log, cmMakefile const& mf, if (log.IsAnyLogVersionEnabled(LogVersionsWithTryCompileV1)) { log.BeginEvent("try_compile-v1"); log.WriteBacktrace(mf); + log.WriteChecks(mf); cmCoreTryCompile::WriteTryCompileEventFields(log, compileResult); log.EndEvent(); } diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index a8e8b48..21bd95a 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -46,6 +46,7 @@ void WriteTryRunEvent(cmConfigureLog& log, cmMakefile const& mf, if (log.IsAnyLogVersionEnabled(LogVersionsWithTryRunV1)) { log.BeginEvent("try_run-v1"); log.WriteBacktrace(mf); + log.WriteChecks(mf); cmCoreTryCompile::WriteTryCompileEventFields(log, compileResult); log.BeginObject("runResult"_s); diff --git a/Source/cmake.h b/Source/cmake.h index 12160ad..d1f388a 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -479,6 +479,10 @@ public: { this->CheckInProgressMessages.emplace_back(std::move(message)); } + std::vector const& GetCheckInProgressMessages() const + { + return this->CheckInProgressMessages; + } //! Should `message` command display context. bool GetShowLogContext() const { return this->LogContext; } diff --git a/Tests/RunCMake/try_compile/ConfigureLog-config.txt b/Tests/RunCMake/try_compile/ConfigureLog-config.txt index caf8a71..262ed3c 100644 --- a/Tests/RunCMake/try_compile/ConfigureLog-config.txt +++ b/Tests/RunCMake/try_compile/ConfigureLog-config.txt @@ -8,6 +8,8 @@ events: - "[^"]*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(CMAKE_DETERMINE_COMPILER_ABI\)" - "ConfigureLog.cmake:[0-9]+ \(enable_language\)" - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Detecting C compiler ABI info" directories: source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" @@ -35,6 +37,9 @@ events: backtrace: - "ConfigureLog.cmake:[0-9]+ \(try_compile\)" - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Check 2" + - "Check 1" description: "Source that should compile\." directories: source: "[^"]*/Tests/RunCMake/try_compile/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" diff --git a/Tests/RunCMake/try_compile/ConfigureLog-stdout.txt b/Tests/RunCMake/try_compile/ConfigureLog-stdout.txt new file mode 100644 index 0000000..ba32642 --- /dev/null +++ b/Tests/RunCMake/try_compile/ConfigureLog-stdout.txt @@ -0,0 +1,4 @@ +-- Check 1 +-- Check 2 +-- Check 2 - passed +-- Check 1 - passed diff --git a/Tests/RunCMake/try_compile/ConfigureLog.cmake b/Tests/RunCMake/try_compile/ConfigureLog.cmake index 511ade9..294e0f9 100644 --- a/Tests/RunCMake/try_compile/ConfigureLog.cmake +++ b/Tests/RunCMake/try_compile/ConfigureLog.cmake @@ -10,7 +10,16 @@ try_compile(COMPILE_RESULT NO_LOG ) +message(CHECK_START "Check 1") +message(CHECK_START "Check 2") try_compile(COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c LOG_DESCRIPTION "Source that should compile." ) +if (COMPILE_RESULT) + message(CHECK_PASS "passed") + message(CHECK_PASS "passed") +else() + message(CHECK_FAIL "failed") + message(CHECK_FAIL "failed") +endif() diff --git a/Tests/RunCMake/try_compile/Inspect-config.txt b/Tests/RunCMake/try_compile/Inspect-config.txt index 47169cf..e09fe55 100644 --- a/Tests/RunCMake/try_compile/Inspect-config.txt +++ b/Tests/RunCMake/try_compile/Inspect-config.txt @@ -8,6 +8,8 @@ events: - "[^"]*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(CMAKE_DETERMINE_COMPILER_ABI\)" - "Inspect.cmake:[0-9]+ \(enable_language\)" - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Detecting C compiler ABI info" directories: source: "[^"]*/Tests/RunCMake/try_compile/Inspect-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_compile/Inspect-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" @@ -23,6 +25,8 @@ events: - "[^"]*/Modules/CMakeTestCXXCompiler.cmake:[0-9]+ \(CMAKE_DETERMINE_COMPILER_ABI\)" - "Inspect.cmake:[0-9]+ \(enable_language\)" - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Detecting CXX compiler ABI info" directories: source: "[^"]*/Tests/RunCMake/try_compile/Inspect-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_compile/Inspect-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" diff --git a/Tests/RunCMake/try_run/ConfigureLog-config.txt b/Tests/RunCMake/try_run/ConfigureLog-config.txt index 18903d8..ba396e0 100644 --- a/Tests/RunCMake/try_run/ConfigureLog-config.txt +++ b/Tests/RunCMake/try_run/ConfigureLog-config.txt @@ -7,6 +7,8 @@ events: - "[^"]*/Modules/CMakeDetermineCompilerABI.cmake:[0-9]+ \(try_compile\)" - "[^"]*/Modules/CMakeTestCCompiler.cmake:[0-9]+ \(CMAKE_DETERMINE_COMPILER_ABI\)" - "CMakeLists.txt:[0-9]+ \(project\)" + checks: + - "Detecting C compiler ABI info" directories: source: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" @@ -37,6 +39,8 @@ events: backtrace: - "ConfigureLog.cmake:[0-9]+ \(try_run\)" - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Check 1" description: "Source that should compile\." directories: source: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" @@ -59,6 +63,9 @@ events: backtrace: - "ConfigureLog.cmake:[0-9]+ \(try_run\)" - "CMakeLists.txt:[0-9]+ \(include\)" + checks: + - "Check 2" + - "Check 1" directories: source: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" binary: "[^"]*/Tests/RunCMake/try_run/ConfigureLog-build/CMakeFiles/CMakeScratch/TryCompile-[^/]+" diff --git a/Tests/RunCMake/try_run/ConfigureLog-stdout.txt b/Tests/RunCMake/try_run/ConfigureLog-stdout.txt new file mode 100644 index 0000000..ba32642 --- /dev/null +++ b/Tests/RunCMake/try_run/ConfigureLog-stdout.txt @@ -0,0 +1,4 @@ +-- Check 1 +-- Check 2 +-- Check 2 - passed +-- Check 1 - passed diff --git a/Tests/RunCMake/try_run/ConfigureLog.cmake b/Tests/RunCMake/try_run/ConfigureLog.cmake index e39310c..6635d73 100644 --- a/Tests/RunCMake/try_run/ConfigureLog.cmake +++ b/Tests/RunCMake/try_run/ConfigureLog.cmake @@ -8,15 +8,24 @@ try_run(RUN_RESULT COMPILE_RESULT NO_LOG ) +message(CHECK_START "Check 1") try_run(RUN_RESULT COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c LOG_DESCRIPTION "Source that should compile." ) +message(CHECK_START "Check 2") try_run(RUN_RESULT COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c RUN_OUTPUT_VARIABLE RUN_OUTPUT ) +if (RUN_RESULT) + message(CHECK_PASS "passed") + message(CHECK_PASS "passed") +else() + message(CHECK_FAIL "failed") + message(CHECK_FAIL "failed") +endif() try_run(RUN_RESULT COMPILE_RESULT SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c -- cgit v0.12