summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-02 17:06:03 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-02 17:06:03 (GMT)
commit098382505746a0f7c21f521a7a13e4a6836d12ac (patch)
treec7b8e234126454a0d4361945f4a52f5b24d7738f /Source
parent9780859b7e06e00d75b90aad1f706a401434a04a (diff)
parent06f61c26cfa19a47610ad718a784bdd7db105cf8 (diff)
downloadCMake-098382505746a0f7c21f521a7a13e4a6836d12ac.zip
CMake-098382505746a0f7c21f521a7a13e4a6836d12ac.tar.gz
CMake-098382505746a0f7c21f521a7a13e4a6836d12ac.tar.bz2
Merge topic 'remove-DEFINITIONS-directory-property'
06f61c26 Do not treat DEFINITIONS as a built-in directory property
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx15
-rw-r--r--Source/cmPolicies.cxx5
-rw-r--r--Source/cmPolicies.h2
3 files changed, 20 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6fbcaeb..ec1d814 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4209,8 +4209,19 @@ const char *cmMakefile::GetProperty(const std::string& prop,
}
else if (prop == "DEFINITIONS")
{
- output += this->DefineFlagsOrig;
- return output.c_str();
+ switch(this->GetPolicyStatus(cmPolicies::CMP0059))
+ {
+ case cmPolicies::WARN:
+ this->IssueMessage(cmake::AUTHOR_WARNING, this->GetPolicies()->
+ GetPolicyWarning(cmPolicies::CMP0059));
+ case cmPolicies::OLD:
+ output += this->DefineFlagsOrig;
+ return output.c_str();
+ case cmPolicies::NEW:
+ case cmPolicies::REQUIRED_ALWAYS:
+ case cmPolicies::REQUIRED_IF_USED:
+ break;
+ }
}
else if (prop == "LINK_DIRECTORIES")
{
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 592df8f..0a61bca 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -385,6 +385,11 @@ cmPolicies::cmPolicies()
CMP0058, "CMP0058",
"Ninja requires custom command byproducts to be explicit.",
3,3,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0059, "CMP0059",
+ "Do no treat DEFINITIONS as a built-in directory property.",
+ 3,3,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index b18b337..ced9d8c 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -116,6 +116,8 @@ public:
CMP0057, ///< Disallow multiple MAIN_DEPENDENCY specifications
/// for the same file.
CMP0058, ///< Ninja requires custom command byproducts to be explicit
+ CMP0059, ///< Do not treat ``DEFINITIONS`` as a built-in directory
+ /// property.
/** \brief Always the last entry.
*