summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-05-31 17:18:11 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-03 13:56:03 (GMT)
commit619416f8a30c99f87869559cf3829ce6d3431dca (patch)
tree2d75276cda6176d19cac619fda2630450324ba4d
parent5e2d22c177add56b2538ab10954dfb049c5cf945 (diff)
downloadCMake-619416f8a30c99f87869559cf3829ce6d3431dca.zip
CMake-619416f8a30c99f87869559cf3829ce6d3431dca.tar.gz
CMake-619416f8a30c99f87869559cf3829ce6d3431dca.tar.bz2
The error message for VISIBILITY_PRESET now documents valid options.
Rather than just state the value for VISIBILITY_PRESET was invalid, we additionally list the accepted values.
-rw-r--r--Source/cmLocalGenerator.cxx4
-rw-r--r--Tests/RunCMake/VisibilityPreset/PropertyTypo-stderr.txt2
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 87d2232..e20747f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1914,7 +1914,9 @@ static void AddVisibilityCompileOption(std::string& flags,
strcmp(prop, "protected") != 0 && strcmp(prop, "internal") != 0) {
std::ostringstream e;
e << "Target " << target->GetName() << " uses unsupported value \"" << prop
- << "\" for " << flagDefine << ".";
+ << "\" for " << flagDefine << "."
+ << " The supported values are: default, hidden, protected, and "
+ "internal.";
cmSystemTools::Error(e.str());
return;
}
diff --git a/Tests/RunCMake/VisibilityPreset/PropertyTypo-stderr.txt b/Tests/RunCMake/VisibilityPreset/PropertyTypo-stderr.txt
index ca8c33f..a63591f 100644
--- a/Tests/RunCMake/VisibilityPreset/PropertyTypo-stderr.txt
+++ b/Tests/RunCMake/VisibilityPreset/PropertyTypo-stderr.txt
@@ -1 +1 @@
-CMake Error: Target visibility_preset uses unsupported value \"hiden\" for CXX_VISIBILITY_PRESET
+CMake Error: Target visibility_preset uses unsupported value \"hiden\" for CXX_VISIBILITY_PRESET. The supported values are: default, hidden, protected, and internal.