Browse Source

Merge topic 'configure-log'

317aac14ef cmake: Stop pointing users at logs on configure errors
eae1398d09 cmake --system-information: Stop dumping CMake{Output,Error}.log

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !8094
Brad King 3 years ago
parent
commit
06c7e88b91

+ 0 - 2
Modules/SystemInformation.cmake

@@ -83,8 +83,6 @@ macro(DUMP_FILE THE_FILE)
 endmacro()
 endmacro()
 
 
 DUMP_FILE("../CMakeCache.txt")
 DUMP_FILE("../CMakeCache.txt")
-DUMP_FILE("../CMakeFiles/CMakeOutput.log")
-DUMP_FILE("../CMakeFiles/CMakeError.log")
 DUMP_FILE("../CMakeFiles/CMakeSystem.cmake")
 DUMP_FILE("../CMakeFiles/CMakeSystem.cmake")
 
 
 foreach (EXTRA_FILE ${EXTRA_DUMP_FILES})
 foreach (EXTRA_FILE ${EXTRA_DUMP_FILES})

+ 0 - 8
Source/cmGlobalGenerator.cxx

@@ -1360,14 +1360,6 @@ void cmGlobalGenerator::Configure()
     std::ostringstream msg;
     std::ostringstream msg;
     if (cmSystemTools::GetErrorOccurredFlag()) {
     if (cmSystemTools::GetErrorOccurredFlag()) {
       msg << "Configuring incomplete, errors occurred!";
       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 {
     } else {
       auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(
       auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(
         endTime - startTime);
         endTime - startTime);

+ 0 - 3
Source/cmake.cxx

@@ -2416,9 +2416,6 @@ int cmake::ActualConfigure()
   // info to save time
   // info to save time
   if (!this->GetIsInTryCompile()) {
   if (!this->GetIsInTryCompile()) {
     this->GlobalGenerator->ClearEnabledLanguages();
     this->GlobalGenerator->ClearEnabledLanguages();
-
-    this->TruncateOutputLog("CMakeOutput.log");
-    this->TruncateOutputLog("CMakeError.log");
   }
   }
 
 
 #if !defined(CMAKE_BOOTSTRAP)
 #if !defined(CMAKE_BOOTSTRAP)

+ 0 - 1
Tests/RunCMake/Configure/ErrorLogs-result.txt

@@ -1 +0,0 @@
-1

+ 0 - 4
Tests/RunCMake/Configure/ErrorLogs-stderr.txt

@@ -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\)

+ 0 - 3
Tests/RunCMake/Configure/ErrorLogs-stdout.txt

@@ -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"\.

+ 0 - 5
Tests/RunCMake/Configure/ErrorLogs.cmake

@@ -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!")

+ 0 - 1
Tests/RunCMake/Configure/RunCMakeTest.cmake

@@ -3,7 +3,6 @@ include(RunCMake)
 run_cmake(ContinueAfterError)
 run_cmake(ContinueAfterError)
 run_cmake(CopyFileABI)
 run_cmake(CopyFileABI)
 run_cmake(CustomTargetAfterError)
 run_cmake(CustomTargetAfterError)
-run_cmake(ErrorLogs)
 
 
 # Use a single build tree for a few tests without cleaning.
 # Use a single build tree for a few tests without cleaning.
 set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RerunCMake-build)
 set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/RerunCMake-build)