Commit Graph

31623 Commits

Author SHA1 Message Date
NAKAMURA Takumi
3bb2542535 cmMakefile: Simplify Add*Command and adopt to cmAddCustom*Command 2021-11-18 12:02:38 -05:00
NAKAMURA Takumi
c46b041a3b cmLocalGenerator: Simplify Add{Custom,Utility}Command 2021-11-18 12:02:38 -05:00
NAKAMURA Takumi
68b4e3b255 cmGlobalVisualStudio8Generator: Fix the misaligned argument, stdPipesUTF8
The call to AddCustomCommandToTarget for "Checking File Globs" had misaligned
arguments and previously passed `stdPipesUTF8` as `escapeOldStyle`.

For now, set `escapeOldStyle` as `true`. Also `stdPipesUTF8` is `true` here.
2021-11-18 12:02:37 -05:00
NAKAMURA Takumi
e37511ae7e cmMakefile: Simplify detail:::Add{Custom,Utility}Command
Note 1: `detail::AddCustomCommandToTarget()` resets cc,
since cc is not moved away.

Note 2: In `detail::AddUtilityCommand()`, a few vars are preserved
before using. Their refs will be alive in most cases, but cc might
be destroyed in the future.
2021-11-18 12:02:37 -05:00
NAKAMURA Takumi
90e1206f25 cmMakefile: Introduce GeneratorAction as the class. 2021-11-18 12:02:37 -05:00
NAKAMURA Takumi
9b31a97748 cmCustomCommand: Move constructor arguments to individual setters
Make `cmCustomCommand` have just only default constructor.
Use each setter instead.  This follows the builder pattern.

Introduce `cc::SetOutputs(std::string output)`.
This will be used later, as substitution for `cc::SetOutputs({output})`.
2021-11-18 12:02:37 -05:00
NAKAMURA Takumi
d0158b765b cmMakefile: Move CMP0116 lookup into Add{Custom,Utility}Command
Avoid repeating it at every call site.
2021-11-18 12:02:37 -05:00
Brad King
6f613502f8 Merge topic 'fix-mingw32-gcc11-ice'
26c9fbab46 MINGW-w64: Fix string(TIMESTAMP) build on 32bits.
f0eae9292b cmTimestamp: Declare component buffer before MinGW-specific code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6737
2021-11-18 10:38:23 -05:00
Antons Jeļkins
26c9fbab46 MINGW-w64: Fix string(TIMESTAMP) build on 32bits.
Rephrase the string(TIMESTAMP) implementation not to
cause gcc-11 ICE on MSYS2/mingw32.

Fixes: #22916
2021-11-18 09:17:38 -05:00
Antons Jeļkins
f0eae9292b cmTimestamp: Declare component buffer before MinGW-specific code 2021-11-18 09:17:38 -05:00
Brad King
e585dcedea Merge topic 'IntelLLVM-Fortran-copy-mod'
209b896f2c IntelLLVM: Enable Fortran module rebuild avoidance in Makefile generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6740
2021-11-18 08:59:18 -05:00
Brad King
cb39d50e21 Merge topic 'IntelLLVM-Fortran-copy-mod' into release-3.22
209b896f2c IntelLLVM: Enable Fortran module rebuild avoidance in Makefile generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6740
2021-11-18 08:59:17 -05:00
Kitware Robot
5e269798cc CMake Nightly Date Stamp 2021-11-18 00:02:14 -05:00
Brad King
209b896f2c IntelLLVM: Enable Fortran module rebuild avoidance in Makefile generators
The Makefile generators use an internal `cmake -E cmake_copy_f90_mod`
tool to avoid rebuilding module consumers when the `.mod` content
changes only in a trivial way (e.g. the time it was built).  This is
done with logic specific to each vendor's module file format.  Enable
the "Intel" format support when using the IntelLLVM compiler (ifx) too.

