diff options
author | Brad King <brad.king@kitware.com> | 2010-12-16 18:59:45 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-12-16 18:59:45 (GMT) |
commit | ceae8b10629c567f9a2097caa835a78e04d87d9e (patch) | |
tree | 2d72448f4251a8e76a5fc4b1d677bb43c59a7565 /Source/CPack | |
parent | 83b836f61e691f48a99124c6b16581ddc316920c (diff) | |
parent | 6d94ea3692c5dd3aafaf8183e31f6060ca2a4669 (diff) | |
download | CMake-ceae8b10629c567f9a2097caa835a78e04d87d9e.zip CMake-ceae8b10629c567f9a2097caa835a78e04d87d9e.tar.gz CMake-ceae8b10629c567f9a2097caa835a78e04d87d9e.tar.bz2 |
Merge topic 'CPack-MoreComponentControls'
6d94ea3 CPack use IsOn when it's better than IsSet
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.h | 3 | ||||
-rw-r--r-- | Source/CPack/cmCPackRPMGenerator.cxx | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index ded329d..46be99b 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -285,7 +285,7 @@ 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")) + if (IsOn("CPACK_ARCHIVE_COMPONENT_INSTALL")) { return true; } diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 71a2a0f..feda52c 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -1070,7 +1070,13 @@ bool cmCPackGenerator::IsSet(const char* name) const } //---------------------------------------------------------------------- -const char* cmCPackGenerator::GetOption(const char* op) +bool cmCPackGenerator::IsOn(const char* name) const +{ + return cmSystemTools::IsOn(GetOption(name)); +} + +//---------------------------------------------------------------------- +const char* cmCPackGenerator::GetOption(const char* op) const { const char* ret = this->MakefileMap->GetDefinition(op); if(!ret) diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h index c450763..f44a334 100644 --- a/Source/CPack/cmCPackGenerator.h +++ b/Source/CPack/cmCPackGenerator.h @@ -88,8 +88,9 @@ public: //! Set and get the options void SetOption(const char* op, const char* value); void SetOptionIfNotSet(const char* op, const char* value); - const char* GetOption(const char* op); + const char* GetOption(const char* op) const; bool IsSet(const char* name) const; + bool IsOn(const char* name) const; //! Set all the variables int SetCMakeRoot(); diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 34e93d3..a5db78f 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -108,7 +108,7 @@ int cmCPackRPMGenerator::PackageFiles() bool cmCPackRPMGenerator::SupportsComponentInstallation() const { - if (IsSet("CPACK_RPM_COMPONENT_INSTALL")) + if (IsOn("CPACK_RPM_COMPONENT_INSTALL")) { return true; } |