summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cpack.cxx
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2012-07-03 13:28:07 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2012-07-03 13:28:07 (GMT)
commit926d634d3eba9b6a6d2043d44049ccd304e4ecac (patch)
tree80a01a8bf7edb8c23063327eafbc7aee3c1a29aa /Source/CPack/cpack.cxx
parentb689f8e928c638442e74246661e3c14fcb8c1ba4 (diff)
downloadCMake-926d634d3eba9b6a6d2043d44049ccd304e4ecac.zip
CMake-926d634d3eba9b6a6d2043d44049ccd304e4ecac.tar.gz
CMake-926d634d3eba9b6a6d2043d44049ccd304e4ecac.tar.bz2
CPack fix regression between 2.8.7 and 2.8.8 when running cpack with no arg.
In 2.8.7 running cpack with no arguments would run the packaging iff a CPackConfig.cmake file is found whereas In 2.8.8 it displays the help. This commit restore the 2.8.7. We should add a test for this but this is not included in this commit.
Diffstat (limited to 'Source/CPack/cpack.cxx')
-rw-r--r--Source/CPack/cpack.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 6f5055c..20824b1 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -294,8 +294,12 @@ int main (int argc, char *argv[])
cmDocumentation doc;
doc.addCPackStandardDocSections();
- /* Were we invoked to display doc or to do some work ? */
- if(doc.CheckOptions(argc, argv,"-G") || nocwd)
+ /* Were we invoked to display doc or to do some work ?
+ * Unlike cmake launching cpack with zero argument
+ * should launch cpack using "cpackConfigFile" if it exists
+ * in the current directory.
+ */
+ if((doc.CheckOptions(argc, argv,"-G") || nocwd) && !(argc==1))
{
help = true;
}