Commit Graph

1095 Commits

Author SHA1 Message Date
Clemens Wasser
b928f52983 cmGlobalGenerator: Remove unused windows.h include 2023-06-22 18:11:45 +02:00
Clemens Wasser
1bb0e59318 codecvt: Extrace codecvt::Encoding to remove codecvt includes 2023-06-22 18:11:45 +02:00
Ben Boeckel
0183e1bca3 cxxmodules: remove CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP variable
It is now subsumed by the UUID setting completely.
2023-06-01 14:43:26 -04:00
Brad King
aa3675d281 Merge topic 'cmake-compile-no-warning-as-error'
da27ff1e96 Preserve --compile-no-warning-as-error in automatic CMake re-runs
e0b48284a1 Xcode: Internally uses -S instead of -H to specify source directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8522
2023-06-01 09:45:56 -04:00
Brad King
c4f273e722 Merge topic 'AddCacheEntry-suppress-raw-pointer-usage'
4fc322bab4 AddCacheEntry: Suppress raw pointer usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8520
2023-05-31 09:35:25 -04:00
Brad King
5b063510f9 Merge topic 'cmake-verbose-print-build-tool-command'
8451a3f0b5 cmGlobalGenerator: use a stream for output in `Build`
e060666531 cmake: write the build command itself with `--verbose`
b017c9f127 cmGlobalGenerator: fix off-by-one for `&&` command joining
c715fd8d76 cmGlobalGenerator: quote commands in `::Build` output
d6c0e827bc cmGlobalGenerator: add a `QuotedPrintable` method for commands
28ee3bef34 cmGlobalGenerator: add missing spaces in output
465ab8d872 cmGlobalGenerator: use `cmStrCat` in `::Build`
81d45dabc4 cmOutputConverter: add a `static` version of `EscapeForShell`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8183
2023-05-31 09:33:26 -04:00
Brad King
da27ff1e96 Preserve --compile-no-warning-as-error in automatic CMake re-runs
When the build system re-runs `cmake` to regenerate itself, preserve the
`--compile-no-warning-as-error` option if it was used when `cmake` was
last explicitly invoked.  Normally such settings are preserved in the
cache, but the purpose of this option is to be beyond the reach of
project code.
2023-05-30 17:44:43 -04:00
Marc Chevrier
4fc322bab4 AddCacheEntry: Suppress raw pointer usage 2023-05-30 16:41:59 +02:00
Ben Boeckel
8451a3f0b5 cmGlobalGenerator: use a stream for output in Build
This allows output to show up in output immediately instead of being
batched.
2023-05-27 07:04:17 -04:00
Marc Chevrier
aa5fed5052 SetProperty: suppress raw pointer usage 2023-05-26 14:48:22 +02:00
Marc Chevrier
5884303e69 Apple Framework: enhance path parsing 2023-05-21 14:26:08 +02:00
Ben Boeckel
b017c9f127 cmGlobalGenerator: fix off-by-one for && command joining
Only add `&&` if there is another command after the current one.
2023-05-16 12:48:20 -04:00
Ben Boeckel
c715fd8d76 cmGlobalGenerator: quote commands in ::Build output
Now that these are going to be visible when running with `--verbose`,
properly quote things so that they can be used as-is.
2023-05-16 12:48:19 -04:00
Ben Boeckel
d6c0e827bc cmGlobalGenerator: add a QuotedPrintable method for commands 2023-05-16 12:47:50 -04:00
Ben Boeckel
28ee3bef34 cmGlobalGenerator: add missing spaces in output
The preludes to commands should have a space to separate them from the
first argument of the command sequence.
2023-05-16 12:47:50 -04:00
Ben Boeckel
465ab8d872 cmGlobalGenerator: use cmStrCat in ::Build
Also replace some single-char strings with character literals.
2023-05-16 12:15:31 -04:00
Marc Chevrier
241304190f CMake code rely on cmList class for CMake lists management (part. 2) 2023-04-29 09:54:31 +02:00
Marc Chevrier
e08ba229ee CMake code rely on cmList class for CMake lists management (part. 1) 2023-04-24 10:41:10 +02:00
Orkun Tokdemir
69cf9700e6 Autogen: Defer setup until Generate step
It is better to set variables up once all target dependencies are known.
2023-04-05 16:12:16 -04:00
Brad King
17e6b2bdca Merge topic 'automoc-cxx-standard'
429a452705 Autogen: Add target's C++ standard to moc_predef.h
21f812e57c Autogen: Split creation and setup of custom targets into separate steps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8359
2023-03-31 08:09:06 -04:00
Brad King
689616785f macOS: Do not pass Apple-specific flags to llvm-strip
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we prefer `llvm-strip` over
`strip` when using Clang.  However, since commit 20291e8e72 (install:
Fix stripping on macOS, 2019-01-30, v3.14.0-rc1~31^2) on macOS we add
flags `-u -r`, needed by Apple's `strip` for executables, but that
`llvm-strip` does not need or support.  Improve the condition to add
Apple-specific flags only when the selected `strip` tool is Apple's.

