summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-09 14:50:29 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-09 15:24:15 (GMT)
commit911cc9a39e1f26344d47743885626060c2d94d2c (patch)
treea0199eb310d875d3a891cbf78224f79893750b6f /Source/cmTarget.h
parentcb810abe6d1c4189517d84fa6e08849a02e3f873 (diff)
downloadCMake-911cc9a39e1f26344d47743885626060c2d94d2c.zip
CMake-911cc9a39e1f26344d47743885626060c2d94d2c.tar.gz
CMake-911cc9a39e1f26344d47743885626060c2d94d2c.tar.bz2
cmTarget: Evaluate CMP0026 and CMP0051 in calling context
These policies should be checked at the call site that tries to access the LOCATION or SOURCES property, not the directory scope containing the target. Thread the caller context through cmTarget::GetProperty to use for checking the policy setting and emitting a diagnostic with proper backtrace. Extend the RunCMake.CMP0026 and RunCMake.CMP0051 tests with cross-directory cases.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 22462b9..bee6b34 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -231,6 +231,7 @@ public:
void AppendProperty(const std::string& prop, const char* value,
bool asString=false);
const char *GetProperty(const std::string& prop) const;
+ const char *GetProperty(const std::string& prop, cmMakefile* context) const;
bool GetPropertyAsBool(const std::string& prop) const;
void CheckProperty(const std::string& prop, cmMakefile* context) const;
@@ -587,7 +588,7 @@ public:
const std::string &compatibilityType) const;
private:
- bool HandleLocationPropertyPolicy() const;
+ bool HandleLocationPropertyPolicy(cmMakefile* context) const;
// The set of include directories that are marked as system include
// directories.