Commit Graph

31195 Commits

Author SHA1 Message Date
Kitware Robot
ec686f4c8a CMake Nightly Date Stamp 2021-08-09 00:01:33 -04:00
Kitware Robot
d1b2916bbb CMake Nightly Date Stamp 2021-08-08 00:01:10 -04:00
Kitware Robot
cc94429c61 CMake Nightly Date Stamp 2021-08-07 00:01:15 -04:00
Brad King
350065bb85 Merge topic 'refactor-conditions-evaluation'
54a70b3988 Refactor: Move version compare op table out of the function
f37d6a3170 Refactor: Remove redundant checks for `0` and `1` literals
00961a4782 Refactor: Copy exactly required count of args and avoid `pop_back()`
2a72cad9be Style: Better names of local vars for `IN_LIST` handler
0dd7795706 Refactor: Extract the logic of testing for special variable to func
866b0595f6 Refactor: Introduce `cmArgumentList` container class
51d9194a96 Refactor: Reduce one more condition checking on handling math compare
46810235e3 Refactor: Avoid `if` → `else if` → … for compare operators
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6392
2021-08-06 12:12:02 -04:00
Kitware Robot
1df8c88ea2 CMake Nightly Date Stamp 2021-08-06 00:01:10 -04:00
Kitware Robot
6c0f476505 CMake Nightly Date Stamp 2021-08-05 00:01:12 -04:00
Kitware Robot
85b5e6a458 CMake Nightly Date Stamp 2021-08-04 00:01:14 -04:00
Brad King
affd8b09e6 Merge topic 'vs10-deprecate'
22dab6eb96 Deprecate Visual Studio 10 2010 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6412
2021-08-03 11:10:43 -04:00
Brad King
70daea512d Merge topic 'string-TIMESTAMP-specifier-V'
aafa392c12 string(TIMESTAMP): Add %V specifier for ISO 8601 week number
a915f691ad Help: Format string(TIMESTAMP) format specifiers as a definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6374
2021-08-03 11:08:34 -04:00
Brad King
a3ddcdb911 Merge topic 'nsis_ignore_license_page'
795e406e3b CPack/NSIS: Add option to not display license page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6422
2021-08-03 11:06:45 -04:00
Brad King
1524505e12 Merge topic 'minimal_nsis'
c0572a15d6 CPack/NSIS: Bump minimal version of NSIS to 3.03

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6425
2021-08-03 11:05:39 -04:00
Brad King
ff56e78bea Merge topic 'cpack_deb_zstd'
051da997da CPack/DEB: Add zstd compression for deb packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !6394
2021-08-03 11:04:27 -04:00
Brad King
e251bf5f68 Merge topic 'CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER'
9e7a0568f6 Merge branch 'backport-3.21-CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER' into CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER
213fec4908 add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILER

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6421
2021-08-03 10:59:38 -04:00
Alex Turbov
54a70b3988 Refactor: Move version compare op table out of the function
It's static data and never changed.
2021-08-03 10:55:47 -04:00
Alex Turbov
f37d6a3170 Refactor: Remove redundant checks for 0 and 1 literals
They are gonna be checked by `cmIsOn()` anyway.
2021-08-03 10:55:47 -04:00
Alex Turbov
00961a4782 Refactor: Copy exactly required count of args and avoid pop_back() 2021-08-03 10:55:47 -04:00
Alex Turbov
2a72cad9be Style: Better names of local vars for IN_LIST handler 2021-08-03 10:55:47 -04:00
Alex Turbov
0dd7795706 Refactor: Extract the logic of testing for special variable to func
Introduce `looksLikeSpecialVariable`. It makes `if()` blocks readable.
2021-08-03 10:55:47 -04:00
Alex Turbov
866b0595f6 Refactor: Introduce cmArgumentList container class
The `cmArgumentList` has been turned into a class (forward declared in
the header). It inherits from the `std::list` (yeah, but we don't intend
to store polymorphic classes in it). In addition to the standard methods,
now it's possible to move `HandlePredicate` (renamed to `ReduceOneArg`)
and `HandleBinaryOp` (renamed to `ReduceTwoArgs`) as its members.

Additionally, iterators managements (`IncrementArguments`) have been
refactored into two separate classes mimicking iterators. This also
allows having a uniform `for` loop and concentrates the logic of
iterators advancing in it instead of the loop's body. The arguments
processing algorithms operate with "windows" over a collection of
arguments. Hence there are two kinds of "iteration windows" -- allowing
to observe 2 or 3 elements per loop iteration. These iteration "windows"
also passed to reducers.
2021-08-03 10:55:47 -04:00
Alex Turbov
51d9194a96 Refactor: Reduce one more condition checking on handling math compare 2021-08-03 10:55:46 -04:00
Alex Turbov
46810235e3 Refactor: Avoid ifelse if → … for compare operators
When trying to match one of compare operator key inside `if()` condition,
remember the index of matched operator. Later this index used to
select the operation to perform instead of strings compare again.
2021-08-03 10:55:46 -04:00
Alex Turbov
17af3baddd Refactor: Set const to cmConditionEvaluator::IsKeyword parameters 2021-08-03 10:55:46 -04:00
Alex Turbov
2b916606c5 Refactor: No need to move iterators after match
A handler's loop of all levels gonna restart after calls to
`HandlePredcate` or `HandleBinaryOp`... And the first action in the
loop is to setup iterators. So, no need to move 'em inside the
functions. Also, no need to pass iterators by reference.

