Parcourir la source

BUG: fix for unused variable

Ken Martin il y a 18 ans
Parent
commit
42c41d77fa
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      Source/cmake.cxx

+ 7 - 1
Source/cmake.cxx

@@ -2975,7 +2975,13 @@ int cmake::GetSystemInformation(std::vector<std::string>& args)
   resultArg += resultFile;
   args2.push_back(resultArg);
   int res = cm.Run(args2, false);
-  
+
+  if (res != 0)
+    {
+    std::cerr << "Error: --system-information failed on internal CMake!\n";
+    return res;
+    }
+
   // change back to the original directory
   cmSystemTools::ChangeDirectory(cwd.c_str());