diff options
author | Brad King <brad.king@kitware.com> | 2017-01-20 16:54:31 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-20 16:54:31 (GMT) |
commit | 910ef6d0a3eab5d483759ee23f10e91f1c4da8c2 (patch) | |
tree | 867a64a159d765142eb2bc15b9a068681aab5964 /Source | |
parent | 22d240184cfe5afda325551b68610bf7160afa8b (diff) | |
parent | d9f836e9567dbcce85b917300e8de9086aa1f1f7 (diff) | |
download | CMake-910ef6d0a3eab5d483759ee23f10e91f1c4da8c2.zip CMake-910ef6d0a3eab5d483759ee23f10e91f1c4da8c2.tar.gz CMake-910ef6d0a3eab5d483759ee23f10e91f1c4da8c2.tar.bz2 |
Merge topic '16165-manually-added-dependencies'
d9f836e9 Add a getter for manually added target dependencies
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9261ca8..d825e5c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -852,6 +852,12 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Makefile->GetBacktrace())) { return; } + if (prop == "MANUALLY_ADDED_DEPENDENCIES") { + std::ostringstream e; + e << "MANUALLY_ADDED_DEPENDENCIES property is read-only\n"; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + return; + } if (prop == "NAME") { std::ostringstream e; e << "NAME property is read-only\n"; @@ -1168,6 +1174,7 @@ const char* cmTarget::GetProperty(const std::string& prop) const MAKE_STATIC_PROP(COMPILE_OPTIONS); MAKE_STATIC_PROP(COMPILE_DEFINITIONS); MAKE_STATIC_PROP(IMPORTED); + MAKE_STATIC_PROP(MANUALLY_ADDED_DEPENDENCIES); MAKE_STATIC_PROP(NAME); MAKE_STATIC_PROP(BINARY_DIR); MAKE_STATIC_PROP(SOURCE_DIR); @@ -1181,6 +1188,7 @@ const char* cmTarget::GetProperty(const std::string& prop) const specialProps.insert(propCOMPILE_OPTIONS); specialProps.insert(propCOMPILE_DEFINITIONS); specialProps.insert(propIMPORTED); + specialProps.insert(propMANUALLY_ADDED_DEPENDENCIES); specialProps.insert(propNAME); specialProps.insert(propBINARY_DIR); specialProps.insert(propSOURCE_DIR); @@ -1236,6 +1244,15 @@ const char* cmTarget::GetProperty(const std::string& prop) const output = cmJoin(this->Internal->CompileDefinitionsEntries, ";"); return output.c_str(); } + if (prop == propMANUALLY_ADDED_DEPENDENCIES) { + if (this->Utilities.empty()) { + return CM_NULLPTR; + } + + static std::string output; + output = cmJoin(this->Utilities, ";"); + return output.c_str(); + } if (prop == propIMPORTED) { return this->IsImported() ? "TRUE" : "FALSE"; } |