ENH: Add packaging of source code (make package_source)
This commit is contained in:
parent
688e630f6b
commit
1e608c912c
|
@ -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"))
|
||||
{
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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"; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue