Features: Include the language of the compiler in error messages.
This commit is contained in:
parent
c4f4dac2d5
commit
bbfd4cd48f
|
@ -4560,7 +4560,7 @@ AddRequiredTargetFeature(cmTarget *target, const std::string& feature,
|
||||||
{
|
{
|
||||||
e << "No";
|
e << "No";
|
||||||
}
|
}
|
||||||
e << " known features for compiler\n\""
|
e << " known features for " << lang << " compiler\n\""
|
||||||
<< this->GetDefinition("CMAKE_" + lang + "_COMPILER_ID")
|
<< this->GetDefinition("CMAKE_" + lang + "_COMPILER_ID")
|
||||||
<< "\"\nversion "
|
<< "\"\nversion "
|
||||||
<< this->GetDefinition("CMAKE_" + lang + "_COMPILER_VERSION") << ".";
|
<< this->GetDefinition("CMAKE_" + lang + "_COMPILER_VERSION") << ".";
|
||||||
|
@ -4583,7 +4583,7 @@ AddRequiredTargetFeature(cmTarget *target, const std::string& feature,
|
||||||
{
|
{
|
||||||
cmOStringStream e;
|
cmOStringStream e;
|
||||||
e << "The compiler feature \"" << feature
|
e << "The compiler feature \"" << feature
|
||||||
<< "\" is not known to compiler\n\""
|
<< "\" is not known to " << lang << " compiler\n\""
|
||||||
<< this->GetDefinition("CMAKE_" + lang + "_COMPILER_ID")
|
<< this->GetDefinition("CMAKE_" + lang + "_COMPILER_ID")
|
||||||
<< "\"\nversion "
|
<< "\"\nversion "
|
||||||
<< this->GetDefinition("CMAKE_" + lang + "_COMPILER_VERSION") << ".";
|
<< this->GetDefinition("CMAKE_" + lang + "_COMPILER_VERSION") << ".";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
CMake Error at NoSupportedCxxFeatures.cmake:3 \(target_compile_features\):
|
CMake Error at NoSupportedCxxFeatures.cmake:3 \(target_compile_features\):
|
||||||
target_compile_features no known features for compiler
|
target_compile_features no known features for CXX compiler
|
||||||
|
|
||||||
"[^"]*"
|
"[^"]*"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
CMake Error in CMakeLists.txt:
|
CMake Error in CMakeLists.txt:
|
||||||
No known features for compiler
|
No known features for CXX compiler
|
||||||
|
|
||||||
"[^"]*"
|
"[^"]*"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
CMake Error at no_matching_cxx_feature.cmake:[0-9][0-9]? \((target_compile_features|message)\):
|
CMake Error at no_matching_cxx_feature.cmake:[0-9][0-9]? \((target_compile_features|message)\):
|
||||||
The compiler feature "[^"]+" is not known to compiler
|
The compiler feature "[^"]+" is not known to CXX compiler
|
||||||
|
|
||||||
"[^"]*"
|
"[^"]*"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ if (NOT ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";gnu_cxx_typeof;"
|
||||||
AND NOT ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";msvc_cxx_sealed;" )
|
AND NOT ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";msvc_cxx_sealed;" )
|
||||||
# Simulate passing the test.
|
# Simulate passing the test.
|
||||||
message(SEND_ERROR
|
message(SEND_ERROR
|
||||||
"The compiler feature \"gnu_cxx_dummy\" is not known to compiler\n\"GNU\"\nversion 4.8.1."
|
"The compiler feature \"gnu_cxx_dummy\" is not known to CXX compiler\n\"GNU\"\nversion 4.8.1."
|
||||||
)
|
)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue