Commit Graph

32004 Commits

Author SHA1 Message Date
Brad King
d566bd962d CMake 3.23.3 2022-07-28 11:46:12 -04:00
Robert Maynard
261fa5db39 cmake: In -P mode ignore extra paths on the command line
Fixes: #23748
2022-07-22 13:53:52 -04:00
Robert Maynard
314135cdf1 cmake: simplify to a single source of truth of working mode 2022-07-22 13:53:12 -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
Brad King
529004738a Merge branch 'file-set-crash' into release-3.23
Merge-request: !7420
2022-06-30 08:22:27 -04:00
Kyle Edwards
3fee5398bd install(EXPORT): Check for missing file sets at generate time
Missing file sets were originally checked at configure time in
install(TARGETS ... EXPORT), but were not checked at generate time. If
a file set was added after install(TARGETS ... EXPORT) was called,
an abortion error was thrown. Check again at generate time to gracefully
display an error message instead of crashing.

Fixes: #23680
2022-06-29 15:05:32 -04:00
Brad King
eeb6dcad94 Merge topic 'cmake-gui-locale' into release-3.23
ae13524e3b cmake-gui: Restore support for internationalization with Qt5 on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7303
2022-05-31 11:55:08 -04:00
Brad King
ae13524e3b cmake-gui: Restore support for internationalization with Qt5 on Windows
Restore the logic removed by commit 035078d847 (cmake-gui: Remove
explicit locale setup, 2020-12-17, v3.20.0-rc1~205^2~6), but only with
Qt5 on Windows.  Leave a FIXME comment to support Qt6 later.

Fixes: #23562
Issue: #23565
2022-05-27 11:52:51 -04:00
Brad King
a8bd06dfd4 CMake 3.23.2 2022-05-25 09:42:51 -04:00
Brad King
f748ea2186 Merge topic 'vs2022-only' into release-3.23
235b5fb05b file(GET_RUNTIME_DEPENDENCIES): Support VS 2022 without VS 2019

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7282
2022-05-20 09:03:59 -04:00
Brad King
235b5fb05b file(GET_RUNTIME_DEPENDENCIES): Support VS 2022 without VS 2019
Find MSVC tools in VS 2022 installation.
2022-05-19 17:50:06 -04:00
Martin Duffy
432a8ab739 ccmake: Fix infinite loop during invalid search
Fix issue introduced in commit 2defe9ff95 (ccmake: Fix crash when
deleting all cache entries, 2022-05-12).

Leaving the Empty Cache widget always on the Entry list had unforeseen
consequences, including that it caused an infinite loop when searching
for a string that did not match any variables.
2022-05-18 08:04:10 -04:00
Brad King
29d23ec2cf Merge topic 'cuda-arch-off-vs' into release-3.23
9fe41ecf36 VS: Fix CUDA CodeGeneration field for CMAKE_CUDA_ARCHITECTURES=OFF

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !7261
2022-05-16 09:24:52 -04:00
Brad King
9fe41ecf36 VS: Fix CUDA CodeGeneration field for CMAKE_CUDA_ARCHITECTURES=OFF
If we add no CUDA architecture flags, write an empty `CodeGeneration`
field to tell the CUDA Toolkit's VS integration not to add its default
flags.  We already use this approach for `CMAKE_CUDA_ARCHITECTURES=all`
so that the `-arch=all` flag can be added via `AdditionalOptions`.

Fixes: #23490
2022-05-13 11:34:51 -04:00
Martin Duffy
2defe9ff95 ccmake: Fix crash when deleting all cache entries
Prevents crash when deleting all cache entries.
Additionally, if advanced entries are hidden, no longer show the first advanced
entry when deleting all visible entries.

Fixes: #23499
2022-05-12 16:43:15 -04:00
Martin Duffy
e1c85e29f4 ccmake: Move Initialization of Fields Inline
Move initialization of simple fields in cmCursesMainForm inline.
2022-05-12 16:40:58 -04:00
Brad King
28957f7f25 Merge topic 'avoid-remove-empty-path' into release-3.23
71ded12a75 cmGeneratedFileStream: Do not remove empty path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7223
2022-05-03 11:25:08 -04:00
Brad King
71ded12a75 cmGeneratedFileStream: Do not remove empty path
If `Close()` is called when a file was never opened, we have no
temporary file path.  Do not try to remove it.  Some implementations of
`unlink()` crash on an empty path (though the documented behavior is to
fail with `ENOENT`).

Fixes: #23414
2022-04-29 11:56:59 -04:00
Craig Scott
d099136add productbuild: Restore CPACK_PACKAGEMAKER_CHOICES variable
In 2a8df7e7db (productbuild: Don't write rootVolumeOnly attribute if
writing domains, 2022-03-21), the variable holding the main contents
of the distribution.dist XML file was renamed from
CPACK_PACKAGEMAKER_CHOICES to CPACK_APPLE_PKG_INSTALLER_CONTENT.
This reflected the fact that the PackageMaker generator is deprecated.
The new variable also includes more details than the old one held.
Some projects were relying on the old variable name, so we need to still
set that to the same contents as it would have previously provided.

