diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-08-03 19:26:30 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-08-03 19:26:30 (GMT) |
commit | 68674bd0d795b1d560e8b819251480a753ba9882 (patch) | |
tree | db448fae4ab974786009ff09a6fea7c052b0137b /Source/CPack/cmCPackGenericGenerator.cxx | |
parent | bf0c200f0a8f494f3e78465ab8be0763ecdcbb6d (diff) | |
download | CMake-68674bd0d795b1d560e8b819251480a753ba9882.zip CMake-68674bd0d795b1d560e8b819251480a753ba9882.tar.gz CMake-68674bd0d795b1d560e8b819251480a753ba9882.tar.bz2 |
ENH: better error messages from the debian package generator
-don't display the cpack help if a generator failed with some problem
-check for cmSystemTools::GetErrorOccuredFlag()
Alex
Diffstat (limited to 'Source/CPack/cmCPackGenericGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackGenericGenerator.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx index 64b283c..1987a4d 100644 --- a/Source/CPack/cmCPackGenericGenerator.cxx +++ b/Source/CPack/cmCPackGenericGenerator.cxx @@ -653,7 +653,7 @@ int cmCPackGenericGenerator::ProcessGenerator() tempDirectory = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); } if ( !this->CompressFiles(tempPackageFileName, - tempDirectory, gl.GetFiles()) ) + tempDirectory, gl.GetFiles()) || cmSystemTools::GetErrorOccuredFlag()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory" << std::endl); @@ -695,7 +695,13 @@ int cmCPackGenericGenerator::Initialize(const char* name, cmMakefile* mf, "Cannot initialize the generator" << std::endl); return 0; } - return this->InitializeInternal(); + int result = this->InitializeInternal(); + if (cmSystemTools::GetErrorOccuredFlag()) + { + return 0; + } + + return result; } //---------------------------------------------------------------------- |