summaryrefslogtreecommitdiff
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-05-30 15:03:45 +0200
committerStephen Kelly <steveire@gmail.com>2014-05-31 12:16:12 +0200
commit60a981ea8eda7a5af679ca3b2e4d54bc50ad61b3 (patch)
treef2344920e6c0358ca970ec70302a79e2dbc58f43 /Source/cmLocalGenerator.cxx
parent8afbb346c67c60dcf9383f5e58307d629eafb855 (diff)
downloadcmake-60a981ea8eda7a5af679ca3b2e4d54bc50ad61b3.tar.gz
Features: Enable compiler extensions by default.
Compilers enable their extensions by default, and disabling them implicitly can lead to results which are surprising or non-obvious to debug. http://public.kitware.com/pipermail/cmake-developers/2014-May/010575.html http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10214 https://www.mail-archive.com/cmake-developers@cmake.org/msg10116.html (Compiler feature extensions by default, 29 May 2014)
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f83981e2d4..543d58db5b 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2195,8 +2195,16 @@ AddCompilerRequirementFlag(std::string &flags, cmTarget* target,
return;
}
std::string extProp = lang + "_EXTENSIONS";
- bool ext = target->GetPropertyAsBool(extProp);
- std::string type = ext ? "EXTENSION" : "STANDARD";
+ std::string type = "EXTENSION";
+ bool ext = true;
+ if (const char* extPropValue = target->GetProperty(extProp))
+ {
+ if (cmSystemTools::IsOff(extPropValue))
+ {
+ ext = false;
+ type = "STANDARD";
+ }
+ }
if (target->GetPropertyAsBool(lang + "_STANDARD_REQUIRED"))
{