Note that Apple dylibs must be stripped with `-x` with either Apple's
`strip` or `llvm-strip`.

Fixes: #24601
2023-03-29 15:19:47 -04:00
Brad King
367aa65a9f Merge topic 'module-depends-static-lib-cycle'
01d7860fdb Ninja,Makefile: Restore Fortran module scanning in static library cycle
846baa7c5b cmGlobalGenerator: Factor out helper to check target ordering

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8363
2023-03-27 09:51:59 -04:00
Brad King
846baa7c5b cmGlobalGenerator: Factor out helper to check target ordering 2023-03-24 15:57:52 -04:00
Orkun Tokdemir
21f812e57c Autogen: Split creation and setup of custom targets into separate steps
Defer the setup step until after compile features have been finalized on
normal targets.  Later this will help pass the information to Qt tools.

Issue: #24624
2023-03-24 12:23:47 -04:00
Brad King
88bc8dfc14 cmMakefile: Store recursion depth limit as size_t 2023-03-13 11:32:03 -04:00
Brad King
ef5a4d964b Deprecate "extra" generators in favor of cmake-file-api(7)
The "extra" generators were created in CMake's early years to provide
support for users of specific IDEs by directly generating their project
files alongside make or ninja files.  Nowadays the file-api provides a
more generic, maintainable, well-tested, and robust way for IDEs to view
CMake project build trees.  Deprecate the legacy "extra" generators to
encourage the corresponding IDEs to use the file-api.

Fixes: #19090
2023-02-15 10:48:26 -05:00
Kyle Edwards
2b17b6da6a cmGlobalGenerator: Avoid referencing CMAKE_CFG_INTDIR 2023-02-03 11:24:57 -05:00
Brad King
f4d604f77f Merge topic 'try_compile-verbose'
faa950a155 try_compile: Run native build tool with verbose output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8095
2023-01-23 10:34:37 -05:00
Brad King
06c7e88b91 Merge topic 'configure-log'
317aac14ef cmake: Stop pointing users at logs on configure errors
eae1398d09 cmake --system-information: Stop dumping CMake{Output,Error}.log

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8094
2023-01-20 09:37:08 -05:00
Brad King
526b2db5d3 Merge topic 'print-configure-generate-time'
5f0c5ec49b cmake: Print configure/generate time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8083
2023-01-20 09:32:45 -05:00
Brad King
faa950a155 try_compile: Run native build tool with verbose output
Make the compiler command lines visible in the configure log.

Issue: #23200
2023-01-20 09:17:51 -05:00
Brad King
317aac14ef cmake: Stop pointing users at logs on configure errors
Since commit 18e1bfbb3c (cmake: On configure error suggest looking at
CMake*.log files, 2013-07-09, v2.8.12~210^2), when configuring a project
fails, we print `See also .../CMake{Output,Error}.log` near the end of
the output.  This was intended to help users find failures in system and
compiler inspection checks, but for normal project errors the messages
may be misleading.  The logs may contain incidental errors that are part
of normal operation and do not need to be addressed by the user.

Since commit f6ed2585e5 (Modules: Record system inspection steps in the
configure log, 2023-01-16), CMake's builtin modules no longer log
information to the old-style `CMake{Output,Error}.log` files anyway,
so stop mentioning them.

