diff options
author | Brad King <brad.king@kitware.com> | 2015-01-28 19:00:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-29 14:11:11 (GMT) |
commit | ab9fa54d4841e5b0eff8d241ad8edb47401b0394 (patch) | |
tree | 4675b0ba7baef215961e07d4cd03d68d4fbcd158 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 11e2e6cadf7f0ee36b7ccecaa11457949382b75f (diff) | |
download | CMake-ab9fa54d4841e5b0eff8d241ad8edb47401b0394.zip CMake-ab9fa54d4841e5b0eff8d241ad8edb47401b0394.tar.gz CMake-ab9fa54d4841e5b0eff8d241ad8edb47401b0394.tar.bz2 |
Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
The "cmakexbuild" wrapper is not needed for Xcode 4 and above, and the
path to it may change when CMake moves. Avoid storing a specific path
to a build program in CMakeCache.txt and instead compute the value for
CMAKE_MAKE_PROGRAM on demand. However, if a user does set the value
explicitly then honor it.
This does for Xcode what commit v3.0.0-rc1~260^2~4 (VS: Switch to
internal CMAKE_MAKE_PROGRAM lookup by generators, 2013-11-15) did for
Visual Studio generators.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index ebad7da..cd0dcc6 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -136,7 +136,6 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(std::string const& version) sscanf(this->VersionString.c_str(), "%u.%u", &v[0], &v[1]); this->XcodeVersion = 10*v[0] + v[1]; - this->FindMakeProgramFile = "CMakeFindXCode.cmake"; this->RootObject = 0; this->MainGroupChildren = 0; this->SourcesGroupChildren = 0; @@ -203,6 +202,19 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory } //---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::FindMakeProgram(cmMakefile* mf) +{ + // The Xcode generator knows how to lookup its build tool + // directly instead of needing a helper module to do it, so we + // do not actually need to put CMAKE_MAKE_PROGRAM into the cache. + if(cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) + { + mf->AddDefinition("CMAKE_MAKE_PROGRAM", + this->GetXcodeBuildCommand().c_str()); + } +} + +//---------------------------------------------------------------------------- std::string const& cmGlobalXCodeGenerator::GetXcodeBuildCommand() { if(!this->XcodeBuildCommandInitialized) |