summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-08-13 13:57:23 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-08-19 08:49:30 (GMT)
commit5a2a275bb41e04891c2541a8e185b6daed259b0b (patch)
treef925d8384da5c4c9d921a6b47ad648f9b0b1bf78 /Source/cmComputeLinkInformation.cxx
parent2984df91002fe3e3db0d38f364e9842024a8ab2e (diff)
downloadCMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.zip
CMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.tar.gz
CMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.tar.bz2
Refactor: reduce cmToCStr usage
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index d15da0c..eda0722 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -278,13 +278,11 @@ cmComputeLinkInformation::cmComputeLinkInformation(
// On platforms without import libraries there may be a special flag
// to use when creating a plugin (module) that obtains symbols from
// the program that will load it.
- this->LoaderFlag = nullptr;
if (!this->Target->IsDLLPlatform() &&
this->Target->GetType() == cmStateEnums::MODULE_LIBRARY) {
std::string loader_flag_var =
cmStrCat("CMAKE_SHARED_MODULE_LOADER_", this->LinkLanguage, "_FLAG");
- this->LoaderFlag =
- cmToCStr(this->Makefile->GetDefinition(loader_flag_var));
+ this->LoaderFlag = this->Makefile->GetDefinition(loader_flag_var);
}
// Get options needed to link libraries.
@@ -660,8 +658,7 @@ void cmComputeLinkInformation::AddItem(BT<std::string> const& item,
// This link item is an executable that may provide symbols
// used by this target. A special flag is needed on this
// platform. Add it now.
- std::string linkItem;
- linkItem = this->LoaderFlag;
+ std::string linkItem = this->LoaderFlag;
cmStateEnums::ArtifactType artifact = tgt->HasImportLibrary(config)
? cmStateEnums::ImportLibraryArtifact
: cmStateEnums::RuntimeBinaryArtifact;