summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CPack/cmCPackBundleGenerator.cxx16
-rw-r--r--Source/CPack/cmCPackBundleGenerator.h1
-rw-r--r--Source/CPack/cmCPackLog.cxx6
-rw-r--r--Source/CPack/cpack.cxx5
4 files changed, 28 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx
index d564308..62183e6 100644
--- a/Source/CPack/cmCPackBundleGenerator.cxx
+++ b/Source/CPack/cmCPackBundleGenerator.cxx
@@ -32,6 +32,22 @@ cmCPackBundleGenerator::~cmCPackBundleGenerator()
}
//----------------------------------------------------------------------
+int cmCPackBundleGenerator::InitializeInternal()
+{
+ const char* name = this->GetOption("CPACK_BUNDLE_NAME");
+ if(0 == name)
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "CPACK_BUNDLE_NAME must be set to use the Bundle generator."
+ << std::endl);
+
+ return 0;
+ }
+
+ return this->Superclass::InitializeInternal();
+}
+
+//----------------------------------------------------------------------
const char* cmCPackBundleGenerator::GetPackagingInstallPrefix()
{
this->InstallPrefix = "/";
diff --git a/Source/CPack/cmCPackBundleGenerator.h b/Source/CPack/cmCPackBundleGenerator.h
index 04c57b4..52c3c3a 100644
--- a/Source/CPack/cmCPackBundleGenerator.h
+++ b/Source/CPack/cmCPackBundleGenerator.h
@@ -34,6 +34,7 @@ public:
virtual ~cmCPackBundleGenerator();
protected:
+ virtual int InitializeInternal();
virtual const char* GetPackagingInstallPrefix();
int CompressFiles(const char* outFileName, const char* toplevel,
const std::vector<std::string>& files);
diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx
index 7b58039..82b990d 100644
--- a/Source/CPack/cmCPackLog.cxx
+++ b/Source/CPack/cmCPackLog.cxx
@@ -18,6 +18,7 @@
#include "cmCPackLog.h"
#include "cmGeneratedFileStream.h"
+#include "cmSystemTools.h"
//----------------------------------------------------------------------
cmCPackLog::cmCPackLog()
@@ -221,4 +222,9 @@ void cmCPackLog::Log(int tag, const char* file, int line,
{
this->NewLine = true;
}
+
+ if ( error )
+ {
+ cmSystemTools::SetErrorOccured();
+ }
}
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 330d61f..51001aa 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -474,5 +474,10 @@ int main (int argc, char *argv[])
#define cout no_cout_use_cmCPack_Log
}
+ if (cmSystemTools::GetErrorOccuredFlag())
+ {
+ return 1;
+ }
+
return 0;
}