diff options
author | Brad King <brad.king@kitware.com> | 2007-07-02 18:56:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-07-02 18:56:57 (GMT) |
commit | 7f29f8966d672a2f8ef50b2249f6d826d1702bdc (patch) | |
tree | 3508ba83985e80094c6f68518dc49cdf6f9f910c /Source/cmInstallGenerator.h | |
parent | fda7753f5ccac7ed2d3c9822e55cebd42c4467d2 (diff) | |
download | CMake-7f29f8966d672a2f8ef50b2249f6d826d1702bdc.zip CMake-7f29f8966d672a2f8ef50b2249f6d826d1702bdc.tar.gz CMake-7f29f8966d672a2f8ef50b2249f6d826d1702bdc.tar.bz2 |
ENH: Further cleanup of installation script generation. The per-component and per-configuration testing is now done in cmake code instead of in the FILE(INSTALL) command. The generation of the cmake code to do these tests is centralized in cmInstallGenerator. Old-style shared library versioning and component/config support code has been removed from FILE(INSTALL). This commit is surrounded by the tags CMake-InstallGeneratorCleanup2-pre and CMake-InstallGeneratorCleanup2-post.
Diffstat (limited to 'Source/cmInstallGenerator.h')
-rw-r--r-- | Source/cmInstallGenerator.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index 9cd42f8..3abcf86 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -54,8 +54,9 @@ inline std::ostream& operator<<(std::ostream& os, class cmInstallGenerator { public: - cmInstallGenerator(); - cmInstallGenerator(const char* dest):Destination(dest?dest:"") {} + cmInstallGenerator(const char* destination, + std::vector<std::string> const& configurations, + const char* component); virtual ~cmInstallGenerator(); void Generate(std::ostream& os, const char* config, @@ -68,21 +69,33 @@ public: const char* properties = 0, const char* permissions_file = 0, const char* permissions_dir = 0, - std::vector<std::string> const& configurations - = std::vector<std::string>(), - const char* component = 0, const char* rename = 0, const char* literal_args = 0, cmInstallGeneratorIndent const& indent = cmInstallGeneratorIndent() ); - const char* GetDestination() const {return this->Destination.c_str();} + const char* GetDestination() const + { return this->Destination.c_str(); } + const std::vector<std::string>& GetConfigurations() const + { return this->Configurations; } protected: - virtual void GenerateScript(std::ostream& os)=0; + typedef cmInstallGeneratorIndent Indent; + virtual void GenerateScript(std::ostream& os); + virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent); + virtual void GenerateScriptActions(std::ostream& os, Indent const& indent); + std::string CreateConfigTest(const char* config); + std::string CreateConfigTest(std::vector<std::string> const& configs); + std::string CreateComponentTest(const char* component); + + // Information shared by most generator types. + std::string Destination; + std::vector<std::string> const Configurations; + std::string Component; + + // Information used during generation. const char* ConfigurationName; std::vector<std::string> const* ConfigurationTypes; - std::string Destination; }; #endif |