diff options
author | Brad King <brad.king@kitware.com> | 2006-09-29 20:42:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-09-29 20:42:58 (GMT) |
commit | fdcc888c56d7c15a43eab8a2335356326e4d0e10 (patch) | |
tree | 243660049a66018deb8255c1b697a2ae9a65d022 /Source/cmTarget.cxx | |
parent | 21f3a18bee33ca8ea657cd2762e4366b82ff1a4e (diff) | |
download | CMake-fdcc888c56d7c15a43eab8a2335356326e4d0e10.zip CMake-fdcc888c56d7c15a43eab8a2335356326e4d0e10.tar.gz CMake-fdcc888c56d7c15a43eab8a2335356326e4d0e10.tar.bz2 |
ENH: Added support for getting a target's location on a per-configuration basis (ex. DEBUG_LOCATION). This does not fix but helps with bug#3250.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index a5515f4..24e196a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -907,7 +907,15 @@ const char *cmTarget::GetProperty(const char* prop) // variable in the location. this->SetProperty("LOCATION", this->GetLocation(0)); } - + + // Per-configuration location can be computed. + int len = static_cast<int>(strlen(prop)); + if(len > 9 && strcmp(prop+len-9, "_LOCATION") == 0) + { + std::string configName(prop, len-9); + this->SetProperty(prop, this->GetLocation(configName.c_str())); + } + // the type property returns what type the target is if (!strcmp(prop,"TYPE")) { |