summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack')
-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;
}