diff options
author | Brad King <brad.king@kitware.com> | 2018-11-06 11:27:41 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-11-06 11:27:41 -0500 |
commit | 47255060e7788123901012586f0c51c26bd849b6 (patch) | |
tree | e3bcd040543d9cb8bd5e1e6233d9844ddae1a6dd /Source | |
parent | fe997d80e0eaa154910797ee2612d9f05e003cf6 (diff) | |
parent | 20d5e77a270639a124fea587bb68b2fb6a5356fc (diff) | |
download | cmake-47255060e7788123901012586f0c51c26bd849b6.tar.gz |
Merge branch 'rename-cpack-ext-generator' into release-3.13
Merge-request: !2566
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackExternalGenerator.cxx (renamed from Source/CPack/cmCPackExtGenerator.cxx) | 45 | ||||
-rw-r--r-- | Source/CPack/cmCPackExternalGenerator.h (renamed from Source/CPack/cmCPackExtGenerator.h) | 25 | ||||
-rw-r--r-- | Source/CPack/cmCPackGeneratorFactory.cxx | 8 |
4 files changed, 41 insertions, 39 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 3cf6c8f871..311f3f4e56 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -890,7 +890,7 @@ set(CPACK_SRCS CPack/cmCPackArchiveGenerator.cxx CPack/cmCPackComponentGroup.cxx CPack/cmCPackDebGenerator.cxx - CPack/cmCPackExtGenerator.cxx + CPack/cmCPackExternalGenerator.cxx CPack/cmCPackGeneratorFactory.cxx CPack/cmCPackGenerator.cxx CPack/cmCPackLog.cxx diff --git a/Source/CPack/cmCPackExtGenerator.cxx b/Source/CPack/cmCPackExternalGenerator.cxx index 4c560b9d22..9f7b236a1b 100644 --- a/Source/CPack/cmCPackExtGenerator.cxx +++ b/Source/CPack/cmCPackExternalGenerator.cxx @@ -1,6 +1,6 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#include "cmCPackExtGenerator.h" +#include "cmCPackExternalGenerator.h" #include "cmAlgorithms.h" #include "cmCPackComponentGroup.h" @@ -16,25 +16,25 @@ #include <utility> #include <vector> -int cmCPackExtGenerator::InitializeInternal() +int cmCPackExternalGenerator::InitializeInternal() { - this->SetOption("CPACK_EXT_KNOWN_VERSIONS", "1.0"); + this->SetOption("CPACK_EXTERNAL_KNOWN_VERSIONS", "1.0"); - if (!this->ReadListFile("Internal/CPack/CPackExt.cmake")) { + if (!this->ReadListFile("Internal/CPack/CPackExternal.cmake")) { cmCPackLogger(cmCPackLog::LOG_ERROR, - "Error while executing CPackExt.cmake" << std::endl); + "Error while executing CPackExternal.cmake" << std::endl); return 0; } - std::string major = this->GetOption("CPACK_EXT_SELECTED_MAJOR"); + std::string major = this->GetOption("CPACK_EXTERNAL_SELECTED_MAJOR"); if (major == "1") { - this->Generator = cm::make_unique<cmCPackExtVersion1Generator>(this); + this->Generator = cm::make_unique<cmCPackExternalVersion1Generator>(this); } return this->Superclass::InitializeInternal(); } -int cmCPackExtGenerator::PackageFiles() +int cmCPackExternalGenerator::PackageFiles() { Json::StreamWriterBuilder builder; builder["indentation"] = " "; @@ -57,12 +57,12 @@ int cmCPackExtGenerator::PackageFiles() return 0; } - const char* packageScript = this->GetOption("CPACK_EXT_PACKAGE_SCRIPT"); + const char* packageScript = this->GetOption("CPACK_EXTERNAL_PACKAGE_SCRIPT"); if (packageScript && *packageScript) { if (!cmSystemTools::FileIsFullPath(packageScript)) { cmCPackLogger( cmCPackLog::LOG_ERROR, - "CPACK_EXT_PACKAGE_SCRIPT does not contain a full file path" + "CPACK_EXTERNAL_PACKAGE_SCRIPT does not contain a full file path" << std::endl); return 0; } @@ -77,12 +77,12 @@ int cmCPackExtGenerator::PackageFiles() return 1; } -bool cmCPackExtGenerator::SupportsComponentInstallation() const +bool cmCPackExternalGenerator::SupportsComponentInstallation() const { return true; } -int cmCPackExtGenerator::InstallProjectViaInstallCommands( +int cmCPackExternalGenerator::InstallProjectViaInstallCommands( bool setDestDir, const std::string& tempInstallDirectory) { if (this->StagingEnabled()) { @@ -93,7 +93,7 @@ int cmCPackExtGenerator::InstallProjectViaInstallCommands( return 1; } -int cmCPackExtGenerator::InstallProjectViaInstallScript( +int cmCPackExternalGenerator::InstallProjectViaInstallScript( bool setDestDir, const std::string& tempInstallDirectory) { if (this->StagingEnabled()) { @@ -104,7 +104,7 @@ int cmCPackExtGenerator::InstallProjectViaInstallScript( return 1; } -int cmCPackExtGenerator::InstallProjectViaInstalledDirectories( +int cmCPackExternalGenerator::InstallProjectViaInstalledDirectories( bool setDestDir, const std::string& tempInstallDirectory, const mode_t* default_dir_mode) { @@ -116,7 +116,7 @@ int cmCPackExtGenerator::InstallProjectViaInstalledDirectories( return 1; } -int cmCPackExtGenerator::RunPreinstallTarget( +int cmCPackExternalGenerator::RunPreinstallTarget( const std::string& installProjectName, const std::string& installDirectory, cmGlobalGenerator* globalGenerator, const std::string& buildConfig) { @@ -128,7 +128,7 @@ int cmCPackExtGenerator::RunPreinstallTarget( return 1; } -int cmCPackExtGenerator::InstallCMakeProject( +int cmCPackExternalGenerator::InstallCMakeProject( bool setDestDir, const std::string& installDirectory, const std::string& baseTempInstallDirectory, const mode_t* default_dir_mode, const std::string& component, bool componentInstall, @@ -145,18 +145,19 @@ int cmCPackExtGenerator::InstallCMakeProject( return 1; } -bool cmCPackExtGenerator::StagingEnabled() const +bool cmCPackExternalGenerator::StagingEnabled() const { - return !cmSystemTools::IsOff(this->GetOption("CPACK_EXT_ENABLE_STAGING")); + return !cmSystemTools::IsOff( + this->GetOption("CPACK_EXTERNAL_ENABLE_STAGING")); } -cmCPackExtGenerator::cmCPackExtVersionGenerator::cmCPackExtVersionGenerator( - cmCPackExtGenerator* parent) +cmCPackExternalGenerator::cmCPackExternalVersionGenerator:: + cmCPackExternalVersionGenerator(cmCPackExternalGenerator* parent) : Parent(parent) { } -int cmCPackExtGenerator::cmCPackExtVersionGenerator::WriteVersion( +int cmCPackExternalGenerator::cmCPackExternalVersionGenerator::WriteVersion( Json::Value& root) { root["formatVersionMajor"] = this->GetVersionMajor(); @@ -165,7 +166,7 @@ int cmCPackExtGenerator::cmCPackExtVersionGenerator::WriteVersion( return 1; } -int cmCPackExtGenerator::cmCPackExtVersionGenerator::WriteToJSON( +int cmCPackExternalGenerator::cmCPackExternalVersionGenerator::WriteToJSON( Json::Value& root) { if (!this->WriteVersion(root)) { diff --git a/Source/CPack/cmCPackExtGenerator.h b/Source/CPack/cmCPackExternalGenerator.h index 103e56d073..176d6a9d9f 100644 --- a/Source/CPack/cmCPackExtGenerator.h +++ b/Source/CPack/cmCPackExternalGenerator.h @@ -1,7 +1,7 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cmCPackExtGenerator_h -#define cmCPackExtGenerator_h +#ifndef cmCPackExternalGenerator_h +#define cmCPackExternalGenerator_h #include "cmCPackGenerator.h" #include "cm_sys_stat.h" @@ -14,13 +14,13 @@ namespace Json { class Value; } -/** \class cmCPackExtGenerator +/** \class cmCPackExternalGenerator * \brief A generator for CPack External packaging tools */ -class cmCPackExtGenerator : public cmCPackGenerator +class cmCPackExternalGenerator : public cmCPackGenerator { public: - cmCPackTypeMacro(cmCPackExtGenerator, cmCPackGenerator); + cmCPackTypeMacro(cmCPackExternalGenerator, cmCPackGenerator); const char* GetOutputExtension() override { return ".json"; } @@ -54,12 +54,12 @@ protected: private: bool StagingEnabled() const; - class cmCPackExtVersionGenerator + class cmCPackExternalVersionGenerator { public: - cmCPackExtVersionGenerator(cmCPackExtGenerator* parent); + cmCPackExternalVersionGenerator(cmCPackExternalGenerator* parent); - virtual ~cmCPackExtVersionGenerator() = default; + virtual ~cmCPackExternalVersionGenerator() = default; virtual int WriteToJSON(Json::Value& root); @@ -69,20 +69,21 @@ private: int WriteVersion(Json::Value& root); - cmCPackExtGenerator* Parent; + cmCPackExternalGenerator* Parent; }; - class cmCPackExtVersion1Generator : public cmCPackExtVersionGenerator + class cmCPackExternalVersion1Generator + : public cmCPackExternalVersionGenerator { public: - using cmCPackExtVersionGenerator::cmCPackExtVersionGenerator; + using cmCPackExternalVersionGenerator::cmCPackExternalVersionGenerator; protected: int GetVersionMajor() override { return 1; } int GetVersionMinor() override { return 0; } }; - std::unique_ptr<cmCPackExtVersionGenerator> Generator; + std::unique_ptr<cmCPackExternalVersionGenerator> Generator; }; #endif diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index 8ef24f7702..2c5ab4d780 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -12,7 +12,7 @@ # include "cmCPackFreeBSDGenerator.h" #endif #include "cmCPackDebGenerator.h" -#include "cmCPackExtGenerator.h" +#include "cmCPackExternalGenerator.h" #include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmCPackNSISGenerator.h" @@ -111,9 +111,9 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory() this->RegisterGenerator("NuGet", "NuGet packages", cmCPackNuGetGenerator::CreateGenerator); } - if (cmCPackExtGenerator::CanGenerate()) { - this->RegisterGenerator("Ext", "CPack External packages", - cmCPackExtGenerator::CreateGenerator); + if (cmCPackExternalGenerator::CanGenerate()) { + this->RegisterGenerator("External", "CPack External packages", + cmCPackExternalGenerator::CreateGenerator); } #ifdef __APPLE__ if (cmCPackDragNDropGenerator::CanGenerate()) { |