Fixes: #22131
Issue: #23200
2023-01-19 13:27:51 -05:00
Kyle Edwards
5f0c5ec49b cmake: Print configure/generate time 2023-01-19 09:51:07 -05:00
Vitaly Stakhovsky
b3edfcf46e cmValue: Use operator* explicitly to convert to std::string; avoid extra call 2023-01-15 23:39:02 -05:00
Ben Boeckel
5e026739e1 cmGlobalGenerator: factor out C++ module support checking
This will simplify adding support to other generators.
2022-11-23 17:31:31 -05:00
Ilia K
3166547cf6 ASM_MARMASM: Add support for Microsoft ARM assembler language
https://learn.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-reference

Fixes: #23999
2022-11-09 10:22:46 -05:00
Juan Ramos
d3acd22380 USE_FOLDERS: Treat as on by default
Add a policy to treat the `USE_FOLDERS` global property as ON by default
if it is not set.

Fixes: #21695
2022-11-08 09:32:18 -05:00
Robert Maynard
d0e52219eb CUDA: Revert "Always mark cuda toolkit as system include"
We need to revert this change as it can disable error messages
when compiling invalid CUDA code.

This reverts commit ea659b155d (CUDA: Always mark cuda toolkit as system
include, 2022-06-27, v3.25.0-rc1~269^2).
2022-10-17 10:17:33 -04:00
Marc Chevrier
0bd3efffbc Genex LINK_LIBRARY: Add support for framework with postfix 2022-09-21 16:14:36 +02:00
Brad King
2b91a96633 Merge topic 'link-framework-with-multi-config-postfix'
fc06450ff4 Apple: Fix regression when linking a framework with postfix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7675
2022-09-15 09:04:49 -04:00
Marc Chevrier
fc06450ff4 Apple: Fix regression when linking a framework with postfix
Fix a regression caused by commit 40178f3c90 (cmGlobalGenerator: Add
helper to split framework path, 2022-02-10, v3.24.0-rc1~661^2~1).

Fixes: #23961
2022-09-14 14:55:27 -04:00
Brad King
06404a1979 Merge topic 'check-library-properties-fix-performances-regression'
985b4c82a6 Check link libraries properties: fix performances regression
a47eef32a3 renames method FinalizeTargetCompileInfo() in FinalizeTargetConfiguration().

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7651
2022-09-09 09:48:56 -04:00
Marc Chevrier
a47eef32a3 renames method FinalizeTargetCompileInfo() in FinalizeTargetConfiguration(). 2022-09-07 14:23:21 +02:00
Robert Maynard
ea659b155d CUDA: Always mark cuda toolkit as system include
Fixes: #23731
2022-08-18 10:37:06 -04:00
Kyle Edwards
83e44002ae VERIFY_INTERFACE_HEADER_SETS: Add verification target for all
Fixes: #23802
2022-08-03 08:19:08 -04:00
Brad King
75647fc53d Merge topic 'verify-interface-header-sets-add-compile-definitions' into release-3.24
27fd172d8d VERIFY_INTERFACE_HEADER_SETS: Finalize compile info for verify targets
626e641a19 cmTarget: Factor out FinalizeTargetCompileInfo()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7516
2022-07-28 08:11:18 -04:00
Kyle Edwards
626e641a19 cmTarget: Factor out FinalizeTargetCompileInfo() 2022-07-27 12:24:53 -04:00
Brad King
ee047a68f2 cmSystemTools: Factor out method to get Windows OS version
Factor the implementation out of `cmGlobalGenerator`.
2022-07-25 14:27:24 -04:00
Kyle Edwards
df559cd8c8 Merge topic 'export-try-compile-crash' into release-3.24
29c7546a61 cmGlobalGenerator: Only compute build files for all targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7472
2022-07-14 09:56:03 -04:00
Kyle Edwards
29c7546a61 cmGlobalGenerator: Only compute build files for all targets
If we're creating generation objects for imported targets only, we
don't need the export sets. Only compute build file generators
if generating for all targets.

