Commit Graph

31632 Commits

Author SHA1 Message Date
NAKAMURA Takumi
0e58a5ea07 Source: Fix possible IWYU warnings in Windows generators 2021-11-20 00:50:33 +09:00
Brad King
4a3480a786 Merge topic 'custom-command-unique_ptr'
3bb2542535 cmMakefile: Simplify Add*Command and adopt to cmAddCustom*Command
c46b041a3b cmLocalGenerator: Simplify Add{Custom,Utility}Command
68b4e3b255 cmGlobalVisualStudio8Generator: Fix the misaligned argument, stdPipesUTF8
e37511ae7e cmMakefile: Simplify detail:::Add{Custom,Utility}Command
90e1206f25 cmMakefile: Introduce GeneratorAction as the class.
9b31a97748 cmCustomCommand: Move constructor arguments to individual setters
d0158b765b cmMakefile: Move CMP0116 lookup into Add{Custom,Utility}Command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6708
2021-11-19 09:06:54 -05:00
Brad King
3519c19091 Merge topic 'ghs_initial_setup'
aa59eaac4f GHS: Allow setting GHS variables from toolchain file
ab6f0b51b1 GHS: Add note about -T and path style
a55b5c4e18 GHS: Update BSP selection logic
0427f22539 GHS: Update RTOS selection logic
e006b87cc6 GHS: GHSMULTI - Update documentation to match implementation
83eb5695e9 GHS: Update toolset selection logic
8114ddcad1 GHS: Continue splitting variables used by generator
831607889f GHS: Update selection of primaryTarget in MULTI project file
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6715
2021-11-19 09:05:35 -05:00
Kitware Robot
7d1cb6496e CMake Nightly Date Stamp 2021-11-19 00:02:14 -05:00
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
Fred Baksik
aa59eaac4f GHS: Allow setting GHS variables from toolchain file
* Update generator to use the current variable definition,
  not the CACHE definition.
* Avoid overwriting toolchain variables and avoid developer warnings
  when setting up the GHS variables.
  -- A cache entry is only required when:
     a) The toolchain uses set( CACHE ) to set the variable
     b) A -D or preset value was used to set the variable

     The cache entry is required so that the TYPE gets set properly.

  -- Avoid the Policy CMP0126 warnings:
     setting cache variable when normal variable exists
* Move GHS_PRIMARY_TARGET back into area so non-GHS generator
  toolchain file can trigger the OS search.
2021-11-15 13:15:12 -05:00
Fred Baksik
a55b5c4e18 GHS: Update BSP selection logic
Selection of a BSP only needs to be performed if not set by user.

Remove all the logic for printing error and status messages about BSP
selection. These messages also breaks CMake tests.

NOTE: If BSP selection fails then the compiler checks will result in
a build error.  The build error will report that the BSP does not exist.
2021-11-15 13:15:11 -05:00
Fred Baksik
0427f22539 GHS: Update RTOS selection logic
Selection of an RTOS only needs to be performed if not set by user.

Avoid CMake developer warnings for setting GHS_OS_DIR multiple times.
Instead only set it once after searching has been performed.

Remove all the logic for printing error and status messages about RTOS
selection.  This was broken and reporting incorrect messages.  These
messages also breaks CMake tests.

NOTE: If RTOS selection fails then the compiler checks will result in
a build error.  The build error will report that the RTOS
"GHS_OS_DIR-NOT-SPECIFIED" does not exist.
2021-11-15 13:15:11 -05:00
Fred Baksik
83eb5695e9 GHS: Update toolset selection logic
-- Ensure that GHS_TOOLSET_ROOT is used as a path
   * Converts directory path slashes to CMake style
-- Use ComparePath() to properly check for path changes of build tool
   * Accounts for Windows file-system case insensitivity.
-- Don't print message "defaulting" messages (this causes CMake test failures)
-- Don't force update CMAKE_GENERATOR_TOOLSET back into cache when `-T`
   is not used on initial configure. This change avoids an unnessary
   error message when accidentally using `-T` in subsequent runs but the same
   tools are always used.
-- Use IssueMessage() for error messages.
2021-11-15 13:15:10 -05:00
Fred Baksik
831607889f GHS: Update selection of primaryTarget in MULTI project file
Changes to ``-A`` handling:
* Don't force CMAKE_GENERATOR_PLATFORM into cache when using default
  value (breaks using CMake presets).
* Don't print message when using default value (breaks CMake tests).

Changes to ``GHS_PRIMARY_TARGET`` handling:
* Add as a cache variable so its known to GUI
* Don't always include``GHS_TARGET_PLATFORM``, it's only needed if
  ``GHS_PRIMARY_TARGET`` wasn't set by the user.
* Set ``GHS_PRIMARY_TARGET`` during platform selection instead of when
  a language is enabled.  By performing this sooner
  ``GHS_TARGET_PLATFORM`` is not always required to be set into cache.
2021-11-15 13:15:10 -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