Sfoglia il codice sorgente

cmakemain: use script role for -P

Daniel Pfeifer 8 anni fa
parent
commit
a890ca2f8d
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      Source/cmakemain.cxx

+ 3 - 1
Source/cmakemain.cxx

@@ -289,7 +289,9 @@ int do_cmake(int ac, char const* const* av)
     int ret = cm.GetSystemInformation(args);
     return ret;
   }
-  cmake cm(cmake::RoleProject);
+  cmake::Role const role =
+    workingMode == cmake::NORMAL_MODE ? cmake::RoleProject : cmake::RoleScript;
+  cmake cm(role);
   cm.SetHomeDirectory("");
   cm.SetHomeOutputDirectory("");
   cmSystemTools::SetMessageCallback(cmakemainMessageCallback, (void*)&cm);