Преглед на файлове

CMake: Internally uses -S instead of -H to specify source directory

Robert Maynard преди 7 години
родител
ревизия
de962cc00d

+ 1 - 1
Source/QtDialog/CMakeSetup.cxx

@@ -150,7 +150,7 @@ int main(int argc, char** argv)
   typedef cmsys::CommandLineArguments argT;
   arg.AddArgument("-B", argT::CONCAT_ARGUMENT, &binaryDirectory,
                   "Binary Directory");
-  arg.AddArgument("-H", argT::CONCAT_ARGUMENT, &sourceDirectory,
+  arg.AddArgument("-S", argT::CONCAT_ARGUMENT, &sourceDirectory,
                   "Source Directory");
   // do not complain about unknown options
   arg.StoreUnusedArguments(true);

+ 2 - 2
Source/cmGlobalGenerator.cxx

@@ -2430,7 +2430,7 @@ void cmGlobalGenerator::AddGlobalTarget_EditCache(
   std::string edit_cmd = this->GetEditCacheCommand();
   if (!edit_cmd.empty()) {
     singleLine.push_back(std::move(edit_cmd));
-    singleLine.push_back("-H$(CMAKE_SOURCE_DIR)");
+    singleLine.push_back("-S$(CMAKE_SOURCE_DIR)");
     singleLine.push_back("-B$(CMAKE_BINARY_DIR)");
     gti.Message = "Running CMake cache editor...";
     gti.UsesTerminal = true;
@@ -2460,7 +2460,7 @@ void cmGlobalGenerator::AddGlobalTarget_RebuildCache(
   gti.UsesTerminal = true;
   cmCustomCommandLine singleLine;
   singleLine.push_back(cmSystemTools::GetCMakeCommand());
-  singleLine.push_back("-H$(CMAKE_SOURCE_DIR)");
+  singleLine.push_back("-S$(CMAKE_SOURCE_DIR)");
   singleLine.push_back("-B$(CMAKE_BINARY_DIR)");
   gti.CommandLines.push_back(std::move(singleLine));
   targets.push_back(std::move(gti));

+ 1 - 1
Source/cmGlobalNinjaGenerator.cxx

@@ -1340,7 +1340,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
   std::ostringstream cmd;
   cmd << lg->ConvertToOutputFormat(cmSystemTools::GetCMakeCommand(),
                                    cmOutputConverter::SHELL)
-      << " -H"
+      << " -S"
       << lg->ConvertToOutputFormat(lg->GetSourceDirectory(),
                                    cmOutputConverter::SHELL)
       << " -B"

+ 3 - 3
Source/cmGlobalVisualStudio8Generator.cxx

@@ -177,9 +177,9 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
     // Create a rule to re-run CMake.
     cmCustomCommandLine commandLine;
     commandLine.push_back(cmSystemTools::GetCMakeCommand());
-    std::string argH = "-H";
-    argH += lg->GetSourceDirectory();
-    commandLine.push_back(argH);
+    std::string argS = "-S";
+    argS += lg->GetSourceDirectory();
+    commandLine.push_back(argS);
     std::string argB = "-B";
     argB += lg->GetBinaryDirectory();
     commandLine.push_back(argB);

+ 2 - 2
Source/cmLocalUnixMakefileGenerator3.cxx

@@ -773,7 +773,7 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom(
     std::string cmakefileName = cmake::GetCMakeFilesDirectoryPostSlash();
     cmakefileName += "Makefile.cmake";
     std::string runRule =
-      "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
+      "$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
     runRule += " --check-build-system ";
     runRule +=
       this->ConvertToOutputFormat(cmakefileName, cmOutputConverter::SHELL);
@@ -1684,7 +1684,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
     cmakefileName += "Makefile.cmake";
     {
       std::string runRule =
-        "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
+        "$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)";
       runRule += " --check-build-system ";
       runRule +=
         this->ConvertToOutputFormat(cmakefileName, cmOutputConverter::SHELL);

+ 1 - 1
Source/cmLocalVisualStudio7Generator.cxx

@@ -260,7 +260,7 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
   std::string comment = "Building Custom Rule ";
   comment += makefileIn;
   std::string args;
-  args = "-H";
+  args = "-S";
   args += this->GetSourceDirectory();
   commandLine.push_back(args);
   args = "-B";