summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackDebGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ranged-for'Brad King2017-09-191-46/+30
|\ | | | | | | | | | | | | f43baf69 Meta: modernize old-fashioned loops to range-based `for` (CPack). Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1274
| * Meta: modernize old-fashioned loops to range-based `for` (CPack).Pavel Solodovnikov2017-09-191-46/+30
| | | | | | | | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* | Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-1/+1
|/
* cmCPackDebGenerator: Use libarchive to create .deb fileDaniel Pfeifer2017-08-251-271/+19
| | | | | Remove the copy of OpenBSD's 'ar' implementation and instead use cmArchiveWrite with the "arbsd" format.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-5/+5
|
* Change ComputeFileMD5 to ComputeFileHashAndré Klitzing2017-07-141-5/+4
| | | | | | | * Use a parameter to select hash algorithm * Return a std::string as result or an empty string if it fails * Avoids unnecessary copy of hash value
* CPackDeb: Enable the DEB generator on WindowsNils Gladitz2017-06-281-5/+23
| | | | | | | | While some features require external Unix tools the generator is mostly portable. By enabling it on Windows it can be used for cross platform packaging.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | 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'
* Add self-sufficient wrapper for <sys/stat.h>Daniel Pfeifer2017-03-241-1/+1
|
* CPack/Deb invalid md5sums file fixDomen Vrankar2016-12-231-1/+5
| | | | | | | | | Monolithic deb packages were packaged with invalid md5sums file as trailing slash in path was causing string replace to fail and preserve build path. Fixes #16517
* 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: include what you useDaniel Pfeifer2016-09-061-12/+9
|
* CPack/DEB: Add option to select archive typeDomen Vrankar2016-09-051-2/+10
| | | | | | | Add a `CPACK_DEBIAN_ARCHIVE_TYPE` option that can be used to select an archive type that supports long file names. Closes: #14332
* CPack: don't use else after returnDaniel Pfeifer2016-08-181-9/+4
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-5/+5
|
* Add missing braces around statements.Daniel Pfeifer2016-06-101-9/+16
| | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* Source/CPack: Run clang-format to fix styleBrad King2016-06-071-6/+6
|
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-5/+1
| | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-2/+2
| | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.
* CPack/Deb possibility to change package nameDomen Vrankar2016-05-231-4/+4
| | | | | | | | This patch preserves backward compatibility of deb package names with previous CMake versions but similarly to CPack/RPM allows to change package name format and supports DEB-DEFAULT setting that produces proper Debian package names.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-439/+352
| | | | | | | | | | | | | 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.
* CPack/Deb proper package file namingDomen Vrankar2016-05-131-28/+20
| | | | | Proper Debian packages file naming for single package setup (breaks compatibility with previous versions)
* CPack/Deb proper component packages file namingAlexander Smorkalov2016-05-131-2/+9
| | | | | Proper Debian packages file naming for multi-component setup (breaks compatibility with previous versions)
* CPack/Deb generation of postinst and postrm ldconfig filesAlexander Smorkalov2016-05-131-0/+56
| | | | | | DEBIAN/postinst and DEBAIN/postrm files generation if the package installs libraries in ldconfig controlled location (/lib/, /usr/lib/)
* CPack/Deb generation of DEBIAN/shlibs control fileAlexander Smorkalov2016-05-131-7/+31
| | | | | DEBIAN/shlibs control file generation if the package contains libraries
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-7/+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.
* Source: Stabilize include order of sys/types.h before sys/stat.hBrad King2016-05-031-0/+1
| | | | | Include the two headers in an isolated block with a comment separating them so that tools that re-order includes do not re-order these.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* CPackDEB: added config file optional Source fieldRaffi Enficiaud2015-11-041-0/+7
|
* Merge topic 'cpack-deb-fakeroot-removal'Brad King2015-10-261-1/+1
|\ | | | | | | | | 66178ae5 CPackDEB: Use proper compression scheme for control.tar.gz
| * CPackDEB: Use proper compression scheme for control.tar.gzRaffi Enficiaud2015-10-231-1/+1
| | | | | | | | | | | | Changes in commit v3.4.0-rc1~79^2~1 (CPackDeb: use of libarchive and removal of fakeroot, 2015-09-11) accidentally set the wrong compression scheme for the `control.tar.gz` file. Set it explicitly to GZip.
* | CPackDeb: allow empty directories in component packagesRaffi Enficiaud2015-09-281-0/+2
| |
* | Revert topic 'cpack-package-empty-dirs'Brad King2015-09-251-2/+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.
* | CPackDeb: allow empty directories in component packagesRaffi Enficiaud2015-09-211-0/+2
| |
* | CPackDeb: preventing md5sum on symlinksRaffi Enficiaud2015-09-181-13/+16
|/ | | | | | - Direct call to cmSystemTools::ComputeFileMD5 - Avoiding hashing symlinks - Tests
* CPackDeb: use of libarchive and removal of fakerootRaffi Enficiaud2015-09-171-113/+186
|
* Use cmSystemTools::GetCMakeCommand() to get path to cmake internallyBrad King2015-05-201-6/+4
| | | | | This is much simpler than finding a way to lookup "CMAKE_COMMAND" everywhere.
* CPackDeb: Fix lintian md5sum file warningRaffi Enficiaud2015-04-231-0/+6
| | | | Lintian warned about invalid md5sum file permissions.
* CPackDeb: Refactor package variable lookup by generatorDomen Vrankar2015-04-211-39/+36
| | | | | | | | Preparation for per component variables. Patch makes sure we know which variables will be set for per component generator and also prevents accidental overflows of variable values between components.
* cmSystemTools: Teach RunSingleCommand to separate stdout and stderrBrad King2015-04-201-3/+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.
* cmCPackDebGenerator: Cast file mode to proper type for %o formatterBrad King2015-03-311-2/+4
|
* Fix warnings from clang scanbuild.Bill Hoffman2015-03-251-0/+5
|
* Remove some unneeded c_str calls.Stephen Kelly2014-11-231-1/+1
|
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-3/+3
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* CPackDeb: Add option to set compression typeSean D'Epagnier2014-03-141-9/+37
| | | | | | Add a CPACK_DEBIAN_COMPRESSION_TYPE option to set the compression type. Default to 'gzip' to preserve existing behavior. Use "cmake -E tar" for 'gzip', 'bzip2', and 'none'. Use system "tar" for 'lzma' and 'xz'.
* Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-8/+8
| | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
* Remove some c_str() calls.Stephen Kelly2014-03-111-3/+3
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-2/+2
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* CPack: Avoid "format expects 'unsigned int'" warningsPaul Kunysch2013-03-221-4/+4
| | | | | Cast sprintf uid and gid arguments to match the type expected by their "%-6u" format strings.