Fixes: #23709
2022-07-13 11:34:34 -04:00
FeRD (Frank Dana)
98a10290a8 cmSystemTools: Fix 'ErrorOccurred' spelling
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.
2022-06-13 09:05:24 -04:00
Brad King
5dcf505f63 Merge topic 'dependency-providers'
2aa83fa15b Dependency providers: Add find_package and FetchContent support
8a28368feb FetchContent: Don't discard non-empty SOURCE_DIR and BINARY_DIR
8ce9bb8a0c FetchContent: Don't leak internal variables
74a6ddc339 cmFindPackageCommand: Handle Makefile variable definitions more robustly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gerhard Olsson <gerhard.nospam@gmail.com>
Merge-request: !7276
2022-05-25 07:24:48 -04:00
Craig Scott
2aa83fa15b Dependency providers: Add find_package and FetchContent support
Fixes: #22619
2022-05-25 08:46:18 +10:00
Ben Boeckel
634d6f20c9 cmGlobalGenerator: check for nullptr in GetLanguageFromExtension
Found by `clang-analyzer`.
2022-05-21 17:23:19 -04:00
Craig Scott
a6c34b0353 project(): Add new CMAKE_PROJECT_TOP_LEVEL_INCLUDES file injection point
Fixes: #22685
2022-05-13 18:03:36 +10:00
Gregor Jasny
53ca6edd8a xcode: add support for xcconfig files
Fixes: #18420
2022-04-03 22:39:34 +02:00
Brad King
a7b325e203 Merge topic 'verify-header-sets'
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7085
2022-03-30 09:10:25 -04:00
Kyle Edwards
c798744f81 FILE_SET: Add VERIFY_HEADER_SETS target property
Fixes: #23338
2022-03-29 13:58:27 -04:00
Craig Scott
05e510bf0b CMP0132: Don't set compiler environment variables on first run
When running CMake for the first time in a build tree, for some
generators CMake would set compiler environment variables
like CC, CXX, etc. when the corresponding language is enabled.
That behavior was never documented and can result in different
behavior between the first and subsequent runs. Add a policy
to no longer set those environment variables.

Fixes: #21378
2022-03-29 09:42:59 -04:00
Marc Chevrier
a2cfa2da4f GenEx/LINK_LIBRARY: Add features for framework support on Apple 2022-02-15 10:53:33 +01:00
Marc Chevrier
40178f3c90 cmGlobalGenerator: Add helper to split framework path
cmComputeLinkInformation and cmGlobalXCodeGenerator now rely on
this method to handle framework paths.
2022-02-13 15:39:14 +01:00
Carsten Rudolph
b2f8f0bb87 cmGlobalVisualStudio10Generator: Auto restore NuGet packages. 2022-01-22 06:35:41 -05:00
Carsten Rudolph
193b8fca52 cmBuildOptions: Split build arguments into separate object. 2022-01-22 06:35:38 -05:00
Brad King
ea050286e7 CMP0028: Report the target whose link interface has an offending item
Previously items linked via the link interface of a dependency were
reported in CMP0028 messages as if directly linked by a target.
Clarify the messages to indicate that an offending item is actually
in the link interface of a given target, regardless of its consumer.

Move the check to the end of generation and look through the final set
of link implementations and link interfaces that were used for
generation.  This avoids repeating messages on link interfaces that
have multiple consumers.
2021-12-16 16:43:17 -05:00
Brad King
4133c426c2 Merge topic 'env-init-configs'
5b1ed2a646 try_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env vars

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6755
2021-11-23 09:55:17 -05:00
Brad King
5b1ed2a646 try_compile: Do not use CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES env vars
Since:

* commit e216b9bbd3 (cmake: Allow CMAKE_BUILD_TYPE to be set by
                     environment variable, 2021-06-29, v3.22.0-rc1~503^2~1)
* commit ef56eefc9b (cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by
                     environment variable, 2021-06-29, v3.22.0-rc1~503^2)

the environment variables are supposed to provide defaults for settings
the user otherwise can control via cache entries.  However, they
accidentally affect `try_compile` projects too, which are supposed to be
programmatically controlled.

