[Cmake-commits] [cmake-commits] david.cole committed cmGetCMakePropertyCommand.cxx 1.8 1.9 cmGetCMakePropertyCommand.h 1.8 1.9 cmGlobalGenerator.h 1.111 1.112 cmInstallCommand.cxx 1.47 1.48 cmInstallFilesCommand.cxx 1.29 1.30 cmInstallProgramsCommand.cxx 1.22 1.23 cmInstallTargetGenerator.h 1.25 1.26 cmInstallTargetsCommand.cxx 1.15 1.16
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Jul 8 11:52:27 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv11595/Source
Modified Files:
cmGetCMakePropertyCommand.cxx cmGetCMakePropertyCommand.h
cmGlobalGenerator.h cmInstallCommand.cxx
cmInstallFilesCommand.cxx cmInstallProgramsCommand.cxx
cmInstallTargetGenerator.h cmInstallTargetsCommand.cxx
Log Message:
ENH: Further refinement of the CPack components functionality from Doug Gregor.
Details:
==========
- New cpack_add_component, cpack_add_component_group, and
cpack_add_install_type "commands" defined as macros in the CPack
module.
- Documentation for all of the variables and commands in the CPack module.
- Added get_cmake_property(... COMPONENTS) to CMake to ask for the
names of all components. Used in the CPack module to automatically
build component-based installers. (Set CPACK_MONOLITHIC_INSTALL to
turn off component-based installation).
- A group can declare its PARENT_GROUP, to build an arbitrary
hierarchy of groups.
- New CPack command cpack_configure_downloads, which creates an
installer that downloads only the selected components on-the-fly.
Those components marked DOWNLOADED will be separate packages
downloaded on-the-fly (or, all packages can be marked as such with the
ALL option to cpack_configure_downloads). Individual components are
compressed with ZIP at installer-creation time and
downloaded/uncompressed by the installer as needed. This feature is
only available on Windows with NSIS at the moment.
- NSIS installers can install themselves and enable the "Change"
button in Add/Remove programs, allowing users to go back and install
or remove components. This can be disabled through
cpack_configure_downloads, because it's only really useful is most of
the application's functionality is in downloaded components.
- Bug fix: automatically install everything whose COMPONENT was not
specified (it's a hidden, required group)
- Bug fix: fixed removal of components when re-running the NSIS
installer and unchecking components
- Bug fix: NSIS installers now only install/remove the minimal
number of files when re-run to update the installation (or by clicking
"Change" in Add/Remove programs)
Index: cmInstallTargetsCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetsCommand.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -C 2 -d -r1.15 -r1.16
*** cmInstallTargetsCommand.cxx 23 Jan 2008 15:27:59 -0000 1.15
--- cmInstallTargetsCommand.cxx 8 Jul 2008 15:52:25 -0000 1.16
***************
*** 63,66 ****
--- 63,69 ----
}
+ this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ ->AddInstallComponent("Unspecified");
+
return true;
}
Index: cmGetCMakePropertyCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetCMakePropertyCommand.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmGetCMakePropertyCommand.cxx 23 Jan 2008 15:27:59 -0000 1.8
--- cmGetCMakePropertyCommand.cxx 8 Jul 2008 15:52:25 -0000 1.9
***************
*** 50,53 ****
--- 50,69 ----
this->Makefile->GetListOfMacros(output);
}
+ else if ( args[1] == "COMPONENTS" )
+ {
+ const std::set<cmStdString>* components
+ = this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ ->GetInstallComponents();
+ std::set<cmStdString>::const_iterator compIt;
+ output = "";
+ for (compIt = components->begin(); compIt != components->end(); ++compIt)
+ {
+ if (compIt != components->begin())
+ {
+ output += ";";
+ }
+ output += *compIt;
+ }
+ }
else
{
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.111
retrieving revision 1.112
diff -C 2 -d -r1.111 -r1.112
*** cmGlobalGenerator.h 3 Jun 2008 13:55:28 -0000 1.111
--- cmGlobalGenerator.h 8 Jul 2008 15:52:25 -0000 1.112
***************
*** 140,143 ****
--- 140,146 ----
void AddInstallComponent(const char* component);
+ const std::set<cmStdString>* GetInstallComponents() const
+ { return &InstallComponents; }
+
///! Add one installed target to the sets of the exports
void AddTargetToExports(const char* exportSet, cmTarget* target,
Index: cmInstallCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallCommand.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -C 2 -d -r1.47 -r1.48
*** cmInstallCommand.cxx 23 Apr 2008 15:13:25 -0000 1.47
--- cmInstallCommand.cxx 8 Jul 2008 15:52:25 -0000 1.48
***************
*** 385,388 ****
--- 385,399 ----
}
+ // Keep track of whether we will be performing an installation of
+ // any files of the given type.
+ bool installsArchive = false;
+ bool installsLibrary = false;
+ bool installsRuntime = false;
+ bool installsFramework = false;
+ bool installsBundle = false;
+ bool installsPrivateHeader = false;
+ bool installsPublicHeader = false;
+ bool installsResource = false;
+
// Generate install script code to install the given targets.
for(std::vector<cmTarget*>::iterator ti = targets.begin();
***************
*** 692,695 ****
--- 703,716 ----
}
+ // Keep track of whether we're installing anything in each category
+ installsArchive = installsArchive || archiveGenerator != 0;
+ installsLibrary = installsLibrary || libraryGenerator != 0;
+ installsRuntime = installsRuntime || runtimeGenerator != 0;
+ installsFramework = installsFramework || frameworkGenerator != 0;
+ installsBundle = installsBundle || bundleGenerator != 0;
+ installsPrivateHeader = installsPrivateHeader || privateHeaderGenerator != 0;
+ installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0;
+ installsResource = installsResource || resourceGenerator;
+
this->Makefile->AddInstallGenerator(archiveGenerator);
this->Makefile->AddInstallGenerator(libraryGenerator);
***************
*** 714,733 ****
// Tell the global generator about any installation component names specified
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(archiveArgs.GetComponent().c_str());
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(libraryArgs.GetComponent().c_str());
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(runtimeArgs.GetComponent().c_str());
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(frameworkArgs.GetComponent().c_str());
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(bundleArgs.GetComponent().c_str());
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(privateHeaderArgs.GetComponent().c_str());
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(publicHeaderArgs.GetComponent().c_str());
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(resourceArgs.GetComponent().c_str());
return true;
--- 735,778 ----
// Tell the global generator about any installation component names specified
! if (installsArchive)
! {
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(archiveArgs.GetComponent().c_str());
! }
! if (installsLibrary)
! {
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(libraryArgs.GetComponent().c_str());
! }
! if (installsRuntime)
! {
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(runtimeArgs.GetComponent().c_str());
! }
! if (installsFramework)
! {
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(frameworkArgs.GetComponent().c_str());
! }
! if (installsBundle)
! {
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(bundleArgs.GetComponent().c_str());
! }
! if (installsPrivateHeader)
! {
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(privateHeaderArgs.GetComponent().c_str());
! }
! if (installsPublicHeader)
! {
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(publicHeaderArgs.GetComponent().c_str());
! }
! if (installsResource)
! {
! this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
! ->AddInstallComponent(resourceArgs.GetComponent().c_str());
! }
return true;
Index: cmGetCMakePropertyCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetCMakePropertyCommand.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C 2 -d -r1.8 -r1.9
*** cmGetCMakePropertyCommand.h 23 Jan 2008 15:27:59 -0000 1.8
--- cmGetCMakePropertyCommand.h 8 Jul 2008 15:52:25 -0000 1.9
***************
*** 63,67 ****
"property is stored in the variable VAR. If the property is "
"not found, CMake will report an error. Some supported properties "
! "include: VARIABLES, CACHE_VARIABLES, COMMANDS, and MACROS.";
}
--- 63,68 ----
"property is stored in the variable VAR. If the property is "
"not found, CMake will report an error. Some supported properties "
! "include: VARIABLES, CACHE_VARIABLES, COMMANDS, MACROS, and "
! "COMPONENTS.";
}
Index: cmInstallTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** cmInstallTargetGenerator.h 14 Apr 2008 19:02:44 -0000 1.25
--- cmInstallTargetGenerator.h 8 Jul 2008 15:52:25 -0000 1.26
***************
*** 32,36 ****
std::vector<std::string> const& configurations
= std::vector<std::string>(),
! const char* component = "",
bool optional = false
);
--- 32,36 ----
std::vector<std::string> const& configurations
= std::vector<std::string>(),
! const char* component = "Unspecified",
bool optional = false
);
Index: cmInstallFilesCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallFilesCommand.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -C 2 -d -r1.29 -r1.30
*** cmInstallFilesCommand.cxx 28 Jan 2008 13:38:35 -0000 1.29
--- cmInstallFilesCommand.cxx 8 Jul 2008 15:52:25 -0000 1.30
***************
*** 60,63 ****
--- 60,66 ----
}
+ this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ ->AddInstallComponent("Unspecified");
+
return true;
}
***************
*** 127,131 ****
const char* no_permissions = "";
const char* no_rename = "";
! const char* no_component = "";
std::vector<std::string> no_configurations;
this->Makefile->AddInstallGenerator(
--- 130,134 ----
const char* no_permissions = "";
const char* no_rename = "";
! const char* no_component = "Unspecified";
std::vector<std::string> no_configurations;
this->Makefile->AddInstallGenerator(
Index: cmInstallProgramsCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmInstallProgramsCommand.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -C 2 -d -r1.22 -r1.23
*** cmInstallProgramsCommand.cxx 16 Feb 2008 18:05:03 -0000 1.22
--- cmInstallProgramsCommand.cxx 8 Jul 2008 15:52:25 -0000 1.23
***************
*** 39,42 ****
--- 39,45 ----
}
+ this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
+ ->AddInstallComponent("Unspecified");
+
return true;
}
***************
*** 88,92 ****
const char* no_permissions = "";
const char* no_rename = "";
! const char* no_component = "";
std::vector<std::string> no_configurations;
this->Makefile->AddInstallGenerator(
--- 91,95 ----
const char* no_permissions = "";
const char* no_rename = "";
! const char* no_component = "Unspecified";
std::vector<std::string> no_configurations;
this->Makefile->AddInstallGenerator(
More information about the Cmake-commits
mailing list