Neither of these variables were previously documented, but the older
variable was mentioned in enough semi-official places that it essentially
became semi-supported. Document both variables and highlight that the
older one is deprecated.

Fixes: #23467
2022-04-30 00:28:05 +10:00
Ben Boeckel
9ee47188c0 cmExportBuildFileGenerator: handle genex-wrapped source paths
Previously a fileset with `$<$<CONFIG:Debug>:some_file>` would show up
as-is (with escaping) in the build directory export. Instead, evaluate
all fileset entries as generator expressions and list them as they are
similar to the installation information.
2022-04-18 13:43:18 -04:00
Ben Boeckel
60fab8a6e0 cmInstallCommand: tweak error message
Not all filesets need to be installed; just those that are visible on
the target's interface. Clarify the error message.
2022-04-15 20:44:53 -04:00
Brad King
33c6d01e82 Merge topic 'CPackIFW-extra-dot' into release-3.23
331c5d458e CPackIFW: Fix regression in icon file names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Erlend E. Aasland <erlend.aasland@innova.no>
Merge-request: !7174
2022-04-15 08:24:48 -04:00
Jean-Philippe Lebel
331c5d458e CPackIFW: Fix regression in icon file names
Changes in commit 761b6e2466 (CPackIFW: Avoid colliding names for icons
/ logos, 2021-10-08, v3.23.0-rc1~546^2) accidentally left an extra `.`
in computed file names.  Remove it.

Fixes: #23423
2022-04-14 09:45:35 -04:00
Kyle Edwards
d0d09aa29f FILE_SET: Make INTERFACE libraries with HEADER_SETS participate in buildsystem
If an INTERFACE library has HEADER_SETS, and its header sets contain
files generated by a custom command, the library needs to participate in
the buildsystem so that the files will be generated.

Fixes: #23422
2022-04-14 09:17:54 -04:00
Brad King
efe08e2894 CMake 3.23.1 2022-04-12 10:06:39 -04:00
Brad King
56a11b2f64 Merge topic 'file-set-repr-improvements' into release-3.23
5fa15ec9f3 Help: Document that target_sources defines [INTERFACE_]HEADER_SETS
c5d4812f20 cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-only
05783b168d cmFileSet: store visibility with the fileset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7168
2022-04-12 10:05:25 -04:00
Brad King
4135d726d4 Merge topic 'correct_list-presets_parsing' into release-3.23
45299a8f9b cmake: --list=presets=[type] doesn't generate incorrect warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7164
2022-04-12 08:16:00 -04:00
Brad King
4471f2b0d7 Merge topic 'xcode-pch' into release-3.23
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
2022-04-12 08:10:47 -04:00
Cristian Adam
476c6a8910 PCH: Fix Xcode non-pch language exclusion
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
2022-04-11 14:16:33 -04:00
Ben Boeckel
c5d4812f20 cmTarget: make HEADER_SETS and INTERFACE_HEADER_SETS read-only
There is no reason to allow these properties to be manipulated by user
code. Instead, use the stored visibility on the fileset objects to
derive what these properties should contain.
2022-04-11 14:06:15 -04:00
Ben Boeckel
05783b168d cmFileSet: store visibility with the fileset
The visibility is intrinsic to the fileset, so store it with it. This
avoids recalculating it on every addition to the fileset.
2022-04-11 13:41:40 -04:00
Robert Maynard
45299a8f9b cmake: --list=presets=[type] doesn't generate incorrect warnings
Fixes #23407
2022-04-11 10:46:03 -04:00
Craig Scott
a10fc754a6 CheckSourceCompiles: Avoid linker warning with -fembed-bitcode
When the Apple linker sees -headerpad_max_install_names and
bitcode is enabled with a flag like -fembed-bitcode, it issues a warning
and ignores the -headerpad_max_install_names flag. This causes
unrelated compiler and linker flag checks to fail for valid flags.
In f745e0497e (CheckCompilerFlags: Catch linker warning about ignored
flags, 2022-01-03), we started detecting linker warnings, which caused
a regression for projects that were setting -fembed-bitcode in their
CMAKE_CXX_FLAGS or similar. Prevent that regression by removing
the -headerpad_max_install_names linker flag when we know it will
warn and be ignored anyway.

Fixes: #23390
Issue: #23408
2022-04-09 21:51:09 +10:00
Kyle Edwards
f779f8c0ad FILE_SET: Forbid adding header sets to Apple FRAMEWORK libraries
The feature needs a specialized implementation to place headers
in the right place inside frameworks.  To avoid silently doing
the wrong thing, make this case an error for the 3.23 series.

