summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2018-11-08 14:06:52 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2018-11-08 14:32:18 (GMT)
commiteba7273c203f0698ccd716604cc298b7da1d3ee6 (patch)
treeca4b49d2d43b3e3a1ece47b85477889a9246cb49
parent17e98e00c449ebdceac980c0ce65c800030605db (diff)
downloadCMake-eba7273c203f0698ccd716604cc298b7da1d3ee6.zip
CMake-eba7273c203f0698ccd716604cc298b7da1d3ee6.tar.gz
CMake-eba7273c203f0698ccd716604cc298b7da1d3ee6.tar.bz2
cpack: Better error message when generator doesn't exist.
Currently the CPack error message when passed an invalid generator name reads like the generator failed to work, rather than the name was invalid.
-rw-r--r--Source/CPack/cpack.cxx5
-rw-r--r--Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt2
2 files changed, 4 insertions, 3 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index c083945..3df1b36 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -358,8 +358,9 @@ int main(int argc, char const* const* argv)
cpackGenerator->SetTraceExpand(traceExpand);
} else {
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
- "Cannot initialize CPack generator: " << gen
- << std::endl);
+ "Could not create CPack generator: " << gen
+ << std::endl);
+
parsed = 0;
}
diff --git a/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt b/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt
index fe4e455..a553bde 100644
--- a/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt
+++ b/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt
@@ -1 +1 @@
-^CPack Error: Cannot initialize CPack generator: NotAGenerator
+^CPack Error: Could not create CPack generator: NotAGenerator