diff options
author | Brad King <brad.king@kitware.com> | 2017-06-29 17:14:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-29 17:22:32 (GMT) |
commit | 0fc2d78ee97cb0ba73040be353bdedd4fc03c2b9 (patch) | |
tree | d8f2389f1f003793616985ff8aa10d669af9b484 /Source/cmLocalGenerator.cxx | |
parent | 581fda598cc4132519c5abdcd566cab42269ad1f (diff) | |
download | CMake-0fc2d78ee97cb0ba73040be353bdedd4fc03c2b9.zip CMake-0fc2d78ee97cb0ba73040be353bdedd4fc03c2b9.tar.gz CMake-0fc2d78ee97cb0ba73040be353bdedd4fc03c2b9.tar.bz2 |
cmLocalGenerator: Simplify logic for language standard or extension flag
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8e00303..f2c4644 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1494,15 +1494,15 @@ void cmLocalGenerator::AddCompilerRequirementFlag( return; } std::string extProp = lang + "_EXTENSIONS"; - std::string type = "EXTENSION"; bool ext = true; if (const char* extPropValue = target->GetProperty(extProp)) { if (cmSystemTools::IsOff(extPropValue)) { ext = false; - type = "STANDARD"; } } + std::string const type = ext ? "EXTENSION" : "STANDARD"; + if (target->GetPropertyAsBool(lang + "_STANDARD_REQUIRED")) { std::string option_flag = "CMAKE_" + lang + standardProp + "_" + type + "_COMPILE_OPTION"; |