diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-04-17 19:26:54 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-04-17 19:26:54 (GMT) |
commit | 1e608c912cf5f5f61f7fd8d66000549aa9621b88 (patch) | |
tree | 55bf71550f00374e63cfd24f0b8c1a63e8e91338 /Source | |
parent | 688e630f6b8f583f9adccb00906eb6e7913cf4f2 (diff) | |
download | CMake-1e608c912cf5f5f61f7fd8d66000549aa9621b88.zip CMake-1e608c912cf5f5f61f7fd8d66000549aa9621b88.tar.gz CMake-1e608c912cf5f5f61f7fd8d66000549aa9621b88.tar.bz2 |
ENH: Add packaging of source code (make package_source)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 14 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.h | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 79181cc..b44c44f 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1313,6 +1313,20 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) = this->CreateGlobalTarget(this->GetPackageTargetName(), "Run CPack packaging tool...", &cpackCommandLines, depends); + // CPack + cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); + singleLine.erase(singleLine.begin(), singleLine.end()); + depends.erase(depends.begin(), depends.end()); + singleLine.push_back(this->GetCMakeInstance()->GetCPackCommand()); + singleLine.push_back("--config"); + configFile = mf->GetStartOutputDirectory();; + configFile += "/CPackSourceConfig.cmake"; + singleLine.push_back(configFile); + cpackCommandLines.push_back(singleLine); + (*targets)[this->GetPackageSourceTargetName()] + = this->CreateGlobalTarget(this->GetPackageSourceTargetName(), + "Run CPack packaging tool for source...", &cpackCommandLines, depends); + // Test if(mf->IsOn("CMAKE_TESTING_ENABLED")) { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 66a35a8..9325107 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -185,6 +185,7 @@ public: virtual const char* GetPreinstallTargetName() { return 0; } virtual const char* GetTestTargetName() { return "RUN_TESTS"; } virtual const char* GetPackageTargetName() { return "PACKAGE"; } + virtual const char* GetPackageSourceTargetName(){ return 0; } virtual const char* GetEditCacheTargetName() { return 0; } virtual const char* GetRebuildCacheTargetName() { return 0; } diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 6ad6ec9..76bc011 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -144,6 +144,7 @@ protected: virtual const char* GetPreinstallTargetName() { return "preinstall"; } virtual const char* GetTestTargetName() { return "test"; } virtual const char* GetPackageTargetName() { return "package"; } + virtual const char* GetPackageSourceTargetName(){ return "package_source"; } virtual const char* GetEditCacheTargetName() { return "edit_cache"; } virtual const char* GetRebuildCacheTargetName() { return "rebuild_cache"; } |