diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 1e25ba1ca..8e1e88dcd 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1884,15 +1884,14 @@ int cmCTest::RunCMakeAndTest(std::string* outstring) makeCommand += " -project "; makeCommand += m_BuildProject; makeCommand += ".xcode"; - makeCommand += " build "; + makeCommand += " build -target "; if (m_BuildTarget.size()) { - makeCommand += "-target "; makeCommand += m_BuildTarget; } else { - makeCommand += "-alltargets "; + makeCommand += "ALL_BUILD "; } makeCommand += " -buildstyle Development "; } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 714f441f5..f5ca5329e 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -110,12 +110,15 @@ int cmGlobalXCodeGenerator::TryCompile(const char *, makeCommand += " -project "; makeCommand += projectName; makeCommand += ".xcode"; - makeCommand += " build "; + makeCommand += " build -target "; if (targetName) { - makeCommand += "-target "; makeCommand += targetName; } + else + { + makeCommand += "ALL_BUILD"; + } makeCommand += " -buildstyle Development "; makeCommand += " SYMROOT="; makeCommand += cmSystemTools::ConvertToOutputPath(bindir);