diff options
author | Florian Maushart <FloriansGit@online.ms> | 2018-06-26 19:24:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-25 13:21:13 (GMT) |
commit | 3ca44029668c057fb208c5f153c4d398bee954cb (patch) | |
tree | c5513b35cad0368b985ffed33f8050112eec52ab /Source/cmGlobalXCodeGenerator.cxx | |
parent | cb6c233eccfbb600ec16716224062627df2ff2c0 (diff) | |
download | CMake-3ca44029668c057fb208c5f153c4d398bee954cb.zip CMake-3ca44029668c057fb208c5f153c4d398bee954cb.tar.gz CMake-3ca44029668c057fb208c5f153c4d398bee954cb.tar.bz2 |
ctest: Fix --build-and-test without --build-target on Xcode
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e9b82cf..97d8bdb 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -348,11 +348,13 @@ void cmGlobalXCodeGenerator::GenerateBuildCommand( makeCommand.add( this->SelectMakeProgram(makeProgram, this->GetXcodeBuildCommand())); - makeCommand.add("-project"); - std::string projectArg = projectName; - projectArg += ".xcode"; - projectArg += "proj"; - makeCommand.add(projectArg); + if (!projectName.empty()) { + makeCommand.add("-project"); + std::string projectArg = projectName; + projectArg += ".xcode"; + projectArg += "proj"; + makeCommand.add(projectArg); + } bool clean = false; std::string realTarget = targetName; |