summaryrefslogtreecommitdiffstats
path: root/Source/cmStandardLevelResolver.cxx
diff options
context:
space:
mode:
authorJustin Goshi <jgoshi@microsoft.com>2020-07-02 18:26:20 (GMT)
committerJustin Goshi <jgoshi@microsoft.com>2020-07-06 18:40:39 (GMT)
commit2f383d852d8d946a61419fe5f4b5c8501216dae9 (patch)
tree26423c46641812fa92f29c418f03cf47d2bbc5ca /Source/cmStandardLevelResolver.cxx
parentcc96fb617b65ffa9db8dd3f242ee3b9319b4c4c4 (diff)
downloadCMake-2f383d852d8d946a61419fe5f4b5c8501216dae9.zip
CMake-2f383d852d8d946a61419fe5f4b5c8501216dae9.tar.gz
CMake-2f383d852d8d946a61419fe5f4b5c8501216dae9.tar.bz2
fileapi: Support multiple backtraces for language standard
Diffstat (limited to 'Source/cmStandardLevelResolver.cxx')
-rw-r--r--Source/cmStandardLevelResolver.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx
index 3592b11..5e30680 100644
--- a/Source/cmStandardLevelResolver.cxx
+++ b/Source/cmStandardLevelResolver.cxx
@@ -58,7 +58,11 @@ struct StanardLevelComputer
std::string& newRequiredStandard,
std::string* error) const
{
- newRequiredStandard.clear();
+ if (currentLangStandardValue) {
+ newRequiredStandard = *currentLangStandardValue;
+ } else {
+ newRequiredStandard.clear();
+ }
auto needed = this->HighestStandardNeeded(makefile, feature);