From 0fc2d78ee97cb0ba73040be353bdedd4fc03c2b9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 29 Jun 2017 13:14:53 -0400 Subject: cmLocalGenerator: Simplify logic for language standard or extension flag --- Source/cmLocalGenerator.cxx | 4 ++-- 1 file 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"; -- cgit v0.12