cmLocalUnixMakefileGenerator3: Provide GetConfigName() accessor
Rename internal member from ConfigurationName to ConfigName to match the ninja generator.
This commit is contained in:
parent
e7dcdd1011
commit
a4a2518dd4
|
@ -483,7 +483,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
|
if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
|
||||||
(!check_relink ||
|
(!check_relink ||
|
||||||
gtarget->Target
|
gtarget->Target
|
||||||
->NeedRelinkBeforeInstall(lg->ConfigurationName)))
|
->NeedRelinkBeforeInstall(lg->GetConfigName())))
|
||||||
{
|
{
|
||||||
std::string tname = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
std::string tname = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||||
tname += "/";
|
tname += "/";
|
||||||
|
@ -692,7 +692,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
// Add a local name for the rule to relink the target before
|
// Add a local name for the rule to relink the target before
|
||||||
// installation.
|
// installation.
|
||||||
if(gtarget->Target
|
if(gtarget->Target
|
||||||
->NeedRelinkBeforeInstall(lg->ConfigurationName))
|
->NeedRelinkBeforeInstall(lg->GetConfigName()))
|
||||||
{
|
{
|
||||||
makeTargetName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
makeTargetName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||||
makeTargetName += "/preinstall";
|
makeTargetName += "/preinstall";
|
||||||
|
@ -865,7 +865,7 @@ cmGlobalUnixMakefileGenerator3
|
||||||
|
|
||||||
// Add rules to prepare the target for installation.
|
// Add rules to prepare the target for installation.
|
||||||
if(gtarget->Target
|
if(gtarget->Target
|
||||||
->NeedRelinkBeforeInstall(lg->ConfigurationName))
|
->NeedRelinkBeforeInstall(lg->GetConfigName()))
|
||||||
{
|
{
|
||||||
localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
localName = lg->GetRelativeTargetDirectory(*gtarget->Target);
|
||||||
localName += "/preinstall";
|
localName += "/preinstall";
|
||||||
|
|
|
@ -104,12 +104,12 @@ void cmLocalUnixMakefileGenerator3::Generate()
|
||||||
if(const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"))
|
if(const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"))
|
||||||
{
|
{
|
||||||
// Use the build type given by the user.
|
// Use the build type given by the user.
|
||||||
this->ConfigurationName = config;
|
this->ConfigName = config;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No configuration type given.
|
// No configuration type given.
|
||||||
this->ConfigurationName = "";
|
this->ConfigName = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Record whether some options are enabled to avoid checking many
|
// Record whether some options are enabled to avoid checking many
|
||||||
|
@ -497,7 +497,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
// Add a local name for the rule to relink the target before
|
// Add a local name for the rule to relink the target before
|
||||||
// installation.
|
// installation.
|
||||||
if(t->second->Target
|
if(t->second->Target
|
||||||
->NeedRelinkBeforeInstall(this->ConfigurationName))
|
->NeedRelinkBeforeInstall(this->ConfigName))
|
||||||
{
|
{
|
||||||
makeTargetName = this->GetRelativeTargetDirectory(*t->second->Target);
|
makeTargetName = this->GetRelativeTargetDirectory(*t->second->Target);
|
||||||
makeTargetName += "/preinstall";
|
makeTargetName += "/preinstall";
|
||||||
|
@ -1017,7 +1017,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
for(std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
|
for(std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
|
||||||
i != ccs.end(); ++i)
|
i != ccs.end(); ++i)
|
||||||
{
|
{
|
||||||
cmCustomCommandGenerator ccg(*i, this->ConfigurationName,
|
cmCustomCommandGenerator ccg(*i, this->ConfigName,
|
||||||
this->Makefile);
|
this->Makefile);
|
||||||
this->AppendCustomDepend(depends, ccg);
|
this->AppendCustomDepend(depends, ccg);
|
||||||
}
|
}
|
||||||
|
@ -1034,7 +1034,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
// Lookup the real name of the dependency in case it is a CMake target.
|
// Lookup the real name of the dependency in case it is a CMake target.
|
||||||
std::string dep;
|
std::string dep;
|
||||||
if(this->GetRealDependency(*d, this->ConfigurationName,
|
if(this->GetRealDependency(*d, this->ConfigName,
|
||||||
dep))
|
dep))
|
||||||
{
|
{
|
||||||
depends.push_back(dep);
|
depends.push_back(dep);
|
||||||
|
@ -1053,7 +1053,7 @@ cmLocalUnixMakefileGenerator3
|
||||||
for(std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
|
for(std::vector<cmCustomCommand>::const_iterator i = ccs.begin();
|
||||||
i != ccs.end(); ++i)
|
i != ccs.end(); ++i)
|
||||||
{
|
{
|
||||||
cmCustomCommandGenerator ccg(*i, this->ConfigurationName,
|
cmCustomCommandGenerator ccg(*i, this->ConfigName,
|
||||||
this->Makefile);
|
this->Makefile);
|
||||||
this->AppendCustomCommand(commands, ccg, target, true, relative);
|
this->AppendCustomCommand(commands, ccg, target, true, relative);
|
||||||
}
|
}
|
||||||
|
@ -2043,7 +2043,7 @@ void cmLocalUnixMakefileGenerator3
|
||||||
// Build a list of preprocessor definitions for the target.
|
// Build a list of preprocessor definitions for the target.
|
||||||
std::set<std::string> defines;
|
std::set<std::string> defines;
|
||||||
this->AddCompileDefinitions(defines, &target,
|
this->AddCompileDefinitions(defines, &target,
|
||||||
this->ConfigurationName, l->first);
|
this->ConfigName, l->first);
|
||||||
if(!defines.empty())
|
if(!defines.empty())
|
||||||
{
|
{
|
||||||
cmakefileStream
|
cmakefileStream
|
||||||
|
|
|
@ -46,6 +46,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
|
std::string const& GetConfigName() { return this->ConfigName; }
|
||||||
|
|
||||||
// this returns the relative path between the HomeOutputDirectory and this
|
// this returns the relative path between the HomeOutputDirectory and this
|
||||||
// local generators StartOutputDirectory
|
// local generators StartOutputDirectory
|
||||||
|
@ -253,7 +254,7 @@ private:
|
||||||
|
|
||||||
ImplicitDependTargetMap ImplicitDepends;
|
ImplicitDependTargetMap ImplicitDepends;
|
||||||
|
|
||||||
std::string ConfigurationName;
|
std::string ConfigName;
|
||||||
|
|
||||||
std::string HomeRelativeOutputPath;
|
std::string HomeRelativeOutputPath;
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
|
||||||
this->FortranModuleDirectoryComputed = false;
|
this->FortranModuleDirectoryComputed = false;
|
||||||
this->LocalGenerator =
|
this->LocalGenerator =
|
||||||
static_cast<cmLocalUnixMakefileGenerator3*>(target->GetLocalGenerator());
|
static_cast<cmLocalUnixMakefileGenerator3*>(target->GetLocalGenerator());
|
||||||
this->ConfigName = this->LocalGenerator->ConfigurationName.c_str();
|
this->ConfigName = this->LocalGenerator->GetConfigName().c_str();
|
||||||
this->GlobalGenerator =
|
this->GlobalGenerator =
|
||||||
static_cast<cmGlobalUnixMakefileGenerator3*>(
|
static_cast<cmGlobalUnixMakefileGenerator3*>(
|
||||||
this->LocalGenerator->GetGlobalGenerator());
|
this->LocalGenerator->GetGlobalGenerator());
|
||||||
|
@ -337,7 +337,7 @@ std::string cmMakefileTargetGenerator::GetDefines(const std::string &l)
|
||||||
|
|
||||||
// Add preprocessor definitions for this target and configuration.
|
// Add preprocessor definitions for this target and configuration.
|
||||||
this->LocalGenerator->AddCompileDefinitions(defines, this->Target,
|
this->LocalGenerator->AddCompileDefinitions(defines, this->Target,
|
||||||
this->LocalGenerator->ConfigurationName, l);
|
this->LocalGenerator->GetConfigName(), l);
|
||||||
|
|
||||||
std::string definesString;
|
std::string definesString;
|
||||||
this->LocalGenerator->JoinDefines(defines, definesString, lang);
|
this->LocalGenerator->JoinDefines(defines, definesString, lang);
|
||||||
|
@ -565,7 +565,7 @@ cmMakefileTargetGenerator
|
||||||
this->LocalGenerator->AppendFlags(flags, langFlags);
|
this->LocalGenerator->AppendFlags(flags, langFlags);
|
||||||
|
|
||||||
std::string configUpper =
|
std::string configUpper =
|
||||||
cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName);
|
cmSystemTools::UpperCase(this->LocalGenerator->GetConfigName());
|
||||||
|
|
||||||
// Add Fortran format flags.
|
// Add Fortran format flags.
|
||||||
if(lang == "Fortran")
|
if(lang == "Fortran")
|
||||||
|
@ -1156,7 +1156,7 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
|
||||||
<< "# Targets to which this target links.\n"
|
<< "# Targets to which this target links.\n"
|
||||||
<< "set(CMAKE_TARGET_LINKED_INFO_FILES\n";
|
<< "set(CMAKE_TARGET_LINKED_INFO_FILES\n";
|
||||||
std::set<cmTarget const*> emitted;
|
std::set<cmTarget const*> emitted;
|
||||||
const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
|
const char* cfg = this->LocalGenerator->GetConfigName().c_str();
|
||||||
if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
|
if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
|
||||||
{
|
{
|
||||||
cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
|
cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
|
||||||
|
@ -1597,7 +1597,7 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags(std::string const& l)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string flags;
|
std::string flags;
|
||||||
const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
|
const char* cfg = this->LocalGenerator->GetConfigName().c_str();
|
||||||
if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
|
if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
|
||||||
{
|
{
|
||||||
std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
|
std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
|
||||||
|
@ -1627,7 +1627,7 @@ void cmMakefileTargetGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop over all library dependencies.
|
// Loop over all library dependencies.
|
||||||
const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
|
const char* cfg = this->LocalGenerator->GetConfigName().c_str();
|
||||||
if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
|
if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
|
||||||
{
|
{
|
||||||
std::vector<std::string> const& libDeps = cli->GetDepends();
|
std::vector<std::string> const& libDeps = cli->GetDepends();
|
||||||
|
|
Loading…
Reference in New Issue