diff options
author | Brad King <brad.king@kitware.com> | 2019-09-18 15:51:54 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-18 15:52:14 (GMT) |
commit | 1423507a71199fd76b457ad9b215a6caca70ee58 (patch) | |
tree | 15bfb34dfcec17ba96f8a85ef71efe9010f9a8ec /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 01cce69870ec7efbb8138f5345aa7ffed8b7ac12 (diff) | |
parent | 9c45b95ddde04d8429f08fd692d53f843a02d12b (diff) | |
download | CMake-1423507a71199fd76b457ad9b215a6caca70ee58.zip CMake-1423507a71199fd76b457ad9b215a6caca70ee58.tar.gz CMake-1423507a71199fd76b457ad9b215a6caca70ee58.tar.bz2 |
Merge topic 'command-line-make-functions'
9c45b95ddd cmMakefile: Remove unused AddUtilityCommand overload
7f3ecbe7d7 cmCustomCommandLine: Provide command line make functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3819
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 6c7fb2b..026f494 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -92,11 +92,8 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets() for (cmGeneratorTarget* l : tgts) { if (l->GetType() == cmStateEnums::GLOBAL_TARGET) { std::vector<std::string> no_depends; - cmCustomCommandLine force_command; - force_command.push_back("cd"); - force_command.push_back("."); - cmCustomCommandLines force_commands; - force_commands.push_back(force_command); + cmCustomCommandLines force_commands = + cmMakeSingleCommandLine({ "cd", "." }); std::string no_main_dependency; std::string force = cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles/", l->GetName(), "_force"); @@ -246,21 +243,15 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() std::unique(listFiles.begin(), listFiles.end()); listFiles.erase(new_end, listFiles.end()); + std::string argS = cmStrCat("-S", this->GetSourceDirectory()); + std::string argB = cmStrCat("-B", this->GetBinaryDirectory()); std::string stampName = cmStrCat(this->GetCurrentBinaryDirectory(), "/CMakeFiles/generate.stamp"); - cmCustomCommandLine commandLine; - commandLine.push_back(cmSystemTools::GetCMakeCommand()); + cmCustomCommandLines commandLines = + cmMakeSingleCommandLine({ cmSystemTools::GetCMakeCommand(), argS, argB, + "--check-stamp-file", stampName }); std::string comment = cmStrCat("Building Custom Rule ", makefileIn); - std::string args; - args = cmStrCat("-S", this->GetSourceDirectory()); - commandLine.push_back(args); - args = cmStrCat("-B", this->GetBinaryDirectory()); - commandLine.push_back(args); - commandLine.push_back("--check-stamp-file"); - commandLine.push_back(stampName); - cmCustomCommandLines commandLines; - commandLines.push_back(commandLine); - const char* no_working_directory = 0; + const char* no_working_directory = nullptr; std::string fullpathStampName = cmSystemTools::CollapseFullPath(stampName.c_str()); this->Makefile->AddCustomCommandToOutput( |