summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-26/+24
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* CPack: use a distinct checksum file for each generatorDomen Vrankar2017-09-201-2/+1
| | | | | | | | | Different CPack generators could produce checksum files with the same name which were overwritten by each other since only package name without extensions was used for checksum file name generation. This patch adds package extension to checksum files to prevent collisions. Fixes: #16840
* Meta: modernize old-fashioned loops to range-based `for` (CPack).Pavel Solodovnikov2017-09-191-57/+38
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-3/+2
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-12/+11
|
* Remove second arg: npos in substr usagesPavel Solodovnikov2017-06-011-2/+2
|
* CPack unify component/monolithic package symlink handlingDomen Vrankar2017-05-141-0/+1
| | | | | | | | | | | Non component package generation was recursing through symlinks while monolithic package generation did not. This was causing component archive packages to contain both symlink and a directory with the same name on the same level if symlink contained files which caused errors during extraction of such packages. Closes #16051
* cmake: initialize with Role that controls which commands to registerDaniel Pfeifer2017-05-081-1/+1
|
* c++: prefer vectors over listsBen Boeckel2017-05-041-3/+3
| | | | | | | | | | | None of these usages of `std::list` were inserting or removing elements in the middle of the structure, so there were no benefits to using it. Other uses were related to C pointers being stable in a list of strings whereas in a vector of strings, small pointer optimizations could be moved and become invalid after a modification to the hosting vector. None of these uses modified the vector after handing out a C string to an external store.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-3/+3
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* cmWorkingDirectory: use the new classBen Boeckel2017-03-061-2/+2
| | | | | | These functions just need to change the directory for a block of code and then go back to the caller's expected location. Use cmWorkingDirectory to ensure that all return paths are handled.
* CPack: Add option to specify --component-plist for productbuildTim Hutt2017-02-171-0/+5
| | | | | | | When using the productbuild generator this lets you specify the value of the `--component-plist` parameter when it runs pkgbuild for a component. Fixes: #16638
* Merge topic 'cpack-ifw-options'Brad King2016-11-301-0/+18
|\ | | | | | | | | 88ecfd8b CPackIFW: Add some options
| * CPackIFW: Add some optionsKonstantin Podsvirov2016-11-241-0/+18
| | | | | | | | | | | | | | | | New options is: DEFAULT, VIRTUAL, FORCED_INSTALLATION, DISPLAY_NAME, DESCRIPTION and RELEASE_DATE. Options added for both cpack_ifw_configure_component and cpack_ifw_configure_component_group command.
* | iwyu: Fix more findingsDaniel Pfeifer2016-11-281-8/+8
|/
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* CPack: Add option to generate a checksum file next to each package filePetr Orlov2016-09-191-1/+32
| | | | Add variable CPACK_PACKAGE_CHECKSUM to activate it.
* CPack: include what you useDaniel Pfeifer2016-09-061-1/+4
|
* CPack: don't use else after returnDaniel Pfeifer2016-08-181-1/+2
|
* Merge topic 'compat-CPACK_INSTALL_CMAKE_PROJECTS-subdirectory'Brad King2016-07-201-1/+2
|\ | | | | | | | | 57534990 CPack: Add compatibility for incorrect CPACK_INSTALL_CMAKE_PROJECTS value
| * CPack: Add compatibility for incorrect CPACK_INSTALL_CMAKE_PROJECTS valueBrad King2016-07-191-1/+2
| | | | | | | | | | | | | | | | | | | | Since commit v3.6.0-rc1~339^2 (CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS SubDirectory (4th) option, 2016-02-18) we now honor the "Directory" option of this variable. Prior to that commit the value was not used so projects may have used a placeholder value like `.` instead of `/`. Treat `.` the same as `/` to restore compatibility with such projects. Fixes #16205.
* | Use better KWSys SystemTools::GetEnv and HasEnv signaturesDāvis Mosāns2016-07-181-4/+4
| |
* | Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* | use CM_NULLPTRDaniel Pfeifer2016-06-281-10/+12
|/
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-799/+574
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS SubDirectory (4th) optionDaniel Wirtz2016-02-181-2/+1
|
* cmState: Initialize default definitions immediately.Stephen Kelly2015-10-131-0/+1
| | | | Don't leave this as cmMakefile responsibility.
* CPack: Remove needless cmLocalGenerator creation.Stephen Kelly2015-10-051-3/+0
|
* CPack: allow packaging of empty directoriesDomen Vrankar2015-09-281-1/+9
|
* Revert topic 'cpack-package-empty-dirs'Brad King2015-09-251-4/+0
| | | | | | | | | The changes in commit 47b060ae (CPackDeb: allow empty directories in component packages, 2015-09-21), commit b58de9fe (CPack: allow packaging of empty directories, 2015-09-21), and commit b761e90d (CPack: remove accidental changes, 2015-09-22) regressed packaging of CMake itself. Revert the changes until they can be revised and rebased on other changes that make additional fixes.
* CPack: remove accidental changesDomen Vrankar2015-09-231-1/+0
| | | | | Remove changes accidentally included in commit b58de9fe (CPack: allow packaging of empty directories, 2015-09-22).
* CPack: allow packaging of empty directoriesDomen Vrankar2015-09-221-0/+5
|
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-2/+3
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmGlobalGenerator: Remove MakeLocalGenerator method.Stephen Kelly2015-08-281-1/+1
| | | | Inline implementation to callers.
* cmGlobalGenerator: Require a snapshot to create a local generator.Stephen Kelly2015-08-281-1/+2
|
* cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-2/+1
| | | | It is required anyway, so this makes it explicit.
* Merge topic 'refactor-cmLocalGenerator'Brad King2015-05-191-0/+2
|\ | | | | | | | | | | | | | | | | fa9eb814 cmLocalGenerator: Remove redundant path access. 1933f3d1 cmLocalGenerator: Remove redundant path conversions. 9e4b6cc2 cmState: Store computed relative paths to to current directories. 991f5e49 cmState::Snapshot: Store components for current directories. 57bdc1a2 cmState: Compute and store directory components.
| * cmState: Compute and store directory components.Stephen Kelly2015-05-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to duplicate these in all cmLocalGenerators. Rename the symbols according to current conventions. Add explicit calls to Set{Source,Binary}Directory with empty strings in order to trigger the population of the components containers with the current working directory in cmLocalGenerator. Having directories set to empty is a special case in CMake, which is relied on for the `if(CMAKE_BINARY_DIR)` condition at the end of CMakeDetermineSystem.cmake.
* | cmGlobalGenerator: Add NVI wrapper to create local generator.Stephen Kelly2015-05-161-1/+1
|/
* cmSystemTools: Teach RunSingleCommand to separate stdout and stderrBrad King2015-04-201-2/+3
| | | | | | | Extend the RunSingleCommand signature to capture stdout and stderr separately. Allow both to be captured to the same std::string to preserve existing behavior. Update all call sites to do this so that this refactoring does not introduce functional changes.
* cmMakefile: Remove always-null first parameter to ReadListFile.Stephen Kelly2015-04-181-4/+4
|
* CPack: Read the config listfile in the normal way.Stephen Kelly2015-04-181-1/+1
| | | | | | | | | | | | | This is a unique function call in CMake, and it was likely a programming error when introduced. All other similar calls to ReadListFile use a null first paramter. The effect of this patch is to no-longer define CMAKE_PARENT_LIST_FILE to the config file itself while evaluating it. The ReadListFile method also no longer hits a condition that it uses CollapseFullPath on the input file. However, as cpack does not set the StartDirectory anyway, this has no effect. See bug 15522.
* CPack: Fix single component packagingRaffi Enficiaud2015-04-161-2/+2
| | | | | | Refine logic added in commit 0ffd3534 (CPack single component packaging, 2015-04-02). Component packaging should be enabled if either at least one component or one group is set and should not require both.
* CPack single component packagingDomen Vrankar2015-04-051-1/+4
| | | | | | | | RPM, DEB and archive packages were not created in cases when CPACK_<generator>_COMPONENT_INSTALL was set to ON and a single component existed. Patch also changes CPackRPM test to implicitly test for this case.
* CPack: Fix make tool selection during preinstall (#15483)Brad King2015-03-311-15/+8
| | | | | | | | The CMAKE_MAKE_PROGRAM selected by CMake while configuring the project should also be used to drive the "preinstall" target during packaging. Teach CPack to use "cmake --build" instead of constructing the build command line itself. The "cmake --build" command already knows how to select the proper make tool.
* cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for NinjaGregor Jasny2015-02-261-1/+1
| | | | | | | | | The Ninja build system does not support a in-file verbositiy switch. Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE setting and pass it as an optional '-v' argument to Ninja. This can serve as a reasonable fallback. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* cmStandardIncludes: Remove list include.Stephen Kelly2015-02-061-0/+1
| | | | Include it only where used.