diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-30 17:45:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-30 19:00:14 (GMT) |
commit | 3eec21a01cda630f34a4505d66bdbf6d5063ecdc (patch) | |
tree | 78481680659c0c29e7dc2cb4cac82bce280ce8a0 /Source/cmGeneratorTarget.cxx | |
parent | 888b8a43d82e6f6157642c2bd84520920d8e2d11 (diff) | |
download | CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.zip CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.tar.gz CMake-3eec21a01cda630f34a4505d66bdbf6d5063ecdc.tar.bz2 |
cmTarget::GetProperty: return cmProp
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index e722034..e81b619 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -383,7 +383,8 @@ const char* cmGeneratorTarget::GetProperty(const std::string& prop) const if (cmSystemTools::GetFatalErrorOccured()) { return nullptr; } - return this->Target->GetProperty(prop); + cmProp retval = this->Target->GetProperty(prop); + return retval ? retval->c_str() : nullptr; } const char* cmGeneratorTarget::GetSafeProperty(const std::string& prop) const @@ -6349,8 +6350,8 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, // Initialize members. info.NoSOName = false; - const char* loc = nullptr; - const char* imp = nullptr; + cmProp loc = nullptr; + cmProp imp = nullptr; std::string suffix; if (!this->Target->GetMappedConfig(desired_config, loc, imp, suffix)) { return; @@ -6379,7 +6380,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, } if (this->GetType() == cmStateEnums::INTERFACE_LIBRARY) { if (loc) { - info.LibName = loc; + info.LibName = *loc; } return; } @@ -6389,7 +6390,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, // Get the location. if (loc) { - info.Location = loc; + info.Location = *loc; } else { std::string impProp = cmStrCat("IMPORTED_LOCATION", suffix); if (const char* config_location = this->GetProperty(impProp)) { @@ -6422,7 +6423,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, // Get the import library. if (imp) { - info.ImportLibrary = imp; + info.ImportLibrary = *imp; } else if (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports()) { std::string impProp = cmStrCat("IMPORTED_IMPLIB", suffix); |