Browse Source

ENH: Improved error message when a wrong generator is selected.

Brad King 22 năm trước cách đây
mục cha
commit
a30148e640
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      Source/cmGlobalGenerator.cxx

+ 6 - 1
Source/cmGlobalGenerator.cxx

@@ -57,7 +57,12 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
   if(!mf->GetDefinition("CMAKE_MAKE_PROGRAM")
      || cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM")))
     {
-    cmSystemTools::Error("EnableLanguage was unable to find a CMAKE_MAKE_PROGRAM");
+    cmSystemTools::Error("CMake was unable to find a build program "
+                         "corresponding to the generator you have selected.  "
+                         "CMAKE_MAKE_PROGRAM is not set.  You probably "
+                         "need to re-run CMake and select a different "
+                         "generator.");
+    cmSystemTools::SetFatalErrorOccured();
     return;
     }
   std::string makeProgram = mf->GetDefinition("CMAKE_MAKE_PROGRAM");