Issue: #22922
2021-11-17 10:41:30 -05:00
Brad King
b4bdedaf4e Merge topic 'iwyu-xcode'
67c75064d1 Source: Fix IWYU warnings in Xcode generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6729
2021-11-17 08:46:45 -05:00
Kitware Robot
d2e10c4d8d CMake Nightly Date Stamp 2021-11-17 00:01:10 -05:00
NAKAMURA Takumi
67c75064d1 Source: Fix IWYU warnings in Xcode generators 2021-11-16 21:06:13 +09:00
Kitware Robot
49c870b38f CMake Nightly Date Stamp 2021-11-16 00:01:53 -05:00
Kitware Robot
6d945a5235 CMake Nightly Date Stamp 2021-11-15 00:05:23 -05:00
Kitware Robot
b31e60e76d CMake Nightly Date Stamp 2021-11-14 00:01:07 -05:00
Kitware Robot
c73063ad13 CMake Nightly Date Stamp 2021-11-13 00:02:15 -05:00
Brad King
fed67fa40d CMake 3.22.0-rc3 2021-11-12 09:15:07 -05:00
Brad King
7a149034f7 Merge topic 'xcode-generation-enablegpuframecapturemode'
0798edfb85 Tests: Xcode scheme ENABLE_GPU_FRAME_CAPTURE_MODE
e09a3eddb6 Xcode: Support "GPU Frame Capture" scheme property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6639
2021-11-12 09:05:01 -05:00
Brad King
ea5d3f4d4c Merge topic 'unity-build-per-config'
129e3c6540 Unity Build: Fix per-config sources in multi-config generators
ea289314ef VS: Fix pre-VS15.8 unity build exclusion of per-config sources
53990059da cmLocalGenerator: Add dedicated types to hold unity source info
de6e362a88 cmLocalGenerator: Clarify name of method to write unity source include lines
3017b3e7d4 cmLocalGenerator: Simplify unity source copy-if-different logic
0b56f92576 cmLocalGenerator: De-duplicate unity source file generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6720
2021-11-12 09:03:39 -05:00
Brad King
648b66a1d3 Merge topic 'cmp0128-fixup'
e47dfce75d CMP0128: Enable/disable extensions if standard same as default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6723
2021-11-12 09:02:41 -05:00
Kitware Robot
75ab2edf8a CMake Nightly Date Stamp 2021-11-12 00:01:10 -05:00
Raul Tambre
e47dfce75d CMP0128: Enable/disable extensions if standard same as default
This was intended to be part of the initial MR (!6177), but accidentally went
missing when debugging nightly failures on less common systems. Noticed during
!6711 review as the comment about this behaviour didn't match the code.

Documentation for CMP0128 is updated to remove a false case and note the two
cases related to this.

Fixes #22224.
2021-11-11 21:55:04 +02:00
Brad King
2f37c48cf1 Merge topic 'xcode-embed-plugins'
9e1e7dc7db Xcode: Add embedded plugins option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6690
2021-11-11 10:51:48 -05:00
Brad King
129e3c6540 Unity Build: Fix per-config sources in multi-config generators
Single-config generators already support unity builds with per-config
sources because they compute sources using `CMAKE_BUILD_TYPE` as the
configuration.  Each original source is either included in the unity
build source, or not.

Teach multi-config generators to compute the list of sources for
inclusion in unity builds using all configurations.  Previously they
only used the empty string as the configuration.  Each original source
may be included in some configurations, but not others.  Use
preprocessor conditions to guard their inclusion when necessary.

