diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-20 23:17:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-26 14:04:03 (GMT) |
commit | 5a06efda05feda02511592c76134ee8ed3e8b650 (patch) | |
tree | 4bd8dca46fcc5f1af0bb5c92792ab33b103e02f6 /Source/cmGlobalXCodeGenerator.cxx | |
parent | ea1bed34b2ba16f3971b90996dc345834f0d9699 (diff) | |
download | CMake-5a06efda05feda02511592c76134ee8ed3e8b650.zip CMake-5a06efda05feda02511592c76134ee8ed3e8b650.tar.gz CMake-5a06efda05feda02511592c76134ee8ed3e8b650.tar.bz2 |
cmMakefile: Remove AddUtilityCommand overload without byproducts
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e4dff78..4202175 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -497,12 +497,15 @@ void cmGlobalXCodeGenerator::AddExtraTargets( { cmMakefile* mf = root->GetMakefile(); - // Add ALL_BUILD const char* no_working_directory = nullptr; + std::vector<std::string> no_byproducts; std::vector<std::string> no_depends; + + // Add ALL_BUILD cmTarget* allbuild = mf->AddUtilityCommand( "ALL_BUILD", cmCommandOrigin::Generator, true, no_working_directory, - no_depends, cmMakeSingleCommandLine({ "echo", "Build all projects" })); + no_byproducts, no_depends, + cmMakeSingleCommandLine({ "echo", "Build all projects" })); cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root); root->AddGeneratorTarget(allBuildGt); @@ -526,7 +529,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets( cmSystemTools::ReplaceString(file, "\\ ", " "); cmTarget* check = mf->AddUtilityCommand( CMAKE_CHECK_BUILD_SYSTEM_TARGET, cmCommandOrigin::Generator, true, - no_working_directory, no_depends, + no_working_directory, no_byproducts, no_depends, cmMakeSingleCommandLine({ "make", "-f", file })); cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root); @@ -541,9 +544,8 @@ void cmGlobalXCodeGenerator::AddExtraTargets( continue; } - std::string targetName = target->GetName(); - - if (regenerate && (targetName != CMAKE_CHECK_BUILD_SYSTEM_TARGET)) { + if (regenerate && + (target->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET)) { target->Target->AddUtility(CMAKE_CHECK_BUILD_SYSTEM_TARGET); } @@ -554,7 +556,6 @@ void cmGlobalXCodeGenerator::AddExtraTargets( if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) { commandLines.front().back() = // fill placeholder this->PostBuildMakeTarget(target->GetName(), "$(CONFIGURATION)"); - std::vector<std::string> no_byproducts; gen->GetMakefile()->AddCustomCommandToTarget( target->GetName(), no_byproducts, no_depends, commandLines, cmCustomCommandType::POST_BUILD, "Depend check for xcode", |