CPack backward compatibility fix 2.8.3-2.8.2 (bug 11452)
One should set CPACK_ARCHIVE_COMPONENT_INSTALL=1 in order to trigger component install for ARCHIVE generators
This commit is contained in:
parent
bd44b2cc5b
commit
d0eb89c17b
|
@ -228,6 +228,7 @@ int cmCPackArchiveGenerator::PackageFiles()
|
||||||
|
|
||||||
PrepareGroupingKind();
|
PrepareGroupingKind();
|
||||||
|
|
||||||
|
if (SupportsComponentInstallation()) {
|
||||||
// CASE 1 : COMPONENT ALL-IN-ONE package
|
// CASE 1 : COMPONENT ALL-IN-ONE package
|
||||||
// If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
|
// If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
|
||||||
// then the package file is unique and should be open here.
|
// then the package file is unique and should be open here.
|
||||||
|
@ -243,6 +244,7 @@ int cmCPackArchiveGenerator::PackageFiles()
|
||||||
{
|
{
|
||||||
return PackageComponents(ignoreComponentGroup);
|
return PackageComponents(ignoreComponentGroup);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// CASE 3 : NON COMPONENT package.
|
// CASE 3 : NON COMPONENT package.
|
||||||
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
|
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
|
||||||
|
@ -278,5 +280,15 @@ int cmCPackArchiveGenerator::GenerateHeader(std::ostream*)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmCPackArchiveGenerator::SupportsComponentInstallation() const {
|
bool cmCPackArchiveGenerator::SupportsComponentInstallation() const {
|
||||||
|
// The Component installation support should only
|
||||||
|
// be activated if explicitly requested by the user
|
||||||
|
// (for backward compatibility reason)
|
||||||
|
if (IsSet("CPACK_ARCHIVE_COMPONENT_INSTALL"))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue