mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03:00
cmLocalGenerator: Simplify logic for language standard or extension flag
This commit is contained in:
1 parent
581fda598c
commit
0fc2d78ee9
1 file changed
+2
-2
@@ -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";
|
||||
|
||||
Reference in new issue
Block a user