diff options
author | Brad King <brad.king@kitware.com> | 2014-04-21 13:35:42 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-04-21 13:35:42 (GMT) |
commit | b10083876ce01f6f9181688619136edd9daf26be (patch) | |
tree | 3cb6138c35b37001c6b1a8a68d9a0db076b1a89f /Source | |
parent | 658cc11cf19ed514f93afe3d837a0bd24377499d (diff) | |
parent | 8d0b1ccac13389255a318422d38b246cf47d9ace (diff) | |
download | CMake-b10083876ce01f6f9181688619136edd9daf26be.zip CMake-b10083876ce01f6f9181688619136edd9daf26be.tar.gz CMake-b10083876ce01f6f9181688619136edd9daf26be.tar.bz2 |
Merge topic 'feature-absence-hard-error'
8d0b1cca Features: FATAL_ERROR on compilers with no recorded features.
447fbb3f Tests: Execute compile features tests unconditionally.
597bb72e Tests: Run RunCMake.target_compile_features unconditionally.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 24 |
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; |