summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-15 16:09:21 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-17 14:20:50 (GMT)
commit8d0b1ccac13389255a318422d38b246cf47d9ace (patch)
treeb3b0858f1ae8137dc1b0b62e0b25234186e1f248 /Source/cmMakefile.cxx
parent447fbb3facd09a29a2a402df258acf01cbf0bc34 (diff)
downloadCMake-8d0b1ccac13389255a318422d38b246cf47d9ace.zip
CMake-8d0b1ccac13389255a318422d38b246cf47d9ace.tar.gz
CMake-8d0b1ccac13389255a318422d38b246cf47d9ace.tar.bz2
Features: FATAL_ERROR on compilers with no recorded features.
Users of the new target_compile_features command are expected to check the existence of the CMAKE_CXX_COMPILE_FEATURES variable before attempting to use it to require features.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6ec40fb..07cfe12 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4604,8 +4604,28 @@ AddRequiredTargetFeature(cmTarget *target, const std::string& feature,
if (!featuresKnown || !*featuresKnown)
{
- // We know of no features for the compiler at all.
- return true;
+ cmOStringStream e;
+ if (error)
+ {
+ e << "no";
+ }
+ else
+ {
+ e << "No";
+ }
+ e << " known features for compiler\n\""
+ << this->GetDefinition("CMAKE_" + lang + "_COMPILER_ID")
+ << "\"\nversion "
+ << this->GetDefinition("CMAKE_" + lang + "_COMPILER_VERSION") << ".";
+ if (error)
+ {
+ *error = e.str();
+ }
+ else
+ {
+ this->IssueMessage(cmake::FATAL_ERROR, e.str());
+ }
+ return false;
}
std::vector<std::string> availableFeatures;