summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cpack.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmList: Add container conversion to stringMarc Chevrier2023-06-221-2/+2
|
* CMake code rely on cmList class for CMake lists management (part. 1)Marc Chevrier2023-04-241-2/+3
|
* presets: Improve JSON parser and error messagesMartin Duffy2023-03-291-3/+4
|
* CYGWIN: Drop pre-2.8.4 compatibility mode CMAKE_LEGACY_CYGWIN_WIN32Brad King2023-01-191-3/+0
| | | | | | | | | | Prior to CMake 2.8.4 (released in 2011), we defined `WIN32` on CYGWIN. That was removed, but an undocumented `CMAKE_LEGACY_CYGWIN_WIN32` compatibility mode was left to help projects transition. Only projects that do not require at least 2.8.4 as their minimum CMake version need the compatibility mode. We've also long warned about projects that do not require at least 2.8.12, so it is now reasonable to remove the legacy compatibility mode.
* cpack.cxx: Optimize calls to `std::osteam::operator<<`Alex Turbov2022-11-171-64/+53
|
* cpack.cxx: Eliminate redundant `if`Alex Turbov2022-11-171-5/+1
|
* cpack.cxx: Deduplicate "Generators" section creation codeAlex Turbov2022-11-171-21/+24
|
* cmDocumentationEntry: Drop all user provided ctors for C++ >= 14Alex Turbov2022-11-171-3/+3
| | | | | | | | | | | There is no need for them cuz: - the last field has a default value - all static instances use 2 arguments convertible to `std::string` - "dynamic" instances used for _Generator_ doc entries access fields diectly using default constructed instance Moreover, compiler may generate move ctor/assign when needed.
* cmDocumentation: `char*[][2]` → `cmDocumentationEntry[N]`Alex Turbov2022-11-171-13/+6
| | | | | | | | | | Use fixed size arrays of `cmDocumentationEntry` items instead of open arrays of two `char` pointers when describe program options help screens. Also, drop `const char*[][2]` overloads of methods of `cmDocumentation` and `cmDocumentationSection` classes in the sake of generic (template) appenders introduced earlier.
* Merge topic 'cpack-trace-argument'Brad King2022-10-271-2/+2
|\ | | | | | | | | | | | | b5ebaa0d9c CPack: Require no argument for --trace and --trace-expand Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7824
| * CPack: Require no argument for --trace and --trace-expandKyle Edwards2022-10-251-2/+2
| | | | | | | | | | | | | | | | This was accidentally broken by commit 87c762d435 (CPack: Use cmCommandLineArgument instead of cmsys::CommandLineArguments, 2022-04-18, v3.24.0-rc1~258^2). Fixes: #24085
* | CPack: Add support for presetsKyle Edwards2022-08-311-3/+166
| | | | | | | | Fixes: #23117
* | Help: Short options first, then long, then Windows styleAlex Turbov2022-08-141-1/+1
|/
* cmSystemTools: Fix 'ErrorOccurred' spellingFeRD (Frank Dana)2022-06-131-1/+1
| | | | | | | | Rename the booleans 's_ErrorOccured' and 's_FatalErrorOccured' to 's_ErrorOccurred' and 's_FatalErrorOccurred', respectively. Rename the getters and setters to 'Get[Fatal]ErrorOccurred' and 'Set[Fatal]ErrorOccurred', and fix all uses across the codebase.
* CPack: Use cmCommandLineArgument instead of cmsys::CommandLineArgumentsKyle Edwards2022-04-201-108/+115
|
* Source: Cleanup and simplify some codeRose2021-11-041-1/+1
|
* Rename cmProp in cmValueMarc Chevrier2021-09-211-8/+8
|
* clang-tidy: fix `bugprone-redundant-branch-condition`Brad King2021-05-111-1/+1
|
* Merge topic 'cmake-E-cat-binary'Brad King2020-10-151-19/+14
|\ | | | | | | | | | | | | | | | | f7a5f28318 cmake: Fix '-E cat' command for binary files on Windows 90b39a5209 cmConsoleBuf: Factor out cout/cerr console buffer management f1fdd15863 clang-format: Fix include block order in ctest.cxx and cpack.cxx Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5364
| * cmConsoleBuf: Factor out cout/cerr console buffer managementBrad King2020-10-141-10/+5
| |
| * clang-format: Fix include block order in ctest.cxx and cpack.cxxBrad King2020-10-141-9/+9
| |
* | cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-15/+16
|/
* Restore handling of build directory inside a symlinked pathBrad King2020-07-021-1/+1
| | | | | | | | | | | | | | | In commit dd8365b3f1 (Merge branch 'upstream-KWSys' into update-kwsys, 2020-04-06, v3.18.0-rc1~397^2) we imported KWSys commit `019afb6ea` (SystemTools: Drop GetCurrentWorkingDirectory 'collapse' argument, 2020-04-03). That caused `GetCurrentWorkingDirectory` to no longer send paths through the KWSys translation map and broke CMake's detection of the absolute path to a build directory containing a symbolic link. Add our own `cmSystemTools::GetCurrentWorkingDirectory` wrapper around the KWSys method in order to restore that mapping. Test-case-by: Ben Boeckel <ben.boeckel@kitware.com> Issue: #16228 Fixes: #20900
* replace std::string::substr() with operations that do not allocate memoryRolf Eike Beer2020-03-231-1/+1
| | | | | Modify the original string instead of creating a new copy with substr() when it is not used for anything else afterwards.
* Windows: Restore suppression of error report popups in CI buildsBrad King2019-11-151-1/+0
| | | | | | | | | | | | | On Windows, libuv uses `_CrtSetReportHook` to install a handler it uses to suppress assertions on invalid file descriptors in `_get_osfhandle`. This removes the handler we install in CI environments to suppress interactive popups. Move installation of our handler to after libuv is initialized so that our handler is actually used. Unfortunately this also removes libuv's handler and so may cause Debug builds under CI to abort on invalid file descriptors instead of simply converting them to `INVALID_HANDLE_VALUE`. If this becomes a problem we may need to modify libuv to make its hook more configurable.
* CPack: Ensure CPACK_PACKAGE_DIRECTORY is an absolute pathJohnny Jazeix2019-11-011-1/+7
| | | | Fixes: #18133, #19412
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-3/+3
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmCPackGeneratorFactory: rule of zeroTushar Maheshwari2019-09-171-2/+3
|
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-1/+1
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-1/+1
|
* Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-2/+1
| | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* cpack.cxx: Re-order include blocks to follow our conventionsBrad King2019-08-201-14/+15
|
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-1/+2
|
* Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-2/+2
|
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-12/+9
| | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* Merge topic 'cleanup-statics-stream-flush'Craig Scott2019-07-131-4/+6
|\ | | | | | | | | | | | | | | | | | | af75ab7645 Refactor: Use anonymous namespace instead of `static`s in `cpack.cxx` 0db458a0ce Refactor: Use anonymous namespace instead of `static`s 0328b64efd Refactor: Remove one-time used macros b821f9ad62 Refactor: Optimize some stream output operations Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3535
| * Refactor: Use anonymous namespace instead of `static`s in `cpack.cxx`Alex Turbov2019-07-091-4/+6
| | | | | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* | IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+0
|/ | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* Ensure stdin, stdout, and stderr pipes are always openBrad King2019-05-021-0/+1
| | | | | | | | | | | | | On non-Windows platforms libuv assumes that file descriptors 0-2 are always used for standard pipes and never for anything else. Otherwise, libuv may re-use one of these descriptors and then fail an assertion when closing it. Similarly, On Windows platforms our ConsoleBuf implementation assumes that the standard handles are always open. If CMake is run with any standard pipes closed, open them with `/dev/null` or `NUL` to satisfy these assumptions. Fixes: #19219
* Modernize: Prefer .substr in place of .c_str() + intArtur Ryt2019-03-301-1/+1
| | | | | | A lot of temporary/local strings were created out of C-strings substr can utilize current string size, so in theory be a little more efficient.
* cmake: Progress functions use `std::string` paramVitaly Stakhovsky2019-02-111-1/+1
|
* Use `std::function` for callbacksRegina Pfeifer2019-01-291-6/+2
|
* cmMakefile::ReadListFile() accepts std::string argumentVitaly Stakhovsky2019-01-171-3/+3
| | | | Same for cmMakefile::ReadDependentFile(); some cleanup
* Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-1/+2
| | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* Merge topic 'cpack-status-callback'Brad King2018-12-101-0/+10
|\ | | | | | | | | | | | | 4a3ae1710e CPack/External: Fix status messages of staging scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2696
| * CPack/External: Fix status messages of staging scriptsNils Gladitz2018-12-071-0/+10
| | | | | | | | | | | | | | | | Set progress callback on cmake instance used by CPack. The progress callback is used to output STATUS messages which are otherwise missing when issued from e.g. CPack External staging scripts. Fixes: #18567
* | cpack: When given an unknown generator print out all valid generatorsRobert Maynard2018-11-091-1/+14
| | | | | | | | This makes cpack behavior match cmake when passed an invalid generator
* | cpack: Better error message when generator doesn't exist.Robert Maynard2018-11-081-2/+3
|/ | | | | | Currently the CPack error message when passed an invalid generator name reads like the generator failed to work, rather than the name was invalid.