Issue: #23386
2022-04-07 09:26:58 -04:00
Robert Maynard
f7c6b9833c CUDA: Ninja generator generates valid compile database
The ninja generator has been updated to poperly write the compile
database when the CUDA language has been enabled.

Fixes #23368
2022-03-30 15:16:43 -04:00
Brad King
00677703d0 CMake 3.23.0 2022-03-29 11:02:43 -04:00
Brad King
7f1573ea77 Merge topic 'cpack-ifw-validate-input' into release-3.23
e41f1ef6ff CPack/IFW: Add missing referenced source file validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
Merge-request: !7116
2022-03-28 10:53:13 -04:00
Brad King
710c7ab647 Merge topic 'bindexplib-arm64ec' into release-3.23
b019ee1a8d bindexplib: Exclude entry and exit thunks for arm64EC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7112
2022-03-28 10:49:53 -04:00
Brad King
a0149b08f0 Merge topic 'aix-exe-exports' into release-3.23
a8dae21ac1 AIX: Fix executable ENABLE_EXPORTS in Makefile generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7120
2022-03-28 10:47:45 -04:00
Brad King
0906a9b53d Merge branch 'aix-exe-exports' into release-3.22
Merge-request: !7120
2022-03-26 08:36:31 -04:00
Brad King
a8dae21ac1 AIX: Fix executable ENABLE_EXPORTS in Makefile generators
In commit afcd9fe669 (AIX: Add an option to disable automatic exports
from shared libraries, 2020-01-30, v3.17.0-rc1~47^2) the population of
the `<AIX_EXPORTS>` rule variable placeholder was accidentally added to
the device linking rule rather than the main linking rule.  This caused
our `ExportImportList` script on AIX, when called for executables with
`ENABLE_EXPORTS` set, to be given an `AIX_EXPORTS` file name that does
not exist, leading to a warning from the `dump` tool.

Move the population of the `<AIX_EXPORTS>` placeholder in the Makefile
generators to the main link rule.

Issue: #20290
2022-03-26 08:28:59 -04:00
moyo1997
b019ee1a8d bindexplib: Exclude entry and exit thunks for arm64EC 2022-03-25 11:00:21 -04:00
Craig Scott
e41f1ef6ff CPack/IFW: Add missing referenced source file validation 2022-03-25 22:53:19 +11:00
Brad King
18b02cc127 CMake 3.23.0-rc5 2022-03-23 10:11:55 -04:00
Kyle Edwards
26caa97057 define_property(): Change constraints of INITIALIZE_FROM_VARIABLE
Remove the requirement that the variable name have a prefix while
keeping the suffix requirement. Require that the property name
contains an underscore. Update docs and tests accordingly.

Fixes: #23340
2022-03-23 16:39:32 +11:00
Brad King
2aad4cef97 Merge topic 'revert-link-interface-direct-for-3.23' into release-3.23
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7098
2022-03-22 11:56:43 -04:00
Brad King
2f3cf60711 Merge topic 'cleanup-define_property' into release-3.23
87c3b5e421 define_property(): Only test prefix if INITIALIZE_FROM_VARIABLE is given
9b50f221f6 Help: Update the main purpose of define_property()
e993e2c52c Help: Clean up INITIALIZE_FROM_VARIABLE define_property() option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !7090
2022-03-22 08:55:14 -04:00
Brad King
687a91967f Revert INTERFACE_LINK_LIBRARIES_DIRECT feature for 3.23 branch
Revert commit f3ad061858 (Add usage requirements to update direct link
dependencies, 2022-01-12, v3.23.0-rc1~44^2) and the property storage
updates in its predecessor commit 193a999cd5 (cmTarget: Add
INTERFACE_LINK_LIBRARIES_DIRECT{,_EXCLUDE} backtrace storage,
2022-01-06, v3.23.0-rc1~44^2~1) from the 3.23 release branch.

After initial experience using the feature in practice, additional
design considerations have been raised for discussion in the original
issue.  To avoid rushing this for the 3.23 series, we've decided to
revert the feature for now so it can be revised for a future release.

Issue: #22496
2022-03-21 13:17:32 -04:00
Craig Scott
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
The rootVolumeOnly attribute is deprecated. Apple docs say to use
domains instead.

Fixes: #23343
2022-03-21 15:43:46 +11:00
Craig Scott
28fdc3a536 productbuild: Simplify internal CPACK_PRODUCTBUILD_DOMAINS usage
There's no benefit to storing the CPACK_PRODUCTBUILD_DOMAINS
prefix in a variable and appending to it in the C++ code. It has the
disadvantage of making it harder to find usages of the variables with
a suffix appended to that string. Expand out the strings at the places
they are used so that they are easier to spot.
2022-03-21 13:36:48 +11:00