summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-02 13:34:16 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-07 16:11:18 (GMT)
commitf97bf4370c283432c4e14fe54ed481d5d9b7ceef (patch)
tree6964c99045b0345b32e45ad1bb374fc75c2a6292 /Source
parent03355d6b5b382020e7dafb28605e6d8d2f20de3c (diff)
downloadCMake-f97bf4370c283432c4e14fe54ed481d5d9b7ceef.zip
CMake-f97bf4370c283432c4e14fe54ed481d5d9b7ceef.tar.gz
CMake-f97bf4370c283432c4e14fe54ed481d5d9b7ceef.tar.bz2
Features: Add cxx_auto_type.
Record the availability of this feature for GNU 4.8 on (UNIX AND NOT APPLE) only. In the future, availability can be recorded for earlier GNU, for other platforms and for other compilers. Initially the affected configurations are as restricted as possible to allow for easy testing while extending the features vector in only one dimension. The error message when using the set_property API directly is not very good, but follow up commits will provide origin debugging of the property and a target_compile_features command which will provide a configure-time backtrace when possible.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 64163de..0b3c43e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -41,7 +41,8 @@
#include <ctype.h> // for isspace
#include <assert.h>
-#define FOR_EACH_CXX_FEATURE(F)
+#define FOR_EACH_CXX_FEATURE(F) \
+ F(cxx_auto_type)
class cmMakefile::Internals
{
@@ -2453,6 +2454,12 @@ const char* cmMakefile::GetDefinition(const std::string& name) const
{
this->Internal->VarUsageStack.top().insert(name);
}
+ if (name == "CMAKE_CXX_KNOWN_FEATURES")
+ {
+#define STRING_LIST_ELEMENT(F) ";" #F
+ return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
+#undef STRING_LIST_ELEMENT
+ }
const char* def = this->Internal->VarStack.top().Get(name);
if(!def)
{
@@ -4520,7 +4527,15 @@ AddRequiredTargetFeature(cmTarget *target, const std::string& feature,
if (!isCxxFeature)
{
cmOStringStream e;
- e << "specified unknown feature \"" << feature << "\" specified for "
+ if (error)
+ {
+ e << "specified";
+ }
+ else
+ {
+ e << "Specified";
+ }
+ e << " unknown feature \"" << feature << "\" for "
"target \"" << target->GetName() << "\".";
if (error)
{