summaryrefslogtreecommitdiffstats
path: root/Source/CPack
Commit message (Collapse)AuthorAgeFilesLines
* Simplify boolean expressionsDaniel Pfeifer2016-06-025-29/+9
| | | | | | 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.
* Merge topic 'remove-needless-copies'Brad King2016-05-274-6/+8
|\ | | | | | | | | | | 27ead963 Remove unnecessary local copies. 618fb23f Pass arguments that are not modified as const&.
| * Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-264-6/+8
| | | | | | | | | | | | | | 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&`.
* | Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-2/+2
|/ | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* CPack/DragNDrop: Optionally disable `/Applications` symlinkHarry Mallon2016-05-251-5/+10
|
* Improve string find: prefer character overloads.Daniel Pfeifer2016-05-242-4/+4
| | | | | Apply fix-its from clang-tidy's performance-faster-string-find checker. Ignore findings in kwsys.
* Use std::replace for replacing chars in strings.Daniel Pfeifer2016-05-242-7/+7
| | | | | | | | | | | Find uses of `cmSystemTools::ReplaceString` where both `replace` and `with` are string literals with a size of one. Automate with: git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\2', '\3');|g" git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\\\\\\\\\");|std::replace(\1.begin(), \1.end(), '\2', '\\\\\\\\');|g" git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\\\\\\\\\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\\\\\\\\', '\2');|g"
* Merge topic 'cpack-deb-different-package-names'Brad King2016-05-241-4/+4
|\ | | | | | | | | adbd3985 CPack/Deb possibility to change package name
| * 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.
* | CPackIFW: Command cpack_ifw_configure_component learned ESSENTIAL optionKonstantin Podsvirov2016-05-232-0/+14
|/
* Merge topic 'minor-cleanup'Brad King2016-05-201-5/+4
|\ | | | | | | | | 40bee43a cmCPackDragNDropGenerator: Replace std::{ostringstream => string}
| * cmCPackDragNDropGenerator: Replace std::{ostringstream => string}Brad King2016-05-171-5/+4
| |
* | CPackIFW: Add support for Promoting UpdatesKonstantin Podsvirov2016-05-186-90/+518
|/ | | | | | | | Add support for this feature added by QtIFW 2.0.3: http://doc.qt.io/qtinstallerframework/ifw-updates.html Add a `cpack_ifw_update_repository` command as porcelain.
* Revise C++ coding style using clang-formatKitware Robot2016-05-1664-5690/+4184
| | | | | | | | | | | | | 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.
* Merge topic 'cpack-rpm-different-package-names'Brad King2016-05-162-31/+44
|\ | | | | | | | | 44ee2d71 CPack/RPM different package names
| * CPack/RPM different package namesDomen Vrankar2016-05-152-31/+44
| | | | | | | | | | | | | | | | Packagers may now set their own rpm package file names or request that rpmbuild tool chooses one for them. It also supports handing of situations where one spec file may produce multiple rpm packages.
* | CPack/Deb proper package file namingDomen Vrankar2016-05-132-29/+21
| | | | | | | | | | 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-0925-201/+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.
* Help clang-format wrap after braces on long initializer listsBrad King2016-05-061-0/+1
| | | | | | Add a long comment inside a few braced initializer lists in order to convince clang-format to break after the opening brace and format the list without indenting every value past the opening brace.
* Move comments off of class access specifier linesBrad King2016-05-063-11/+23
| | | | | | | | | | | | | | | | | | The clang-format tool may turn this: public: // comment about access specifier // unrelated comment indented with code ... Into: public: // comment about access specifier // unrelated comment indented with code ... Avoid this by moving comments off of access specifier lines.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Source: Sort includes the way clang-format wouldBrad King2016-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Re-apply the approach from commit e1c77472 (Format include directive blocks and ordering with clang-format, 2016-04-29) but this time be more careful about exclusion of parser generator sources: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '^Source/cmCommandArgumentLexer\.' | egrep -z -v '^Source/cmCommandArgumentParser\.' | egrep -z -v '^Source/cmDependsJavaLexer\.' | egrep -z -v '^Source/cmDependsJavaParser\.' | egrep -z -v '^Source/cmExprLexer\.' | egrep -z -v '^Source/cmExprParser\.' | egrep -z -v '^Source/cmFortranLexer\.' | egrep -z -v '^Source/cmFortranParser\.' | egrep -z -v '^Source/cmListFileLexer\.' | 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 Also drop use of custom sorting for `sys/types.h`.
* Source: Stabilize include order of sys/types.h before sys/stat.hBrad King2016-05-033-1/+5
| | | | | 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-2923-90/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2924-19/+29
| | | | | 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.
* CPack/IFW: port to cmXMLWriterDaniel Pfeifer2016-03-236-103/+81
|
* Merge topic 'cpack-osx-optional-CoreServices'Brad King2016-03-211-0/+6
|\ | | | | | | | | d84ba668 CPack: Avoid using OS X CoreServices if compiler fails on header (#16021)
| * CPack: Avoid using OS X CoreServices if compiler fails on header (#16021)Brad King2016-03-181-0/+6
| | | | | | | | | | | | Some compilers on OS X report errors in the CoreServices framework headers. Check for support of the header ahead of time and compile the relevant code only when the header is available.
* | Merge topic 'cpack-osx-no-carbon'Brad King2016-03-181-15/+6
|\ \ | |/ | | | | | | c718070c CPack: Avoid requiring Carbon framework on OS X (#16021)
| * CPack: Avoid requiring Carbon framework on OS X (#16021)Sean McBride2016-03-171-15/+6
| | | | | | | | | | | | | | | | | | | | In commit v3.5.0-rc1~232^2 (CPackDMG: Add support for multilingual SLAs, 2015-10-19) we added use of the Carbon framework in order to get access to its APIs to convert Script Manager RegionCode values. This is not necessary. Instead we can use CoreServices. While at it, replace individual CoreFoundation includes with including the entire framework, which is the correct way.
* | CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS SubDirectory (4th) optionDaniel Wirtz2016-02-181-2/+1
|/
* CPack/DragNDrop: Fix handling of certain license file content (#15899)Andrey Mishchenko2016-01-072-25/+77
| | | | | | | There were issues in the special-character-escaping and line-wrapping code which caused DragNDrop packaging to fail mysteriously at a later step with parsing errors in the `sla.r` file generated by the following code.
* CPackWIX: Allow multiple patch files and diagnose if any are missingNils Gladitz2015-12-143-4/+21
| | | | | | | CPACK_WIX_PATCH_FILE now accepts a list of patch files. An error will now be produced if any of the patch files is missing. Previously this would be silently ignored.
* CPackWIX: Allow patching of shortcut componentsNils Gladitz2015-12-121-0/+2
|
* CPackWIX: Fix installed file property lookups when using componentsNils Gladitz2015-12-102-4/+22
| | | | | | | | | The WIX generator incorrectly looked for installed file properties by relative paths that included the component specific staging directory prefix. Remove that prefix in installed file property lookups when generating packages with components.
* CPack/DragNDrop: Allow single license for multiple languagesSimon Levermann2015-12-022-7/+17
| | | | | | | When both CPACK_DMG_SLA_DIR and CPACK_RESOURCE_FILE_LICENSE are defined, use the license file for all languages instead of looking for a license file for each language. Also expand the documentation on the SLA variables.
* CPack/DragNDrop: Use documented CPACK_DMG_SLA_LANGUAGES variableSimon Levermann2015-11-231-7/+7
| | | | | | | The change in commit f88533cc (CPackDMG: Add support for multilingual SLAs, 2015-10-19) accidentally used CPACK_DMG_LANGUAGES in its implementation instead of the intended CPACK_DMG_SLA_LANGUAGES added to the documentation.
* CPack/DragNDrop: Optionally run an AppleScript when making a packageRobert Maynard2015-11-132-11/+100
| | | | | | | | | | | | | | | | While the DragNDropGenerator supports custom DS_Store and backgrounds, it is still very hard to automatically setup nice looking packages. The primary issue is that the DS_Store embeds the name of the volume in the path to backgrounds, which means that if a package embeds the version in its volume name a new DS_Store must generated for each release. Instead one now can use applescript to setup the DS_Store. This change also ensures that temporary RW image has enough space for these changes, creating 1 MB dummy padding file, that is later removed from the image. Co-Author: Adam Strzelecki <adam.strzelecki@java.pl>
* CPack/DragNDrop: Place the background image file in a hidden folderRobert Maynard2015-11-131-16/+2
| | | | | | By using a hidden folder we avoid the need to mark the file as hidden from finder, and it makes it easier for future work to refer to the background image file.
* CPack/DragNDrop: Use source file extension for background imageRobert Maynard2015-11-131-1/+5
| | | | | | | Instead of blindly copying the `CPACK_DMG_BACKGROUND_IMAGE` file to `background.png`, we instead use the same file extension as the source image. This is needed for proper support of multi resolution `tif` backgrounds.
* CPackWIX: Don't allow users to deselect the top-level feature (#15838)Nils Gladitz2015-11-091-0/+1
| | | | | | | | | | The top-level WiX feature implicitly created by the WIX generator represents the package as a whole. As such it does not make sense to allow installer users to deselect it from the installation. Suggested-by: Mark Stijnman
* Merge topic 'cpack-dmg-multilanguage-sla'Brad King2015-11-092-39/+333
|\ | | | | | | | | f88533cc CPackDMG: Add support for multilingual SLAs
| * CPackDMG: Add support for multilingual SLAsSimon Levermann2015-11-062-39/+333
| | | | | | | | | | | | | | | | | | Multiple languages for SLAs and the SLA UI can be added via the CPack variables CPACK_DMG_SLA_DIR and CPACK_DMG_SLA_LANGUAGES. For each language defined in the languages variable, CPack will search for <language>.menu.txt and <language>.license.txt in CPACK_DMG_SLA_DIR. If the sla directory variable is not defined, the old behaviour using CPACK_RESOURCE_FILE_LICENSE is retained.
* | 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.
* | Merge topic 'wix-text-node'Brad King2015-10-146-19/+118
|\ \ | | | | | | | | | | | | 5a266095 CPackWIX: Handle text nodes in XML patch content