summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-02 14:44:28 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-06-02 14:44:28 (GMT)
commit7b888a56242f451ce6771145f5864ec51abd0885 (patch)
tree295f19d036005fb1d8f338f106db222cb93c5d5b /Source
parent4b8ec7514a4214b526687b12ed2f310697d395ad (diff)
parent60a981ea8eda7a5af679ca3b2e4d54bc50ad61b3 (diff)
downloadCMake-7b888a56242f451ce6771145f5864ec51abd0885.zip
CMake-7b888a56242f451ce6771145f5864ec51abd0885.tar.gz
CMake-7b888a56242f451ce6771145f5864ec51abd0885.tar.bz2
Merge topic 'feature-extensions-by-default'
60a981ea Features: Enable compiler extensions by default.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f83981e..543d58d 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"))
{