Fixes: #22892
2021-11-11 07:16:11 -05:00
Brad King
ea289314ef VS: Fix pre-VS15.8 unity build exclusion of per-config sources
In a unity build, the original source files need to be excluded from
the build.  Prior to VS 15.8, this is done via `ExcludeFromBuild`,
which is the same mechanism used to implement per-config sources.
Fix a conflict in the implementation of the two features so that
unity-batched sources are excluded from all configurations rather
than just those in which they would otherwise have been included.
2021-11-11 07:16:11 -05:00
Brad King
53990059da cmLocalGenerator: Add dedicated types to hold unity source info 2021-11-11 06:43:07 -05:00
Kitware Robot
7cb5f96952 CMake Nightly Date Stamp 2021-11-11 00:01:07 -05:00
Brad King
de6e362a88 cmLocalGenerator: Clarify name of method to write unity source include lines 2021-11-10 13:56:05 -05:00
Brad King
3017b3e7d4 cmLocalGenerator: Simplify unity source copy-if-different logic 2021-11-10 13:54:01 -05:00
Brad King
0b56f92576 cmLocalGenerator: De-duplicate unity source file generation 2021-11-10 13:53:57 -05:00
Gusts Kaksis
9e1e7dc7db Xcode: Add embedded plugins option 2021-11-10 09:57:07 -05:00
Brad King
19b51730b7 Merge topic 'quote-hyphen-in-rsp'
144e8dcf40 cmOutputConverter: Quote hyphens in response files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6714
2021-11-10 09:15:38 -05:00
Kitware Robot
4b5fa96e80 CMake Nightly Date Stamp 2021-11-10 00:01:09 -05:00
Brad King
4fd2d62613 Merge topic 'cuda_clang_cmp0105'
4707ecbe6f CUDA: Support CMP0105 on Clang
15fde4c420 CUDA: Use local shorthands for variables in Clang device link code
cf7e68087d CUDA: Avoid unnecessary allocation and GetLinkLanguage()
5b0693411e CUDA: Ignore USE_WATCOM_QUOTE for device link rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6709
2021-11-09 07:56:21 -05:00
Brad King
9fbbe29138 Merge topic 'nmc-reuse-from'
244550997f PCH: Fixed Ninja Multi-Config and REUSE_FROM for MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6713
2021-11-09 07:53:19 -05:00
Brad King
95ea17dfd3 Merge topic 'nmc-reuse-from' into release-3.22
244550997f PCH: Fixed Ninja Multi-Config and REUSE_FROM for MSVC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6713
2021-11-09 07:53:18 -05:00
Brad King
79c21dc9bd Merge topic 'msvc-pch-reuse-config'
95fa27d94d PCH: Fix REUSE_FROM when Debug and RelWithDebInfo configs differ

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6712
2021-11-09 07:52:30 -05:00
Brad King
2eb96cbe41 Merge topic 'msvc-pch-reuse-config' into release-3.22
95fa27d94d PCH: Fix REUSE_FROM when Debug and RelWithDebInfo configs differ

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6712
2021-11-09 07:52:29 -05:00
Kitware Robot
0a68db7b25 CMake Nightly Date Stamp 2021-11-09 00:02:09 -05:00
Raul Tambre
4707ecbe6f CUDA: Support CMP0105 on Clang
Add link flags during the "device compile" step.

Enabled the relevant tests. The disable reasons regarding separable compilation
were outdated and the actual failure case was device link flags support.
2021-11-08 21:26:00 +02:00
Brendan O'Rourke
144e8dcf40 cmOutputConverter: Quote hyphens in response files
Fixes: #20070
2021-11-08 12:14:53 -06:00
Brad King
befcd6ea1d Merge topic 'cpack-drop-osxx11'
4ef974e6cb CPack: Remove undocumented deprecated OSXX11 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6704
2021-11-08 12:40:00 -05:00
Brad King
c0e23058f6 Merge topic 'vs-framework-version'
d51246c662 VS: Default TargetFrameworkVersion to v4.7.2 for VS 2022
f97f8537f3 VS: Model a default target framework
e40cedddc0 cmVisualStudio10TargetGenerator: Refactor target framework selection
78782cc7dc cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6699
2021-11-08 12:38:48 -05:00
Brad King
2b9b64269f Merge topic 'vs-framework-version' into release-3.22
d51246c662 VS: Default TargetFrameworkVersion to v4.7.2 for VS 2022
f97f8537f3 VS: Model a default target framework
e40cedddc0 cmVisualStudio10TargetGenerator: Refactor target framework selection
78782cc7dc cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6699
2021-11-08 12:38:47 -05:00
Cristian Adam
244550997f PCH: Fixed Ninja Multi-Config and REUSE_FROM for MSVC
The copy_idb_pdb.cmake script would be executed for every configuration
for all configurations.

Debug would still want to get the RelWithDebInfo files, and the other
way around.
2021-11-08 18:16:36 +01:00