summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-19 11:41:22 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-19 11:42:08 (GMT)
commitd686f81e58200c68c1e89094210e9587e0e90983 (patch)
tree21296c61a94fe71a1dc3a33484bbe38e32e2374b /Source/cmGlobalGenerator.cxx
parentf4ff60a803170311f49511a60a381eef8b78c5dd (diff)
downloadCMake-d686f81e58200c68c1e89094210e9587e0e90983.zip
CMake-d686f81e58200c68c1e89094210e9587e0e90983.tar.gz
CMake-d686f81e58200c68c1e89094210e9587e0e90983.tar.bz2
Restore possibly regressed CMP0018 logic
Refactoring in commit f4ff60a803 (cmMakefile: Make GetSafeDefinition return std::string const&, 2018-09-05) changed the treatment of the empty string in CMP0018 diagnostic logic. Restore the behavior.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index f504b9f..c45acf7 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -828,11 +828,8 @@ void cmGlobalGenerator::EnableLanguage(
std::string sharedLibFlagsVar = "CMAKE_SHARED_LIBRARY_";
sharedLibFlagsVar += lang;
sharedLibFlagsVar += "_FLAGS";
- std::string const& sharedLibFlags =
+ this->LanguageToOriginalSharedLibFlags[lang] =
mf->GetSafeDefinition(sharedLibFlagsVar);
- if (!sharedLibFlags.empty()) {
- this->LanguageToOriginalSharedLibFlags[lang] = sharedLibFlags;
- }
// Translate compiler ids for compatibility.
this->CheckCompilerIdCompatibility(mf, lang);