summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-19 23:12:37 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-20 22:52:23 (GMT)
commitc099e00fc0a9c47a2addaca145952b1c33195fab (patch)
tree6997d09c8174eaa0e8d75fed5f4ce89e3f127556
parentd74bca5a8fee1d45c60b60a70a2a1a90abb74180 (diff)
downloadCMake-c099e00fc0a9c47a2addaca145952b1c33195fab.zip
CMake-c099e00fc0a9c47a2addaca145952b1c33195fab.tar.gz
CMake-c099e00fc0a9c47a2addaca145952b1c33195fab.tar.bz2
Access policy status from cmGeneratorTarget at generate time.
-rw-r--r--Source/cmComputeLinkInformation.cxx10
-rw-r--r--Source/cmComputeTargetDepends.cxx2
-rw-r--r--Source/cmExportBuildFileGenerator.cxx4
-rw-r--r--Source/cmExportFileGenerator.cxx10
-rw-r--r--Source/cmExportInstallFileGenerator.cxx4
-rw-r--r--Source/cmGeneratorTarget.cxx26
-rw-r--r--Source/cmLocalGenerator.cxx4
7 files changed, 29 insertions, 31 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index eca0f66..a32bb48 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -407,7 +407,7 @@ cmComputeLinkInformation
// order to support such projects we need to add the directories
// containing libraries linked with a full path to the -L path.
this->OldLinkDirMode =
- this->Target->Target->GetPolicyStatusCMP0003() != cmPolicies::NEW;
+ this->Target->GetPolicyStatusCMP0003() != cmPolicies::NEW;
if(this->OldLinkDirMode)
{
// Construct a mask to not bother with this behavior for link
@@ -1140,7 +1140,7 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item)
// Full path libraries should specify a valid library file name.
// See documentation of CMP0008.
std::string generator = this->GlobalGenerator->GetName();
- if(this->Target->Target->GetPolicyStatusCMP0008() != cmPolicies::NEW &&
+ if(this->Target->GetPolicyStatusCMP0008() != cmPolicies::NEW &&
(generator.find("Visual Studio") != generator.npos ||
generator.find("Xcode") != generator.npos))
{
@@ -1221,7 +1221,7 @@ bool cmComputeLinkInformation::CheckImplicitDirItem(std::string const& item)
}
// Check the policy for whether we should use the approach below.
- switch (this->Target->Target->GetPolicyStatusCMP0060())
+ switch (this->Target->GetPolicyStatusCMP0060())
{
case cmPolicies::WARN:
if (this->CMP0060Warn)
@@ -1531,7 +1531,7 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
this->OrderLinkerSearchPath->AddLinkLibrary(item);
// Produce any needed message.
- switch(this->Target->Target->GetPolicyStatusCMP0008())
+ switch(this->Target->GetPolicyStatusCMP0008())
{
case cmPolicies::WARN:
{
@@ -1583,7 +1583,7 @@ bool cmComputeLinkInformation::FinishLinkerSearchDirectories()
}
// Enforce policy constraints.
- switch(this->Target->Target->GetPolicyStatusCMP0003())
+ switch(this->Target->GetPolicyStatusCMP0003())
{
case cmPolicies::WARN:
if(!this->CMakeInstance->GetState()
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 2ae8084..03f4fdd 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -362,7 +362,7 @@ void cmComputeTargetDepends::AddTargetDepend(
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
bool issueMessage = false;
std::ostringstream e;
- switch(depender->Target->GetPolicyStatusCMP0046())
+ switch(depender->GetPolicyStatusCMP0046())
{
case cmPolicies::WARN:
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0046) << "\n";
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index be65a19..23c11d7 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -107,8 +107,8 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
this->PopulateInterfaceProperty("INTERFACE_POSITION_INDEPENDENT_CODE",
gte, properties);
const bool newCMP0022Behavior =
- gte->Target->GetPolicyStatusCMP0022() != cmPolicies::WARN
- && gte->Target->GetPolicyStatusCMP0022() != cmPolicies::OLD;
+ gte->GetPolicyStatusCMP0022() != cmPolicies::WARN
+ && gte->GetPolicyStatusCMP0022() != cmPolicies::OLD;
if (newCMP0022Behavior)
{
this->PopulateInterfaceLinkLibrariesProperty(gte,
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index c542f85..1a84625 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -270,7 +270,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
{
if (prop == "INTERFACE_INCLUDE_DIRECTORIES")
{
- switch (target->Target->GetPolicyStatusCMP0041())
+ switch (target->GetPolicyStatusCMP0041())
{
case cmPolicies::WARN:
messageType = cmake::WARNING;
@@ -317,7 +317,7 @@ static bool checkInterfaceDirs(const std::string &prepro,
{
if (!shouldContinue)
{
- switch(target->Target->GetPolicyStatusCMP0052())
+ switch(target->GetPolicyStatusCMP0052())
{
case cmPolicies::WARN:
{
@@ -830,10 +830,8 @@ cmExportFileGenerator
}
const bool newCMP0022Behavior =
- target->Target
- ->GetPolicyStatusCMP0022() != cmPolicies::WARN
- && target->Target
- ->GetPolicyStatusCMP0022() != cmPolicies::OLD;
+ target->GetPolicyStatusCMP0022() != cmPolicies::WARN
+ && target->GetPolicyStatusCMP0022() != cmPolicies::OLD;
if(newCMP0022Behavior && !this->ExportOld)
{
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index a2d6ad1..b695904 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -169,8 +169,8 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
properties, missingTargets);
const bool newCMP0022Behavior =
- gt->Target->GetPolicyStatusCMP0022() != cmPolicies::WARN
- && gt->Target->GetPolicyStatusCMP0022() != cmPolicies::OLD;
+ gt->GetPolicyStatusCMP0022() != cmPolicies::WARN
+ && gt->GetPolicyStatusCMP0022() != cmPolicies::OLD;
if (newCMP0022Behavior)
{
if (this->PopulateInterfaceLinkLibrariesProperty(gt,
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index fc5c049..713ab6a 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1498,7 +1498,7 @@ bool cmGeneratorTarget::MacOSXRpathInstallNameDirDefault() const
return this->GetPropertyAsBool("MACOSX_RPATH");
}
- cmPolicies::PolicyStatus cmp0042 = this->Target->GetPolicyStatusCMP0042();
+ cmPolicies::PolicyStatus cmp0042 = this->GetPolicyStatusCMP0042();
if(cmp0042 == cmPolicies::WARN)
{
@@ -2635,7 +2635,7 @@ static void processIncludeDirectories(cmGeneratorTarget const* tgt,
cmake::MessageType messageType = cmake::FATAL_ERROR;
if (checkCMP0027)
{
- switch(tgt->Target->GetPolicyStatusCMP0027())
+ switch(tgt->GetPolicyStatusCMP0027())
{
case cmPolicies::WARN:
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0027) << "\n";
@@ -2674,7 +2674,7 @@ static void processIncludeDirectories(cmGeneratorTarget const* tgt,
}
else
{
- switch(tgt->Target->GetPolicyStatusCMP0021())
+ switch(tgt->GetPolicyStatusCMP0021())
{
case cmPolicies::WARN:
{
@@ -4706,8 +4706,8 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config,
}
}
}
- else if (this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN
- || this->Target->GetPolicyStatusCMP0022() == cmPolicies::OLD)
+ else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN
+ || this->GetPolicyStatusCMP0022() == cmPolicies::OLD)
{
// The link implementation is the default link interface.
cmLinkImplementationLibraries const*
@@ -5075,8 +5075,8 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries(
// libraries and executables that export symbols.
const char* explicitLibraries = 0;
std::string linkIfaceProp;
- if(this->Target->GetPolicyStatusCMP0022() != cmPolicies::OLD &&
- this->Target->GetPolicyStatusCMP0022() != cmPolicies::WARN)
+ if(this->GetPolicyStatusCMP0022() != cmPolicies::OLD &&
+ this->GetPolicyStatusCMP0022() != cmPolicies::WARN)
{
// CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES.
linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
@@ -5102,7 +5102,7 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries(
}
if(explicitLibraries &&
- this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN &&
+ this->GetPolicyStatusCMP0022() == cmPolicies::WARN &&
!this->PolicyWarnedCMP0022)
{
// Compare the explicitly set old link interface properties to the
@@ -5147,8 +5147,8 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries(
iface.Libraries,
iface.HadHeadSensitiveCondition);
}
- else if (this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN
- || this->Target->GetPolicyStatusCMP0022() == cmPolicies::OLD)
+ else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN
+ || this->GetPolicyStatusCMP0022() == cmPolicies::OLD)
// If CMP0022 is NEW then the plain tll signature sets the
// INTERFACE_LINK_LIBRARIES, so if we get here then the project
// cleared the property explicitly and we should not fall back
@@ -5159,7 +5159,7 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries(
this->GetLinkImplementationLibrariesInternal(config, headTarget);
iface.Libraries.insert(iface.Libraries.end(),
impl->Libraries.begin(), impl->Libraries.end());
- if(this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN &&
+ if(this->GetPolicyStatusCMP0022() == cmPolicies::WARN &&
!this->PolicyWarnedCMP0022 && !usage_requirements_only)
{
// Compare the link implementation fallback link interface to the
@@ -5621,7 +5621,7 @@ std::string cmGeneratorTarget::CheckCMP0004(std::string const& item) const
if(lib != item)
{
cmake* cm = this->LocalGenerator->GetCMakeInstance();
- switch(this->Target->GetPolicyStatusCMP0004())
+ switch(this->GetPolicyStatusCMP0004())
{
case cmPolicies::WARN:
{
@@ -5829,7 +5829,7 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
bool noMessage = false;
cmake::MessageType messageType = cmake::FATAL_ERROR;
std::ostringstream e;
- switch(this->Target->GetPolicyStatusCMP0038())
+ switch(this->GetPolicyStatusCMP0038())
{
case cmPolicies::WARN:
{
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index c65d9e0..93ddac0 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1551,7 +1551,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
GetGlobalPropertyAsBool("TARGET_SUPPORTS_SHARED_LIBS"))
{
bool add_shlib_flags = false;
- switch(tgt.Target->GetPolicyStatusCMP0065())
+ switch(tgt.GetPolicyStatusCMP0065())
{
case cmPolicies::WARN:
if(!tgt.GetPropertyAsBool("ENABLE_EXPORTS") &&
@@ -2108,7 +2108,7 @@ void cmLocalGenerator
target->GetType() != cmState::MODULE_LIBRARY &&
!target->IsExecutableWithExports())
{
- switch (target->Target->GetPolicyStatusCMP0063())
+ switch (target->GetPolicyStatusCMP0063())
{
case cmPolicies::OLD:
return;