Fixes: #22935
2021-11-22 12:50:42 -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
Brad King
e479650b41 Merge topic 'nmc-cross-config-target-deps'
95f44e00cd Ninja Multi-Config: Fix custom command target dependencies in cross-configs
a883363935 Ninja Multi-Config: Fix internal cross-config target dependency ordering
16e24748c5 Ninja Multi-Config: Fix cross-config custom command dependency tracing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6702
2021-11-05 10:09:28 -04:00
Brad King
16e24748c5 Ninja Multi-Config: Fix cross-config custom command dependency tracing
Process `CMAKE_CROSS_CONFIGS` and friends to properly configure the
generator for cross-config behavior before custom command dependency
tracing.
2021-11-04 12:23:35 -04:00
Brad King
0486f9e56e Merge topic 'swift-win32-property'
c782f140d4 Swift: Ignore WIN32_EXECUTABLE property outside of Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6658
2021-10-29 08:53:26 -04:00
hotwatermorning
c782f140d4 Swift: Ignore WIN32_EXECUTABLE property outside of Windows
Issue: #19877
2021-10-28 15:32:44 -04:00
Sean McBride
5ba6e8ac59 Source: Replace most calls to sprintf with snprintf 2021-10-25 18:23:13 -04:00
Brad King
ca3e83250f Merge topic 'lcc-policy'
3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6643
2021-10-22 07:08:58 -04:00
makise-homura
3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU
Due to MCST LCC compiler identification is now changed to LCC,
there should be a way for old projects to still identify it as GNU,
as it was before.
This commits adds the policy:
CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU.
This policy controls such a behavior.
OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
2021-10-21 17:24:22 +03:00
Brad King
46e9ff5729 Restore honoring CMAKE_GENERATOR_INSTANCE in toolchain file
Revert the changes from commit d5b5c19278 (cmGlobalGenerator:
FindMakeProgram() before CMakeDetermineSystem, 2020-06-15,
v3.19.0-rc1~619^2~3) and commit ef91fb02f3 (cmGlobalGenerator:
FindMakeProgram() at a generator-specific time, 2020-11-23,
v3.19.1~2^2).  We must delay selecting the location of MSBuild until
after an instance of Visual Studio has been selected.

It is now safe to revert the ordering because the motivating use
case (sysroot detection in Platform/Android-Determine) has been
implemented another way.

Fixes: #22782
2021-10-20 13:00:26 -04:00
Sean McBride
37859e3244 Source: Fix clang -Wimplicit-fallthrough warnings 2021-09-28 10:53:54 -04:00
Marc Chevrier
cc56dc7468 Rename cmProp in cmValue 2021-09-21 17:14:04 +02:00
Marc Chevrier
dffa3f485c cmGlobalGenerator::PrintCompilerAdvice: use cmProp as augment 2021-09-19 19:11:07 +02:00
Marc Chevrier
9488f8a7b7 Merge topic 'enh-AddCacheEntry-accepts-new-types'
f84193292c Use new AddCacheEntry signatures
3c2e58eeb8 AddCacheEntry accept cmProp or std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6495
2021-09-10 09:47:39 -04:00
Marc Chevrier
f84193292c Use new AddCacheEntry signatures 2021-09-10 15:46:21 +02:00
Kyle Edwards
ab94c369c9 Refactor: Convert parallel string/backtrace vectors to BT vectors 2021-09-03 09:52:14 -04:00
Marc Chevrier
3941b74de4 Refactor: cmGlobalGenerator::GetGlobalSetting returns cmProp 2021-08-09 18:52:35 +02:00
Marc Chevrier
e5cd39ca80 cmProp: refactoring: transform alias in class
To handle safely the values used by CMake variables and properties,
introduce the class cmProp as a replacement from the simple pointer
to std::string instance.
2021-08-08 16:19:08 +02:00
NAKAMURA Takumi
9e9ab61e2f cmGlobalGenerator: Process targets in a stable order
`cmMakefile::Targets` is meant for efficient lookup but does not
have a stable order.  Use `cmMakefile::OrderedTargets` instead.
2021-07-08 15:16:46 -04:00
NAKAMURA Takumi
8a812dde61 cmGlobalGenerator: Use cmMakefile::CreateNewTarget to add global targets
`cmMakefile::CreateNewTarget` updates also `cmMakefile::OrderedTargets`.
2021-07-08 12:17:37 -04:00
Brad King
e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable
When no `CMAKE_BUILD_TYPE` is explicitly specified while creating a new
build tree, check for an environment variable of the same name.

