mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
cmGeneratorTarget: Make GetConfigCommonSourceFiles Xcode-specific
The Xcode generator is the only place left that we do not support per-config sources. Make the corresponding helper Xcode-specific to avoid any other new uses.
This commit is contained in:
@@ -7039,7 +7039,7 @@ const cmLinkImplementation* cmGeneratorTarget::GetLinkImplementation(
|
|||||||
return &impl;
|
return &impl;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmGeneratorTarget::GetConfigCommonSourceFiles(
|
bool cmGeneratorTarget::GetConfigCommonSourceFilesForXcode(
|
||||||
std::vector<cmSourceFile*>& files) const
|
std::vector<cmSourceFile*>& files) const
|
||||||
{
|
{
|
||||||
std::vector<std::string> const& configs =
|
std::vector<std::string> const& configs =
|
||||||
|
|||||||
@@ -430,8 +430,9 @@ public:
|
|||||||
|
|
||||||
/** Get source files common to all configurations and diagnose cases
|
/** Get source files common to all configurations and diagnose cases
|
||||||
with per-config sources. Excludes sources added by a TARGET_OBJECTS
|
with per-config sources. Excludes sources added by a TARGET_OBJECTS
|
||||||
generator expression. */
|
generator expression. Do not use outside the Xcode generator. */
|
||||||
bool GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const;
|
bool GetConfigCommonSourceFilesForXcode(
|
||||||
|
std::vector<cmSourceFile*>& files) const;
|
||||||
|
|
||||||
bool HaveBuildTreeRPATH(const std::string& config) const;
|
bool HaveBuildTreeRPATH(const std::string& config) const;
|
||||||
|
|
||||||
|
|||||||
@@ -1384,7 +1384,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget(
|
|||||||
|
|
||||||
// organize the sources
|
// organize the sources
|
||||||
std::vector<cmSourceFile*> commonSourceFiles;
|
std::vector<cmSourceFile*> commonSourceFiles;
|
||||||
if (!gtgt->GetConfigCommonSourceFiles(commonSourceFiles)) {
|
if (!gtgt->GetConfigCommonSourceFilesForXcode(commonSourceFiles)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1748,7 +1748,7 @@ void cmGlobalXCodeGenerator::CreateCustomCommands(
|
|||||||
this->CreateRunScriptBuildPhase("CMake PostBuild Rules", postbuild);
|
this->CreateRunScriptBuildPhase("CMake PostBuild Rules", postbuild);
|
||||||
} else {
|
} else {
|
||||||
std::vector<cmSourceFile*> classes;
|
std::vector<cmSourceFile*> classes;
|
||||||
if (!gtgt->GetConfigCommonSourceFiles(classes)) {
|
if (!gtgt->GetConfigCommonSourceFilesForXcode(classes)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// add all the sources
|
// add all the sources
|
||||||
@@ -1821,7 +1821,7 @@ void cmGlobalXCodeGenerator::CreateRunScriptBuildPhases(
|
|||||||
cmXCodeObject* buildPhases, cmGeneratorTarget const* gt)
|
cmXCodeObject* buildPhases, cmGeneratorTarget const* gt)
|
||||||
{
|
{
|
||||||
std::vector<cmSourceFile*> sources;
|
std::vector<cmSourceFile*> sources;
|
||||||
if (!gt->GetConfigCommonSourceFiles(sources)) {
|
if (!gt->GetConfigCommonSourceFilesForXcode(sources)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto& visited = this->CommandsVisited[gt];
|
auto& visited = this->CommandsVisited[gt];
|
||||||
@@ -2964,7 +2964,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
|
|||||||
if (gtgt->GetType() != cmStateEnums::GLOBAL_TARGET &&
|
if (gtgt->GetType() != cmStateEnums::GLOBAL_TARGET &&
|
||||||
gtgt->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
|
gtgt->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
|
||||||
std::vector<cmSourceFile*> sources;
|
std::vector<cmSourceFile*> sources;
|
||||||
if (!gtgt->GetConfigCommonSourceFiles(sources)) {
|
if (!gtgt->GetConfigCommonSourceFilesForXcode(sources)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user