summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-19 17:33:56 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-19 18:00:32 (GMT)
commitcbca65826c2bf49ba8c99efe8fa315d2942c4836 (patch)
tree4bed2266fce217dc80081de750b3eae7401a0eeb /Source/cmState.cxx
parent7a4b8d0dc2f1e780f14e35e1c7ea32dde90576a4 (diff)
downloadCMake-cbca65826c2bf49ba8c99efe8fa315d2942c4836.zip
CMake-cbca65826c2bf49ba8c99efe8fa315d2942c4836.tar.gz
CMake-cbca65826c2bf49ba8c99efe8fa315d2942c4836.tar.bz2
Add directory property to list buildsystem targets
Add a BUILDSYSTEM_TARGETS property to allow project code to traverse the list of its own targets in a given directory.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 325ca76..37e41ad 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -29,6 +29,7 @@
#include <string.h>
#include <utility>
+static std::string const kBUILDSYSTEM_TARGETS = "BUILDSYSTEM_TARGETS";
static std::string const kSUBDIRECTORIES = "SUBDIRECTORIES";
struct cmState::SnapshotDataType
@@ -1683,6 +1684,10 @@ const char* cmState::Directory::GetProperty(const std::string& prop,
output = cmJoin(child_dirs, ";");
return output.c_str();
}
+ if (prop == kBUILDSYSTEM_TARGETS) {
+ output = cmJoin(this->DirectoryState->NormalTargetNames, ";");
+ return output.c_str();
+ }
if (prop == "LISTFILE_STACK") {
std::vector<std::string> listFiles;