| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
0c56bdf91e CUDA: device linking obeys CMAKE_CUDA_VISIBILITY_PRESET setting
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8065
|
| |
| |
| |
| | |
Fixes #24272
|
|/ |
|
|
|
|
| |
Fixes: #24186
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
26d813092b add_custom_{command,target}: add genex support for COMMENT
60a5a39022 cmCustomCommandGenerator: refactor GetComment to return std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7887
|
| |
| |
| |
| | |
Refactoring was done because EvaluateComment leaked memory.
|
| |
| |
| |
| |
| |
| | |
The call site in `AddLanguageFlags` is now the "one true place" for
adding language standard flags. Inline the helper to reduce risk of
adding other call sites later.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we added the language standard flag near the end of all
options, even after those added by `add_compile_options` and friends.
However, on some compilers such as MSVC, the `-std` flag may reset
defaults for flags that precede it on the command line. Move the
language standard flag to before all other flags that CMake adds for
other abstractions, and before those added by `add_compile_options`.
`CMAKE_<LANG>_FLAGS` should still precede the language flags though,
because they are meant to be treated as language-wide modifications to
the compiler defaults, similar to `$CC $CFLAGS`.
Fixes: #23860
Fixes: #24170
|
|\
| |
| |
| |
| |
| |
| | |
94164ea55e CMP0141: Fix PCH REUSE_FROM when MSVC_DEBUG_INFORMATION_FORMAT is empty
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7914
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Under the policy's NEW behavior, `[CMAKE_]MSVC_DEBUG_INFORMATION_FORMAT`
may be explicitly set to an empty string to tell CMake not to add any
flags for this abstraction. In this case, fall back to checking the
language-wide flags as we do in the OLD behavior.
This revises commit 183b9a9eca (CMP0141: Fix PCH REUSE_FROM under policy
NEW behavior, 2022-10-31, v3.25.0-rc3~4^2).
Issue: #24106
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
Under the CMP0141 NEW behavior added by commit 0e96a20478 (MSVC: Add
abstraction for debug information format, 2022-08-25, v3.25.0-rc1~142^2~1),
the `-Zi` and `-ZI` flags do not appear in `CMAKE_<LANG>_FLAGS_<CONFIG>`
anymore. Teach the PCH REUSE_FROM implementation to recognize the
`EditAndContinue` and `ProgramDatabase` debug information formats
through the policy's new abstraction.
Fixes: #24106
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
13f3382b1c Intel/IntelLLVM: Fortran has distinct "-Werror"-like flag
ab8a0a106e COMPILE_WARNING_AS_ERROR: Fix internal formatting of options table
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7758
|
| |
| |
| |
| |
| |
| |
| |
| | |
In commit 76a08cd253 (COMPILE_WARNING_AS_ERROR: Add options to treat
warnings as errors, 2022-04-21, v3.24.0-rc1~173^2) we formatted the
options table entries as command-line string fragments. Since they are
part of the `CMAKE_${lang}_COMPILE_OPTIONS_*` tables, they should be
formatted as `;`-separated lists of compiler options.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace our hard-coded default for `/Zi` with a first-class abstraction
to select the debug information format an enumeration of logical
names. We've long hesitated to do this because the idea of "debug
information format" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.
Removing the old default flag requires a policy because existing
projects may rely on string processing to edit them and choose a
runtime library under the old behavior. Add policy CMP0141 to
provide compatibility.
Fixes: #10189
|
| |
| |
| |
| |
| |
| |
| | |
Record the call-site backtrace, not the current backtrace of the
target's directory.
Fixes: #23873
|
| |
| |
| |
| |
| |
| | |
Resources that should go into "Copy Bundle Resources" build phase are added as source files but don't have an associated language
Fixes: #23821
|
|/
|
|
| |
Fixes #22200
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
In commit 9a0d5a828a (Ninja: add /DEF: flag to linker call, 2012-03-10,
v2.8.8~22^2~7) the logic should have been added to `GetTargetFlags` in
place of the older logic in that method from commit 7cef36c628 (ENH: add
the ability to generate custom commands for a language that is not
supported by an IDE, 2004-10-21, v2.4.0~2655).
Fixes: #23570
|
|
|
|
| |
Migrate from `cmCommonTargetGenerator::AddModuleDefinitionFlag`.
|
|\
| |
| |
| |
| |
| |
| | |
65f7053d6c COMPILE_WARNING_AS_ERROR: Add command-line option
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7268
|
| |
| |
| |
| |
| |
| |
| | |
Add command-line option `--compile-no-warning-as-error` to ignore value of
`COMPILE_WARNING_AS_ERROR`.
Issue: #19085
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
76a08cd253 COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errors
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Michael Hirsch <michael@scivision.dev>
Merge-request: !7187
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add `COMPILE_WARNING_AS_ERROR` target property and supporting
`CMAKE_COMPILE_WARNING_AS_ERROR` variable.
`COMPILE_WARNING_AS_ERROR` is initialized by
`CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is
true, it expands to a different flag depending on the compiler such that
any warnings at compile will be treated as errors.
Supports compiler ids that I could find a relevant flag for.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add a `CMAKE_WATCOM_RUNTIME_LIBRARY` variable to control the
runtime library selection. Add policy CMP0136 to switch to
in place of the old hard-coded default flags.
Fixes: #23178
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| | |
476c6a8910 PCH: Fix Xcode non-pch language exclusion
fcf1fcfd0c Tests: Ignore all classes in Xcode internal objc warnings
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7166
|
| |
| |
| |
| |
| |
| |
| | |
Fix a regression caused by commit bbcdac4e5d (PCH: Fix all-language
precompile header support in Xcode, 2021-08-07, v3.22.0-rc1~140^2).
Fixes: #23138
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a variable to control both makefile color messages and compiler
color diagnostics.
Fixes: #15502
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
f3ad061858 Add usage requirements to update direct link dependencies
193a999cd5 cmTarget: Add INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage
22d5427aa6 cmGeneratorTarget: Add LookupLinkItem option to consider own target name
f3d2eab36a cmGeneratorTarget: Fix link interface caching of partial results
d75ab9d066 cmGeneratorTarget: Clarify CMP0022 logic in ComputeLinkInterfaceLibraries
f3e9e03fe0 cmGeneratorTarget: Simplify CMP0022 warning check
216aa14997 cmGeneratorTarget: Return early from ExpandLinkItems with no items
1bc98371d1 Tests: Remove unnecessary policy setting from ObjectLibrary test
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6886
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
On platforms using `CMAKE_LINK_PCH`, the implementation of
`PRECOMPILE_HEADERS_REUSE_FROM`, when re-using the PCH from one object
library in another, adds a PCH object file to the link interface.
Clear any cached link interface to ensure it is used.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
In some cases the shortened path may end up working in practice, even if
it is over CMAKE_OBJECT_PATH_MAX, where the original path does not.
If the original path is too long, do the MD5 substitution whenever it
makes the path shorter. Retain the warning if it is still too long.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Store the main dependency as the first entry in the dependency list plus
a boolean member indicating its existence. Note that this slightly
changes existing behavior: the main dependency was previously the last
entry of the dependency list.
|
| | |
| | |
| | |
| | |
| | |
| | | |
It is unused since commit c564a3e3ff (Ninja: Always compile sources
using absolute paths, 2021-05-19, v3.21.0-rc1~129^2), which left
behind a FIXME comment to eventually remove it.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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})`.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | |
| | | |
| | | |
| | | |
| | | | |
There's no reason to allocate the cmNinjaLinkLineDeviceComputer on the heap.
We can also assume the link language as CUDA in cmLocalGenerator::GetDeviceLinkFlags().
|
|\ \ \ \
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|