mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
cmLocalGenerator: Simplify logic for language standard or extension flag
This commit is contained in:
@@ -1494,15 +1494,15 @@ void cmLocalGenerator::AddCompilerRequirementFlag(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::string extProp = lang + "_EXTENSIONS";
|
std::string extProp = lang + "_EXTENSIONS";
|
||||||
std::string type = "EXTENSION";
|
|
||||||
bool ext = true;
|
bool ext = true;
|
||||||
if (const char* extPropValue = target->GetProperty(extProp)) {
|
if (const char* extPropValue = target->GetProperty(extProp)) {
|
||||||
if (cmSystemTools::IsOff(extPropValue)) {
|
if (cmSystemTools::IsOff(extPropValue)) {
|
||||||
ext = false;
|
ext = false;
|
||||||
type = "STANDARD";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string const type = ext ? "EXTENSION" : "STANDARD";
|
||||||
|
|
||||||
if (target->GetPropertyAsBool(lang + "_STANDARD_REQUIRED")) {
|
if (target->GetPropertyAsBool(lang + "_STANDARD_REQUIRED")) {
|
||||||
std::string option_flag =
|
std::string option_flag =
|
||||||
"CMAKE_" + lang + standardProp + "_" + type + "_COMPILE_OPTION";
|
"CMAKE_" + lang + standardProp + "_" + type + "_COMPILE_OPTION";
|
||||||
|
|||||||
Reference in New Issue
Block a user