summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 834f705..af4c950 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2207,6 +2207,13 @@ AddCompilerRequirementFlag(std::string &flags, cmTarget* target,
{
return;
}
+ const char* defaultStd
+ = this->Makefile->GetDefinition("CMAKE_" + lang + "_STANDARD_DEFAULT");
+ if (defaultStd && !*defaultStd)
+ {
+ // This compiler has no notion of language standard levels.
+ return;
+ }
std::string stdProp = lang + "_STANDARD";
const char *standardProp = target->GetProperty(stdProp);
if (!standardProp)
@@ -2269,8 +2276,6 @@ AddCompilerRequirementFlag(std::string &flags, cmTarget* target,
std::find(stds.begin(), stds.end(), standard);
assert(stdIt != stds.end());
- const char* defaultStd
- = this->Makefile->GetDefinition("CMAKE_" + lang + "_STANDARD_DEFAULT");
std::vector<std::string>::const_iterator defaultStdIt;
if (defaultStd)
{