Issue: #20983
2021-06-30 10:55:40 -04:00
Kyle Edwards
f2617cf8e6 Source: Add cmInstallRuntimeDependencySet 2021-06-04 08:52:01 -04:00
Brad King
f0ffb1e2d4 cmGlobalGenerator: Simplify relative path conversion in AddRuleHash
Revert commit 204aecdf82 (cmGlobalGenerator: Port configure-time code to
cmMakefile., 2015-08-02, v3.4.0-rc1~234^2~8).  `AddRuleHash` is
generate-time code.
2021-05-13 12:48:43 -04:00
Brad King
ba7b939831 cmStateDirectory: Rename ConvertToRelPathIf{Not => }Contained
The "Not" in the method name is backward from its logic.
2021-05-12 15:53:37 -04:00
Vitaly Stakhovsky
5e8fa0b7bc Source: Minor code improvements 2021-05-11 11:20:04 -04:00
friendlyanon
4dd4e9dd6c cmGlobalGenerator: Add parallel parameter to GenerateCMakeBuildCommand 2021-05-01 16:08:21 +02:00
Brad King
69ea84ec09 cmGlobalGenerator: Clear list of install components between runs 2021-01-28 12:46:32 -05:00
Ben Boeckel
cdfc4e3195 clang-tidy: fix readability-qualified-auto warnings 2021-01-27 08:45:45 -05:00
Brad King
0173cdcc01 Merge topic 'make-GENERATED-visible-from-any-scope'
573d51201a GENERATED prop: Set CMP0118 to NEW for some (unrelated) tests
6624b65b3f GENERATED prop: Add implementation for policy CMP0118 being set to NEW
b14fe704f8 GENERATED prop: Simplify determining the language of a source file
ca4ce458a3 GENERATED prop: Check CMP0118 policy and warn in certain situations
0eb30f175e GENERATED prop: Introducing policy CMP0118 and its documentation
78c8d95605 GENERATED prop: Add some tests before introducing changes with CMP0118
e01527619f Simplify code by calling a function directly instead of duplicating it
75cb8615e9 Fix typo in function name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5308
2020-11-30 12:38:17 -05:00
Deniz Bahadir
6624b65b3f GENERATED prop: Add implementation for policy CMP0118 being set to NEW
* Adding implementation for policy CMP0118 being set to `NEW`.
* Adding new tests for policy CMP0118 being set to `NEW`.
* Checking the `GENERATED` property with `get_source_file_property` or
  `get_property` now always returns exactly `1` or `0`. No other values
  will be returned. Note, that this is a backwards-incompatible change,
  even when policy CMP0118 is unset or set to `OLD`.
* Additionally, as `get_source_file_property` and `get_property` now
  always check if a source-file was marked globally visible, even when
  CMP0118 is unset or set to `OLD`, they possibly return `1` where they
  might have returned `0` before the changes introduced by this commit.
  Note, that this is a backwards-incompatible change, even when policy
  CMP0118 is unset or set to `OLD`.
* As a consequence, the tests for policy CMP0118 being unset or set to
  `OLD` got slightly adjusted, too, to reflect these changes in
  behavior.
2020-11-24 18:16:51 +01:00
Brad King
aee981e208 Merge topic 'fix-find-make-program'
ef91fb02f3 cmGlobalGenerator: FindMakeProgram() at a generator-specific time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Frank Dana <ferdnyc@gmail.com>
Merge-request: !5529
2020-11-24 08:42:33 -05:00
Kyle Edwards
ef91fb02f3 cmGlobalGenerator: FindMakeProgram() at a generator-specific time
d5b5c192 moved FindMakeProgram() to an earlier time, which resulted
in CMAKE_MAKE_PROGRAM not being read from the toolchain file. Change
it to only call FindMakeProgram() early in the specific cases of
Visual Studio and Xcode, and restore the old behavior for all other
generators.

Fixes: #21486
2020-11-23 14:20:08 -05:00
Cengizhan Pasaoglu
bd705788f6 Constify some code as suggested by clang-tidy 2020-10-20 00:04:04 +03:00
Brad King
e8b0359a43 cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
2020-09-29 17:12:33 -04:00
vvs31415
d298ae7470 cmake::GetCacheDefinition: Return cmProp 2020-09-28 09:32:22 -07:00