diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-25 19:06:37 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-27 19:58:49 (GMT) |
commit | 5ab3a946518870d0dbd1fe606d1bc89d336769c4 (patch) | |
tree | 97cd89ed069539e65f38983e24272c0810b7d819 /Source | |
parent | 496f4cd07d20e91750ec920e05a4aef4e4bdc9ba (diff) | |
download | CMake-5ab3a946518870d0dbd1fe606d1bc89d336769c4.zip CMake-5ab3a946518870d0dbd1fe606d1bc89d336769c4.tar.gz CMake-5ab3a946518870d0dbd1fe606d1bc89d336769c4.tar.bz2 |
cmTarget: Inline GetLocation into deprecated callers.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index da57c4c..352b2de 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2917,11 +2917,21 @@ const char *cmTarget::GetProperty(const std::string& prop, // For an imported target this is the location of an arbitrary // available configuration. // - // For a non-imported target this is deprecated because it - // cannot take into account the per-configuration name of the - // target because the configuration type may not be known at - // CMake time. - this->Properties.SetProperty(propLOCATION, this->GetLocationForBuild()); + if(this->IsImported()) + { + this->Properties.SetProperty( + propLOCATION, this->ImportedGetFullPath("", false).c_str()); + } + else + { + // For a non-imported target this is deprecated because it + // cannot take into account the per-configuration name of the + // target because the configuration type may not be known at + // CMake time. + this->Properties.SetProperty( + propLOCATION, this->GetLocationForBuild()); + } + } // Support "LOCATION_<CONFIG>". @@ -2932,7 +2942,17 @@ const char *cmTarget::GetProperty(const std::string& prop, return 0; } const char* configName = prop.c_str() + 9; - this->Properties.SetProperty(prop, this->GetLocation(configName)); + + if (this->IsImported()) + { + this->Properties.SetProperty( + prop, this->ImportedGetFullPath(configName, false).c_str()); + } + else + { + this->Properties.SetProperty( + prop, this->GetFullPath(configName, false).c_str()); + } } // Support "<CONFIG>_LOCATION". else if(cmHasLiteralSuffix(prop, "_LOCATION")) @@ -2944,7 +2964,16 @@ const char *cmTarget::GetProperty(const std::string& prop, { return 0; } - this->Properties.SetProperty(prop, this->GetLocation(configName)); + if (this->IsImported()) + { + this->Properties.SetProperty( + prop, this->ImportedGetFullPath(configName, false).c_str()); + } + else + { + this->Properties.SetProperty( + prop, this->GetFullPath(configName, false).c_str()); + } } } } |