diff options
Diffstat (limited to 'Source/CPack/cmCPackGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index d4135ceb94..21eda790c4 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -2,24 +2,24 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCPackGenerator.h" +#include <algorithm> +#include <cmsys/FStream.hxx> +#include <cmsys/Glob.hxx> +#include <cmsys/RegularExpression.hxx> +#include <list> +#include <utility> + #include "cmCPackComponentGroup.h" #include "cmCPackLog.h" #include "cmCryptoHash.h" #include "cmGeneratedFileStream.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" -#include "cmState.h" +#include "cmStateSnapshot.h" #include "cmXMLSafe.h" #include "cm_auto_ptr.hxx" #include "cmake.h" -#include <algorithm> -#include <cmsys/FStream.hxx> -#include <cmsys/Glob.hxx> -#include <cmsys/RegularExpression.hxx> -#include <list> -#include <utility> - #if defined(__HAIKU__) #include <FindDirectory.h> #include <StorageDefs.h> @@ -1074,6 +1074,24 @@ bool cmCPackGenerator::IsOn(const std::string& name) const return cmSystemTools::IsOn(GetOption(name)); } +bool cmCPackGenerator::IsSetToOff(const std::string& op) const +{ + const char* ret = this->MakefileMap->GetDefinition(op); + if (ret && *ret) { + return cmSystemTools::IsOff(ret); + } + return false; +} + +bool cmCPackGenerator::IsSetToEmpty(const std::string& op) const +{ + const char* ret = this->MakefileMap->GetDefinition(op); + if (ret) { + return !*ret; + } + return false; +} + const char* cmCPackGenerator::GetOption(const std::string& op) const { const char* ret = this->MakefileMap->GetDefinition(op); |