Also, reorder parameters of both functions so iterators
followed after a reference to the newArgs container.
2021-08-03 10:55:46 -04:00
Alex Turbov
97d6bbcc01 Refactor: Replace std::to_string w/ more specialized bool2string 2021-08-03 10:55:46 -04:00
Alex Turbov
9721ab416f Refactor: Reorder MATCHES handler from top below to the fail-fast 2021-08-03 10:55:46 -04:00
Alex Turbov
d4d44e86f6 Refactor: Reduce variables scope in HandleLevel2 2021-08-03 10:55:46 -04:00
Alex Turbov
cc6cdacc18 Refactor: Simplify boolean to string result assignments 2021-08-03 10:55:46 -04:00
Alex Turbov
e3c1dbe18b Refactor: Replace if block w/ boolean expression
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2021-08-03 10:55:45 -04:00
Alex Turbov
047f8321a0 Refactor: Avoid redundant operator<< on printing messages
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2021-08-03 10:55:45 -04:00
Alex Turbov
4de2a4a46d Refactor: Opt-out do+while loops and reduce nesting level in handlers
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2021-08-03 10:55:45 -04:00
Alex Turbov
78fcbb20cd Refactor: Remove reducible flag from handleLevelN() functions
The indicator that smth has been done is the `newArgs` size get
differ after an iteration.

Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2021-08-03 10:55:45 -04:00
Alex Turbov
b0d6596399 Refactor: Make cmConditionEvaluator::IsTrue a bit more compact
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2021-08-03 10:55:30 -04:00
Kitware Robot
4deb7c250b CMake Nightly Date Stamp 2021-08-03 00:01:12 -04:00
Johnny Jazeix
c0572a15d6 CPack/NSIS: Bump minimal version of NSIS to 3.03
Fixes: #22508
2021-08-02 21:28:30 +02:00
Brad King
0194918636 Merge topic 'ghs_generator_bashism_fix'
172475b2c5 GHS: Remove bashism from custom command shell scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6409
2021-08-02 15:08:49 -04:00
Brad King
99d3e20999 Merge topic 'vs-iface-include-dirs'
53aabe9817 VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6411
2021-08-02 14:07:13 -04:00
Marc Chevrier
519ce95584 Merge topic 'fix_stanardlevelcomputer_typo'
8d5052fdc4 cmStandardLevelResolver: Fixed typo in struct name + clang-format

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6419
2021-08-02 10:32:13 -04:00
Antons Jeļkins
aafa392c12 string(TIMESTAMP): Add %V specifier for ISO 8601 week number
In ISO 8601 weeks begin with Monday. The first week of
the year is the week which contains the first Thursday
of the year.
2021-08-02 16:31:53 +02:00
Kitware Robot
09217f2779 CMake Nightly Date Stamp 2021-08-02 00:01:15 -04:00
Johnny Jazeix
795e406e3b CPack/NSIS: Add option to not display license page
Fixes: #22215
2021-08-01 18:28:47 +02:00
Marc Chevrier
9e7a0568f6 Merge branch 'backport-3.21-CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER' into CC-DEPFILE-independent-from-CMAKE_DEPENDS_USE_COMPILER 2021-08-01 15:26:21 +02:00
Marc Chevrier
213fec4908 add_custom_command(DEPFILE) independent from CMAKE_DEPENDS_USE_COMPILER
Fixes: #22486
2021-08-01 15:24:16 +02:00
Kitware Robot
0a6415ea1f CMake Nightly Date Stamp 2021-08-01 00:02:11 -04:00
Jaak Ristioja
8d5052fdc4 cmStandardLevelResolver: Fixed typo in struct name + clang-format 2021-07-31 15:12:27 +03:00
Kitware Robot
16398b8130 CMake Nightly Date Stamp 2021-07-31 00:01:07 -04:00
Kitware Robot
8e77f495b5 CMake Nightly Date Stamp 2021-07-30 00:01:09 -04:00
Brad King
22dab6eb96 Deprecate Visual Studio 10 2010 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2021-07-29 14:15:01 -04:00
Russell Greene
051da997da CPack/DEB: Add zstd compression for deb packages 2021-07-29 13:40:40 -04:00
Brad King
53aabe9817 VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries
Since commit 4391913133 (Add INTERFACE libraries to generated
buildsystem if they have SOURCES, 2020-07-20, v3.19.0-rc1~346^2~1), the
VS generator may process INTERFACE libraries.  Avoid code paths in the
generator that process include directories because they should not be
used by INTERFACE libraries since they do not compile anything.

Fixes: #22494
2021-07-29 11:38:58 -04:00
Brad King
0a959bb271 Merge topic 'cuda_separable_clang_make' into release-3.21
3975678fcc CUDA/Clang: Simplify --register-link-binaries logic
0b1cea66cd CUDA/Clang: Fix separable compilation in non-root directories with Makefiles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6400
2021-07-29 08:45:40 -04:00