diff options
-rw-r--r-- | Help/manual/cmake-server.7.rst | 7 | ||||
-rw-r--r-- | Modules/FindBoost.cmake | 6 | ||||
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmServerDictionary.h | 1 | ||||
-rw-r--r-- | Source/cmServerProtocol.cxx | 223 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 101 | ||||
-rw-r--r-- | Source/cmSystemTools.h | 2 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 6 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/VerifyResult.cmake | 14 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake | 7 |
10 files changed, 290 insertions, 79 deletions
diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index 25d364c..b4c1436 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -308,6 +308,9 @@ which will result in a response type "reply":: indicating that the server is ready for action. +Protocol version 1.3 introduces an optional flag on the target filegroup +that indicates if the filegroup represents :prop_tgt:`INTERFACE_SOURCES`. + Type "globalSettings" ^^^^^^^^^^^^^^^^^^^^^ @@ -524,6 +527,8 @@ FileGroups are used to group sources using similar settings together. Each fileGroup object may contain the following keys: +"isInterfaceSources" + true if the fileGroup represents :prop_tgt:`INTERFACE_SOURCES`. "language" contains the programming language used by all files in the group. "compileFlags" @@ -538,6 +543,8 @@ Each fileGroup object may contain the following keys: "defines" with a list of defines in the form "SOMEVALUE" or "SOMEVALUE=42". This value is encoded in the system's native shell format. +"isGenerated" + true if the files were generated. "sources" with a list of source files. diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index c14e402..f65a493 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -881,7 +881,11 @@ function(_Boost_COMPONENT_HEADERS component _hdrs) set(_Boost_CHRONO_HEADERS "boost/chrono.hpp") set(_Boost_CONTAINER_HEADERS "boost/container/container_fwd.hpp") set(_Boost_CONTRACT_HEADERS "boost/contract.hpp") - set(_Boost_CONTEXT_HEADERS "boost/context/detail/fcontext.hpp") + if(Boost_VERSION VERSION_LESS 106100) + set(_Boost_CONTEXT_HEADERS "boost/context/all.hpp") + else() + set(_Boost_CONTEXT_HEADERS "boost/context/detail/fcontext.hpp") + endif() set(_Boost_COROUTINE_HEADERS "boost/coroutine/all.hpp") set(_Boost_DATE_TIME_HEADERS "boost/date_time/date.hpp") set(_Boost_EXCEPTION_HEADERS "boost/exception/exception.hpp") diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5110008..6e18571 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 12) -set(CMake_VERSION_PATCH 20180902) +set(CMake_VERSION_PATCH 20180905) #set(CMake_VERSION_RC 1) diff --git a/Source/cmServerDictionary.h b/Source/cmServerDictionary.h index 685542c..ebf16eb 100644 --- a/Source/cmServerDictionary.h +++ b/Source/cmServerDictionary.h @@ -96,6 +96,7 @@ static const std::string kCTEST_COMMAND = "ctestCommand"; static const std::string kCTEST_INFO = "ctestInfo"; static const std::string kMINIMUM_CMAKE_VERSION = "minimumCMakeVersion"; static const std::string kIS_GENERATOR_PROVIDED_KEY = "isGeneratorProvided"; +static const std::string kIS_INTERFACE_SOURCES_KEY = "isInterfaceSources"; static const std::string kSTART_MAGIC = "[== \"CMake Server\" ==["; static const std::string kEND_MAGIC = "]== \"CMake Server\" ==]"; diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 31101e4..af4b466 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -256,7 +256,12 @@ bool cmServerProtocol::DoActivate(const cmServerRequest& /*request*/, std::pair<int, int> cmServerProtocol1::ProtocolVersion() const { - return std::make_pair(1, 2); + // Revision history + // 1, 1 - Report backtraces in codemodel response + // 1, 2 - Add target install destinations to codemodel + // 1, 3 - Add a flag to target filegroups indicating whether or not the + // filegroup is for INTERFACE_SOURCES + return std::make_pair(1, 3); } static void setErrorMessage(std::string* errorMessage, const std::string& text) @@ -593,6 +598,8 @@ cmServerResponse cmServerProtocol1::ProcessCMakeInputs( return request.Reply(result); } +const std::string kInterfaceSourcesLanguageDataKey = + "INTERFACE_SOURCES_LD_KEY"; class LanguageData { public: @@ -625,6 +632,12 @@ void LanguageData::SetDefines(const std::set<std::string>& defines) Defines = std::move(result); } +struct FileGroupSources +{ + bool IsInterfaceSources; + std::vector<std::string> Files; +}; + namespace std { template <> @@ -652,31 +665,35 @@ struct hash<LanguageData> } // namespace std static Json::Value DumpSourceFileGroup(const LanguageData& data, + bool isInterfaceSource, const std::vector<std::string>& files, const std::string& baseDir) { Json::Value result = Json::objectValue; + if (isInterfaceSource) { + result[kIS_INTERFACE_SOURCES_KEY] = true; + } if (!data.Language.empty()) { result[kLANGUAGE_KEY] = data.Language; - if (!data.Flags.empty()) { - result[kCOMPILE_FLAGS_KEY] = data.Flags; - } - if (!data.IncludePathList.empty()) { - Json::Value includes = Json::arrayValue; - for (auto const& i : data.IncludePathList) { - Json::Value tmp = Json::objectValue; - tmp[kPATH_KEY] = i.first; - if (i.second) { - tmp[kIS_SYSTEM_KEY] = i.second; - } - includes.append(tmp); + } + if (!data.Flags.empty()) { + result[kCOMPILE_FLAGS_KEY] = data.Flags; + } + if (!data.IncludePathList.empty()) { + Json::Value includes = Json::arrayValue; + for (auto const& i : data.IncludePathList) { + Json::Value tmp = Json::objectValue; + tmp[kPATH_KEY] = i.first; + if (i.second) { + tmp[kIS_SYSTEM_KEY] = i.second; } - result[kINCLUDE_PATH_KEY] = includes; - } - if (!data.Defines.empty()) { - result[kDEFINES_KEY] = fromStringList(data.Defines); + includes.append(tmp); } + result[kINCLUDE_PATH_KEY] = includes; + } + if (!data.Defines.empty()) { + result[kDEFINES_KEY] = fromStringList(data.Defines); } result[kIS_GENERATED_KEY] = data.IsGenerated; @@ -691,21 +708,19 @@ static Json::Value DumpSourceFileGroup(const LanguageData& data, return result; } -static Json::Value DumpSourceFilesList( - cmGeneratorTarget* target, const std::string& config, - const std::map<std::string, LanguageData>& languageDataMap) +static void PopulateFileGroupData( + cmGeneratorTarget* target, bool isInterfaceSources, + const std::vector<cmSourceFile*>& files, const std::string& config, + const std::map<std::string, LanguageData>& languageDataMap, + std::unordered_map<LanguageData, FileGroupSources>& fileGroups) { - // Collect sourcefile groups: - - std::vector<cmSourceFile*> files; - target->GetSourceFiles(files, config); - - std::unordered_map<LanguageData, std::vector<std::string>> fileGroups; for (cmSourceFile* file : files) { LanguageData fileData; fileData.Language = file->GetLanguage(); - if (!fileData.Language.empty()) { - const LanguageData& ld = languageDataMap.at(fileData.Language); + if (!fileData.Language.empty() || isInterfaceSources) { + const LanguageData& ld = isInterfaceSources + ? languageDataMap.at(kInterfaceSourcesLanguageDataKey) + : languageDataMap.at(fileData.Language); cmLocalGenerator* lg = target->GetLocalGenerator(); cmGeneratorExpressionInterpreter genexInterpreter( lg, target, config, target->GetName(), fileData.Language); @@ -733,10 +748,14 @@ static Json::Value DumpSourceFilesList( lg->AppendIncludeDirectories(includes, evaluatedIncludes, *file); for (const auto& include : includes) { + // INTERFACE_LIBRARY targets do not support the + // IsSystemIncludeDirectory call so just set it to false. + const bool isSystemInclude = isInterfaceSources + ? false + : target->IsSystemIncludeDirectory(include, config, + fileData.Language); fileData.IncludePathList.push_back( - std::make_pair(include, - target->IsSystemIncludeDirectory( - include, config, fileData.Language))); + std::make_pair(include, isSystemInclude)); } } @@ -765,14 +784,71 @@ static Json::Value DumpSourceFilesList( } fileData.IsGenerated = file->GetPropertyAsBool("GENERATED"); - std::vector<std::string>& groupFileList = fileGroups[fileData]; - groupFileList.push_back(file->GetFullPath()); + FileGroupSources& groupFileList = fileGroups[fileData]; + groupFileList.IsInterfaceSources = isInterfaceSources; + groupFileList.Files.push_back(file->GetFullPath()); + } +} + +static Json::Value DumpSourceFilesList( + cmGeneratorTarget* target, const std::string& config, + const std::map<std::string, LanguageData>& languageDataMap) +{ + const cmStateEnums::TargetType type = target->GetType(); + std::unordered_map<LanguageData, FileGroupSources> fileGroups; + + // Collect sourcefile groups: + + std::vector<cmSourceFile*> files; + if (type == cmStateEnums::INTERFACE_LIBRARY) { + // INTERFACE_LIBRARY targets do not create all the data structures + // associated with regular targets. If properties are explicitly specified + // for files in INTERFACE_SOURCES then we can get them through the Makefile + // rather than the target. + files = target->Makefile->GetSourceFiles(); + } else { + target->GetSourceFiles(files, config); + PopulateFileGroupData(target, false /* isInterfaceSources */, files, + config, languageDataMap, fileGroups); + } + + // Collect interface sourcefile groups: + + auto targetProp = target->Target->GetProperty("INTERFACE_SOURCES"); + if (targetProp != nullptr) { + cmGeneratorExpressionInterpreter genexInterpreter( + target->GetLocalGenerator(), target, config, target->GetName(), ""); + + auto evaluatedSources = cmsys::SystemTools::SplitString( + genexInterpreter.Evaluate(targetProp, "INTERFACE_SOURCES"), ';'); + + std::map<std::string, cmSourceFile*> filesMap; + for (auto file : files) { + filesMap[file->GetFullPath()] = file; + } + + std::vector<cmSourceFile*> interfaceSourceFiles; + for (const std::string& interfaceSourceFilePath : evaluatedSources) { + auto entry = filesMap.find(interfaceSourceFilePath); + if (entry != filesMap.end()) { + // use what we have since it has all the associated properties + interfaceSourceFiles.push_back(entry->second); + } else { + interfaceSourceFiles.push_back( + new cmSourceFile(target->Makefile, interfaceSourceFilePath)); + } + } + + PopulateFileGroupData(target, true /* isInterfaceSources */, + interfaceSourceFiles, config, languageDataMap, + fileGroups); } const std::string& baseDir = target->Makefile->GetCurrentSourceDirectory(); Json::Value result = Json::arrayValue; for (auto const& it : fileGroups) { - Json::Value group = DumpSourceFileGroup(it.first, it.second, baseDir); + Json::Value group = DumpSourceFileGroup( + it.first, it.second.IsInterfaceSources, it.second.Files, baseDir); if (!group.isNull()) { result.append(group); } @@ -882,6 +958,59 @@ static Json::Value DumpCTestConfigurationsList(const cmake* cm) return result; } +static void GetTargetProperty( + cmGeneratorExpressionInterpreter& genexInterpreter, + cmGeneratorTarget* target, const char* propertyName, + std::vector<std::string>& propertyValue) +{ + auto targetProp = target->Target->GetProperty(propertyName); + if (targetProp != nullptr) { + propertyValue = cmsys::SystemTools::SplitString( + genexInterpreter.Evaluate(targetProp, propertyName), ';'); + } +} + +static void CreateInterfaceSourcesEntry( + cmLocalGenerator* lg, cmGeneratorTarget* target, const std::string& config, + std::map<std::string, LanguageData>& languageDataMap) +{ + LanguageData& ld = languageDataMap[kInterfaceSourcesLanguageDataKey]; + ld.Language = ""; + + cmGeneratorExpressionInterpreter genexInterpreter(lg, target, config, + target->GetName(), ""); + std::vector<std::string> propertyValue; + GetTargetProperty(genexInterpreter, target, "INTERFACE_INCLUDE_DIRECTORIES", + propertyValue); + for (std::string const& i : propertyValue) { + ld.IncludePathList.push_back( + std::make_pair(i, false /* isSystemInclude */)); + } + + propertyValue.clear(); + GetTargetProperty(genexInterpreter, target, + "INTERFACE_SYSTEM_INCLUDE_DIRECTORIES", propertyValue); + for (std::string const& i : propertyValue) { + ld.IncludePathList.push_back( + std::make_pair(i, true /* isSystemInclude */)); + } + + propertyValue.clear(); + GetTargetProperty(genexInterpreter, target, "INTERFACE_COMPILE_OPTIONS", + propertyValue); + for (const auto& s : propertyValue) { + ld.Flags += " " + s; + } + + propertyValue.clear(); + GetTargetProperty(genexInterpreter, target, "INTERFACE_COMPILE_DEFINITIONS", + propertyValue); + if (!propertyValue.empty()) { + std::set<std::string> defines(propertyValue.begin(), propertyValue.end()); + ld.SetDefines(defines); + } +} + static Json::Value DumpTarget(cmGeneratorTarget* target, const std::string& config) { @@ -911,11 +1040,6 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, result[kTYPE_KEY] = typeName; result[kSOURCE_DIRECTORY_KEY] = lg->GetCurrentSourceDirectory(); result[kBUILD_DIRECTORY_KEY] = lg->GetCurrentBinaryDirectory(); - - if (type == cmStateEnums::INTERFACE_LIBRARY) { - return result; - } - result[kFULL_NAME_KEY] = target->GetFullName(config); if (target->Target->GetHaveInstallRule()) { @@ -1002,8 +1126,22 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, } std::set<std::string> languages; - target->GetLanguages(languages, config); std::map<std::string, LanguageData> languageDataMap; + if (type == cmStateEnums::INTERFACE_LIBRARY) { + // INTERFACE_LIBRARY targets do not create all the data structures + // associated with regular targets. If properties are explicitly specified + // for files in INTERFACE_SOURCES then we can get them through the Makefile + // rather than the target. + for (auto file : target->Makefile->GetSourceFiles()) { + const std::string& language = file->GetLanguage(); + if (!language.empty()) { + languages.insert(language); + } + } + } else { + target->GetLanguages(languages, config); + } + for (std::string const& lang : languages) { LanguageData& ld = languageDataMap[lang]; ld.Language = lang; @@ -1019,6 +1157,11 @@ static Json::Value DumpTarget(cmGeneratorTarget* target, } } + if (target->Target->GetProperty("INTERFACE_SOURCES") != nullptr) { + // Create an entry in the languageDataMap for interface sources. + CreateInterfaceSourcesEntry(lg, target, config, languageDataMap); + } + Json::Value sourceGroupsValue = DumpSourceFilesList(target, config, languageDataMap); if (!sourceGroupsValue.empty()) { diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 72fd2bb..79e5ccf 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -42,7 +42,6 @@ #include <ctype.h> #include <errno.h> #include <iostream> -#include <set> #include <sstream> #include <stdio.h> #include <stdlib.h> @@ -372,24 +371,36 @@ bool cmSystemTools::IsOn(const char* val) if (!val) { return false; } - size_t len = strlen(val); - if (len > 4) { - return false; + /* clang-format off */ + // "1" + if (val[0] == '1' && val[1] == '\0') { + return true; } - std::string v(val, len); - - static std::set<std::string> onValues; - if (onValues.empty()) { - onValues.insert("ON"); - onValues.insert("1"); - onValues.insert("YES"); - onValues.insert("TRUE"); - onValues.insert("Y"); + // "ON" + if ((val[0] == 'O' || val[0] == 'o') && + (val[1] == 'N' || val[1] == 'n') && val[2] == '\0') { + return true; } - for (char& c : v) { - c = static_cast<char>(toupper(c)); + // "Y", "YES" + if ((val[0] == 'Y' || val[0] == 'y') && (val[1] == '\0' || ( + (val[1] == 'E' || val[1] == 'e') && + (val[2] == 'S' || val[2] == 's') && val[3] == '\0'))) { + return true; } - return (onValues.count(v) > 0); + // "TRUE" + if ((val[0] == 'T' || val[0] == 't') && + (val[1] == 'R' || val[1] == 'r') && + (val[2] == 'U' || val[2] == 'u') && + (val[3] == 'E' || val[3] == 'e') && val[4] == '\0') { + return true; + } + /* clang-format on */ + return false; +} + +bool cmSystemTools::IsOn(const std::string& val) +{ + return cmSystemTools::IsOn(val.c_str()); } bool cmSystemTools::IsNOTFOUND(const char* val) @@ -402,30 +413,50 @@ bool cmSystemTools::IsNOTFOUND(const char* val) bool cmSystemTools::IsOff(const char* val) { - if (!val || !*val) { + // "" + if (!val || val[0] == '\0') { return true; } - size_t len = strlen(val); - // Try and avoid toupper() for large strings. - if (len > 6) { - return cmSystemTools::IsNOTFOUND(val); + /* clang-format off */ + // "0" + if (val[0] == '0' && val[1] == '\0') { + return true; } - - static std::set<std::string> offValues; - if (offValues.empty()) { - offValues.insert("OFF"); - offValues.insert("0"); - offValues.insert("NO"); - offValues.insert("FALSE"); - offValues.insert("N"); - offValues.insert("IGNORE"); + // "OFF" + if ((val[0] == 'O' || val[0] == 'o') && + (val[1] == 'F' || val[1] == 'f') && + (val[2] == 'F' || val[2] == 'f') && val[3] == '\0') { + return true; } - // Try and avoid toupper(). - std::string v(val, len); - for (char& c : v) { - c = static_cast<char>(toupper(c)); + // "N", "NO" + if ((val[0] == 'N' || val[0] == 'n') && (val[1] == '\0' || ( + (val[1] == 'O' || val[1] == 'o') && val[2] == '\0'))) { + return true; } - return (offValues.count(v) > 0); + // "FALSE" + if ((val[0] == 'F' || val[0] == 'f') && + (val[1] == 'A' || val[1] == 'a') && + (val[2] == 'L' || val[2] == 'l') && + (val[3] == 'S' || val[3] == 's') && + (val[4] == 'E' || val[4] == 'e') && val[5] == '\0') { + return true; + } + // "IGNORE" + if ((val[0] == 'I' || val[0] == 'i') && + (val[1] == 'G' || val[1] == 'g') && + (val[2] == 'N' || val[2] == 'n') && + (val[3] == 'O' || val[3] == 'o') && + (val[4] == 'R' || val[4] == 'r') && + (val[5] == 'E' || val[5] == 'e') && val[6] == '\0') { + return true; + } + /* clang-format on */ + return cmSystemTools::IsNOTFOUND(val); +} + +bool cmSystemTools::IsOff(const std::string& val) +{ + return cmSystemTools::IsOff(val.c_str()); } void cmSystemTools::ParseWindowsCommandLine(const char* command, diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index c0a1b6b..5c383ee 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -129,6 +129,7 @@ public: * as ifdef. */ static bool IsOn(const char* val); + static bool IsOn(const std::string& val); /** * does a string indicate a false or off value ? Note that this is @@ -138,6 +139,7 @@ public: * NOTFOUND, *-NOTFOUND or IGNORE will cause IsOff to return true. */ static bool IsOff(const char* val); + static bool IsOff(const std::string& val); ///! Return true if value is NOTFOUND or ends in -NOTFOUND. static bool IsNOTFOUND(const char* value); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index ea65e21..1dff675 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1207,7 +1207,11 @@ void cmVisualStudio10TargetGenerator::WriteCustomCommands(Elem& e0) this->GeneratorTarget->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) { if (cmSourceFile const* sf = this->LocalGenerator->CreateVCProjBuildRule()) { - this->WriteCustomCommand(e0, sf); + // Write directly rather than through WriteCustomCommand because + // we do not want the de-duplication and it has no dependencies. + if (cmCustomCommand const* command = sf->GetCustomCommand()) { + this->WriteCustomRule(e0, sf, *command); + } } } } diff --git a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/VerifyResult.cmake index 18ef63c..b4bdb61 100644 --- a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/VerifyResult.cmake @@ -1,7 +1,7 @@ function(checkPackageInfo_ TYPE FILE REGEX) getPackageInfo("${FILE}" "FILE_INFO_") if(NOT FILE_INFO_ MATCHES "${REGEX}") - message(FATAL_ERROR "Unexpected ${TYPE} in '${FILE}'; file info: '${FILE_INFO_}'") + message(FATAL_ERROR "Unexpected ${TYPE} in '${FILE}'; file info: '${FILE_INFO_}'; does not match '${REGEX}'") endif() endfunction() @@ -24,3 +24,15 @@ checkPackageInfo_("name" "${FOUND_FILE_3}" ".*${name_}${whitespaces_}:${whitespa checkPackageInfo_("group" "${FOUND_FILE_1}" ".*${group_}${whitespaces_}:${whitespaces_}default") checkPackageInfo_("group" "${FOUND_FILE_2}" ".*${group_}${whitespaces_}:${whitespaces_}second_group") checkPackageInfo_("group" "${FOUND_FILE_3}" ".*${group_}${whitespaces_}:${whitespaces_}default") + +# check package summaries (not available in DEB) +if(GENERATOR_TYPE STREQUAL "RPM") + checkPackageInfo_("summary" "${FOUND_FILE_1}" ".*Summary${whitespaces_}:${whitespaces_}Global summary") + checkPackageInfo_("summary" "${FOUND_FILE_2}" ".*Summary${whitespaces_}:${whitespaces_}Summary for pkg_2") + checkPackageInfo_("summary" "${FOUND_FILE_3}" ".*Summary${whitespaces_}:${whitespaces_}Global summary") +endif() + +# check package description +checkPackageInfo_("description" "${FOUND_FILE_1}" ".*Description${whitespaces_}:${whitespaces_}Description for pkg_1") +checkPackageInfo_("description" "${FOUND_FILE_2}" ".*Description${whitespaces_}:${whitespaces_}Description for pkg_2") +checkPackageInfo_("description" "${FOUND_FILE_3}" ".*Description${whitespaces_}:${whitespaces_}Description for pkg_3") diff --git a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake index 8719c0b..dc61d0a 100644 --- a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake +++ b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/test.cmake @@ -11,6 +11,13 @@ if(GENERATOR_TYPE STREQUAL "DEB" OR GENERATOR_TYPE STREQUAL "RPM") set(CPACK_${GENERATOR_TYPE}${generator_type_suffix_}_PACKAGE_${group_} "default") set(CPACK_${GENERATOR_TYPE}${generator_type_suffix_}_PKG_2_PACKAGE_NAME "second") set(CPACK_${GENERATOR_TYPE}${generator_type_suffix_}_PKG_2_PACKAGE_${group_} "second_group") + + set(CPACK_${GENERATOR_TYPE}${generator_type_suffix_}_PACKAGE_SUMMARY "Global summary") # not used for DEB + set(CPACK_${GENERATOR_TYPE}${generator_type_suffix_}_PKG_2_PACKAGE_SUMMARY "Summary for pkg_2") # not used for DEB + + set(CPACK_COMPONENT_PKG_1_DESCRIPTION "Description for pkg_1") + set(CPACK_COMPONENT_PKG_2_DESCRIPTION "Description for pkg_2") + set(CPACK_COMPONENT_PKG_3_DESCRIPTION "Description for pkg_3") endif() install(FILES CMakeLists.txt DESTINATION foo COMPONENT pkg_1) |