From eae1398d09e3d9f06c94213d0203b533c111606a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 16 Jan 2023 16:40:33 -0500 Subject: cmake --system-information: Stop dumping CMake{Output,Error}.log CMake no longer logs system information to these files. --- Modules/SystemInformation.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/Modules/SystemInformation.cmake b/Modules/SystemInformation.cmake index fbc32a8..97f3856 100644 --- a/Modules/SystemInformation.cmake +++ b/Modules/SystemInformation.cmake @@ -83,8 +83,6 @@ macro(DUMP_FILE THE_FILE) endmacro() DUMP_FILE("../CMakeCache.txt") -DUMP_FILE("../CMakeFiles/CMakeOutput.log") -DUMP_FILE("../CMakeFiles/CMakeError.log") DUMP_FILE("../CMakeFiles/CMakeSystem.cmake") foreach (EXTRA_FILE ${EXTRA_DUMP_FILES}) -- cgit v0.12 From 317aac14efde7c8026c40b154cab237ceee4d0b0 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 16 Jan 2023 17:57:56 -0500 Subject: cmake: Stop pointing users at logs on configure errors Since commit 18e1bfbb3c (cmake: On configure error suggest looking at CMake*.log files, 2013-07-09, v2.8.12~210^2), when configuring a project fails, we print `See also .../CMake{Output,Error}.log` near the end of the output. This was intended to help users find failures in system and compiler inspection checks, but for normal project errors the messages may be misleading. The logs may contain incidental errors that are part of normal operation and do not need to be addressed by the user. Since commit f6ed2585e5 (Modules: Record system inspection steps in the configure log, 2023-01-16), CMake's builtin modules no longer log information to the old-style `CMake{Output,Error}.log` files anyway, so stop mentioning them. Fixes: #22131 Issue: #23200 --- Source/cmGlobalGenerator.cxx | 8 -------- Source/cmake.cxx | 3 --- Tests/RunCMake/Configure/ErrorLogs-result.txt | 1 - Tests/RunCMake/Configure/ErrorLogs-stderr.txt | 4 ---- Tests/RunCMake/Configure/ErrorLogs-stdout.txt | 3 --- Tests/RunCMake/Configure/ErrorLogs.cmake | 5 ----- Tests/RunCMake/Configure/RunCMakeTest.cmake | 1 - 7 files changed, 25 deletions(-) delete mode 100644 Tests/RunCMake/Configure/ErrorLogs-result.txt delete mode 100644 Tests/RunCMake/Configure/ErrorLogs-stderr.txt delete mode 100644 Tests/RunCMake/Configure/ErrorLogs-stdout.txt delete mode 100644 Tests/RunCMake/Configure/ErrorLogs.cmake diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 40234b1..2eecdc0 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1354,14 +1354,6 @@ void cmGlobalGenerator::Configure() std::ostringstream msg; if (cmSystemTools::GetErrorOccurredFlag()) { msg << "Configuring incomplete, errors occurred!"; - const char* logs[] = { "CMakeOutput.log", "CMakeError.log", nullptr }; - for (const char** log = logs; *log; ++log) { - std::string f = cmStrCat(this->CMakeInstance->GetHomeOutputDirectory(), - "/CMakeFiles/", *log); - if (cmSystemTools::FileExists(f)) { - msg << "\nSee also \"" << f << "\"."; - } - } } else { msg << "Configuring done"; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 0d947a5..468ff73 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2416,9 +2416,6 @@ int cmake::ActualConfigure() // info to save time if (!this->GetIsInTryCompile()) { this->GlobalGenerator->ClearEnabledLanguages(); - - this->TruncateOutputLog("CMakeOutput.log"); - this->TruncateOutputLog("CMakeError.log"); } #if !defined(CMAKE_BOOTSTRAP) 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 ec8c8c2..0000000 --- a/Tests/RunCMake/Configure/ErrorLogs-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -CMake Error at ErrorLogs.cmake:[0-9]+ \(message\): - Some error! -Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(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 3a9d107..0000000 --- a/Tests/RunCMake/Configure/ErrorLogs.cmake +++ /dev/null @@ -1,5 +0,0 @@ -file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Some detailed output information!\n") -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) -- cgit v0.12