summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2017-02-18 17:43:25 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-22 20:20:11 (GMT)
commit5da9266af50af3c2c1a827a1d162c8a9b16e7fd9 (patch)
tree168c9ce64655933f6f4246facd10af63d4e316d4 /Source
parente80ac953035703dde6e03e2c32ba9fded8c69f2a (diff)
downloadCMake-5da9266af50af3c2c1a827a1d162c8a9b16e7fd9.zip
CMake-5da9266af50af3c2c1a827a1d162c8a9b16e7fd9.tar.gz
CMake-5da9266af50af3c2c1a827a1d162c8a9b16e7fd9.tar.bz2
Xcode: Always track object library dependencies via hacky Makefile
Always use the dependency tracker Makefile to ensure targets that depend on object libraries are up-to-date. For all other target types we use the hack only for Xcode < 5. Fixes: #16615
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx26
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 0a9c7b8..5167205 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -423,14 +423,12 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
// Add XCODE depend helper
std::string dir = root->GetCurrentBinaryDirectory();
cmCustomCommandLine makeHelper;
- if (this->XcodeVersion < 50) {
- makeHelper.push_back("make");
- makeHelper.push_back("-C");
- makeHelper.push_back(dir);
- makeHelper.push_back("-f");
- makeHelper.push_back(this->CurrentXCodeHackMakefile);
- makeHelper.push_back(""); // placeholder, see below
- }
+ makeHelper.push_back("make");
+ makeHelper.push_back("-C");
+ makeHelper.push_back(dir);
+ makeHelper.push_back("-f");
+ makeHelper.push_back(this->CurrentXCodeHackMakefile);
+ makeHelper.push_back(""); // placeholder, see below
// Add ZERO_CHECK
bool regenerate = !mf->IsOn("CMAKE_SUPPRESS_REGENERATION");
@@ -475,12 +473,12 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
// run the depend check makefile as a post build rule
// this will make sure that when the next target is built
// things are up-to-date
- if (!makeHelper.empty() &&
- (target->GetType() == cmStateEnums::EXECUTABLE ||
- target->GetType() == cmStateEnums::OBJECT_LIBRARY ||
- target->GetType() == cmStateEnums::STATIC_LIBRARY ||
- target->GetType() == cmStateEnums::SHARED_LIBRARY ||
- target->GetType() == cmStateEnums::MODULE_LIBRARY)) {
+ if (target->GetType() == cmStateEnums::OBJECT_LIBRARY ||
+ (this->XcodeVersion < 50 &&
+ (target->GetType() == cmStateEnums::EXECUTABLE ||
+ target->GetType() == cmStateEnums::STATIC_LIBRARY ||
+ target->GetType() == cmStateEnums::SHARED_LIBRARY ||
+ target->GetType() == cmStateEnums::MODULE_LIBRARY))) {
makeHelper[makeHelper.size() - 1] = // fill placeholder
this->PostBuildMakeTarget(target->GetName(), "$(CONFIGURATION)");
cmCustomCommandLines commandLines;