summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-28 17:15:34 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-28 17:15:34 (GMT)
commit6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9 (patch)
tree9ed829e490d49db5636dce9d98420f42c250fb44 /Source
parent4932f59b4cd903169f691f708949ea2afb595492 (diff)
parent00d66557d49989f9813ba9f04beaa0a984699cf0 (diff)
downloadCMake-6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9.zip
CMake-6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9.tar.gz
CMake-6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9.tar.bz2
Merge branch 'fix-crash-on-bad-LANG_STANDARD' into release
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index d9dcad4..dd4a8f8 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2265,7 +2265,14 @@ AddCompilerRequirementFlag(std::string &flags, cmTarget* target,
std::vector<std::string>::const_iterator stdIt =
std::find(stds.begin(), stds.end(), standard);
- assert(stdIt != stds.end());
+ if (stdIt == stds.end())
+ {
+ std::string e =
+ lang + "_STANDARD is set to invalid value '" + standard + "'";
+ this->GetGlobalGenerator()->GetCMakeInstance()
+ ->IssueMessage(cmake::FATAL_ERROR, e, target->GetBacktrace());
+ return;
+ }
std::vector<std::string>::const_iterator defaultStdIt =
std::find(stds.begin(), stds.end(), defaultStd);