mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 10:39:28 -05:00
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
This commit is contained in:
@@ -423,14 +423,12 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
|
|||||||
// Add XCODE depend helper
|
// Add XCODE depend helper
|
||||||
std::string dir = root->GetCurrentBinaryDirectory();
|
std::string dir = root->GetCurrentBinaryDirectory();
|
||||||
cmCustomCommandLine makeHelper;
|
cmCustomCommandLine makeHelper;
|
||||||
if (this->XcodeVersion < 50) {
|
makeHelper.push_back("make");
|
||||||
makeHelper.push_back("make");
|
makeHelper.push_back("-C");
|
||||||
makeHelper.push_back("-C");
|
makeHelper.push_back(dir);
|
||||||
makeHelper.push_back(dir);
|
makeHelper.push_back("-f");
|
||||||
makeHelper.push_back("-f");
|
makeHelper.push_back(this->CurrentXCodeHackMakefile);
|
||||||
makeHelper.push_back(this->CurrentXCodeHackMakefile);
|
makeHelper.push_back(""); // placeholder, see below
|
||||||
makeHelper.push_back(""); // placeholder, see below
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add ZERO_CHECK
|
// Add ZERO_CHECK
|
||||||
bool regenerate = !mf->IsOn("CMAKE_SUPPRESS_REGENERATION");
|
bool regenerate = !mf->IsOn("CMAKE_SUPPRESS_REGENERATION");
|
||||||
@@ -475,12 +473,12 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
|
|||||||
// run the depend check makefile as a post build rule
|
// run the depend check makefile as a post build rule
|
||||||
// this will make sure that when the next target is built
|
// this will make sure that when the next target is built
|
||||||
// things are up-to-date
|
// things are up-to-date
|
||||||
if (!makeHelper.empty() &&
|
if (target->GetType() == cmStateEnums::OBJECT_LIBRARY ||
|
||||||
(target->GetType() == cmStateEnums::EXECUTABLE ||
|
(this->XcodeVersion < 50 &&
|
||||||
target->GetType() == cmStateEnums::OBJECT_LIBRARY ||
|
(target->GetType() == cmStateEnums::EXECUTABLE ||
|
||||||
target->GetType() == cmStateEnums::STATIC_LIBRARY ||
|
target->GetType() == cmStateEnums::STATIC_LIBRARY ||
|
||||||
target->GetType() == cmStateEnums::SHARED_LIBRARY ||
|
target->GetType() == cmStateEnums::SHARED_LIBRARY ||
|
||||||
target->GetType() == cmStateEnums::MODULE_LIBRARY)) {
|
target->GetType() == cmStateEnums::MODULE_LIBRARY))) {
|
||||||
makeHelper[makeHelper.size() - 1] = // fill placeholder
|
makeHelper[makeHelper.size() - 1] = // fill placeholder
|
||||||
this->PostBuildMakeTarget(target->GetName(), "$(CONFIGURATION)");
|
this->PostBuildMakeTarget(target->GetName(), "$(CONFIGURATION)");
|
||||||
cmCustomCommandLines commandLines;
|
cmCustomCommandLines commandLines;
|
||||||
|
|||||||
Reference in New Issue
Block a user