summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-02 12:50:02 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-07 07:29:31 (GMT)
commit647488570bfe7ce210bfd0675df0eb5147e36ab6 (patch)
treeeb67a369755a20ef15f425d1f920bfbd2e1f92c2 /Source/cmTarget.cxx
parent6f148e4a48f3f879998e67d9bb30de07f5cf5608 (diff)
downloadCMake-647488570bfe7ce210bfd0675df0eb5147e36ab6.zip
CMake-647488570bfe7ce210bfd0675df0eb5147e36ab6.tar.gz
CMake-647488570bfe7ce210bfd0675df0eb5147e36ab6.tar.bz2
cmTarget: Replace PolicyStatus members with PolicyMap.
sizeof(cmTarget) goes from 856 to 840 with GNU libstdc++ 5.1.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx17
1 files changed, 2 insertions, 15 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5e866ef..daf5282 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -239,13 +239,6 @@ cmTargetInternals::~cmTargetInternals()
//----------------------------------------------------------------------------
cmTarget::cmTarget()
{
-#define INITIALIZE_TARGET_POLICY_MEMBER(POLICY) \
- this->PolicyStatus ## POLICY = cmPolicies::WARN;
-
- CM_FOR_EACH_TARGET_POLICY(INITIALIZE_TARGET_POLICY_MEMBER)
-
-#undef INITIALIZE_TARGET_POLICY_MEMBER
-
this->Makefile = 0;
#if defined(_WIN32) && !defined(__CYGWIN__)
this->LinkLibrariesForVS6Analyzed = false;
@@ -440,20 +433,14 @@ void cmTarget::SetMakefile(cmMakefile* mf)
}
// Record current policies for later use.
-#define CAPTURE_TARGET_POLICY(POLICY) \
- this->PolicyStatus ## POLICY = \
- this->Makefile->GetPolicyStatus(cmPolicies::POLICY);
-
- CM_FOR_EACH_TARGET_POLICY(CAPTURE_TARGET_POLICY)
-
-#undef CAPTURE_TARGET_POLICY
+ this->Makefile->RecordPolicies(this->PolicyMap);
if (this->TargetTypeValue == INTERFACE_LIBRARY)
{
// This policy is checked in a few conditions. The properties relevant
// to the policy are always ignored for INTERFACE_LIBRARY targets,
// so ensure that the conditions don't lead to nonsense.
- this->PolicyStatusCMP0022 = cmPolicies::NEW;
+ this->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW);
}
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)