4194 Commits

Author SHA1 Message Date
Brad King
e677cc421d Merge branch 'ninja-intl-paths' into release-3.24
Merge-request: !7833
2022-10-27 09:24:46 -04:00
Brad King
a12050666c Tests: Add case for ninja with non-ascii chars
Issue: #24089
2022-10-26 15:25:45 -04:00
Brad King
6f2e8bace1 Merge branch 'try_compile-CMP0128' into release-3.24
Merge-request: !7821
2022-10-25 10:35:30 -04:00
Brad King
90287792b6 Tests: Avoid running C++11 test on GNU < 4.7
The test added in commit 50e90e2828 (try_compile: Honor CMP0128 setting
in test project, 2022-10-18, v3.25.0-rc2~4^2) requires that the compiler
support C++11 mode, so do not run it on GNU compilers that are too old.
2022-10-24 12:04:57 -04:00
Brad King
588c9c4145 Merge branch 'try_compile-CMP0128' into release-3.24
Merge-request: !7803
2022-10-18 14:25:52 -04:00
Brad King
50e90e2828 try_compile: Honor CMP0128 setting in test project
Some projects pass a raw `-std=` flag to the compiler in the
`try_compile` project.  If they do not set CMP0128 to NEW,
we should not append a `-std=` flag where we did not before
the policy was added.

Fixes: #24063
2022-10-18 13:38:00 -04:00
Brad King
0301779e85 LLVMFlang: Add support for mixed-language linking with Fortran
Parse implicit link information for this compiler to support
mixed-language linking.  This was missed by commit 85749766df
(LLVMFlang: Add support for LLVM Flang, 2021-07-07, v3.24.0-rc1~86^2).
Also activate mixed-language test cases that would have caught this.

Issue: #22387
2022-10-11 15:38:48 -04:00
Brad King
5d2c2b2558 Tests: Update RunCMake.XcodeProject iOS cases for Xcode 14.0
Issue: #24011
2022-09-30 13:08:05 -04:00
Zack Galbreath
65260d6c1e ctest: only report make-level errors when no others are found
In commit ab9ad2a6a0 (ctest: report make-level errors to CDash when
using launchers, 2020-09-24, v3.19.0-rc1~84^2~1) we taught CTest to
capture and report errors from the build command when using launchers.

This had the unintended side effect of reporting a separate build error containing
the full build output when the build command returns non-zero. To fix this problem,
we now only report build command errors from CTest launchers when no other
more specific build errors are found.

Fixes: #23991
2022-09-26 09:40:58 -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
Craig Scott
48b380c961 FetchContent: Ignore EXACT for redirected find_package() calls
When FetchContent_MakeAvailable() populates a dependency for which
find_package() integration is enabled, all future calls to find_package()
MUST succeed using the contents of the redirection directory. The
generated config version file was not handling calls where the EXACT
keyword was given, resulting in such calls rejecting the redirection
directory's contents and continuing its search. It is not allowed to do
that. Fix the generated file to also set PACKAGE_VERSION_EXACT to
true so that calls with EXACT now accept it, as was originally intended.

Fixes: #23950
2022-09-11 18:36:31 +10:00
Brad King
6695957237 Merge topic 'truncation_invalid' into release-3.24
bd30d20bc3 Tests: Add cases covering bad ctest output truncation types
dbf840392d ctest: print error for invalid CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7596
2022-09-09 09:52:04 -04:00
Brad King
bd30d20bc3 Tests: Add cases covering bad ctest output truncation types
Issue: #23869
2022-09-07 12:23:08 -04:00
Marc Chevrier
985b4c82a6 Check link libraries properties: fix performances regression
Fixes: #23939
2022-09-07 15:20:53 +02:00
Frank Winklmeier
cb55d5e730 RunCMakeTest: fix Truncation test definition
The `ctest_test` and `CTestCommandLine` truncation tests had multiple problems:
- escape expected result string to avoid regex matching
- specify the truncation size
- pass the truncation mode correctly into the test definition
- use unique test names

Issue: #23868
2022-09-05 13:42:40 +02:00
Brad King
85d29b7de1 Merge topic 'Link-MACOSX_BUNDLE' into release-3.24
f5a441a616 Xcode: Fix erroneous MACOSX_BUNDLE link

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7624
2022-09-01 09:58:16 -04:00
Marc Chevrier
f5a441a616 Xcode: Fix erroneous MACOSX_BUNDLE link
Refactoring in commit a2cfa2da4f (GenEx/LINK_LIBRARY: Add features for
framework support on Apple, 2022-02-10, v3.24.0-rc1~661^2) accidentally
removed a `GetParentDirectory` call.  Restore it.

Fixes: #23891
2022-08-31 09:52:38 -04:00
Brad King
3aebeb1b55 Merge topic 'CMAKE_FIND_USE_INSTALL_PREFIX-support-staging-prefix' into release-3.24
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
43d31c5198 cmFindBase: Refactor CMAKE_FIND_USE_INSTALL_PREFIX handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7623
2022-08-31 09:39:51 -04:00
Robert Maynard
0fc10bb19b CMAKE_FIND_USE_INSTALL_PREFIX considers CMAKE_STAGING_PREFIX
Fixes #23900
2022-08-30 17:52:40 -04:00
Brad King
d3ac4e8246 Tests: Teach RunCMake.SymlinkTrees to tolerate CCACHE_BASEDIR
If the test is driven with a `ccache`-wrapped compiler then
the `CCACHE_BASEDIR` environment variable might break paths
the test checks.

Fixes: #23885
2022-08-30 16:41:20 -04:00
Kyle Edwards
970052fedd FILE_SET: Fix source group detection
Call MatchChildrenFiles() instead of MatchesFiles() in order to
account for files being in subgroups of source groups.

Fixes: #23880
2022-08-24 16:07:24 -04:00
Kyle Edwards
bcc3965813 Tests: Fix VS10Project SourceGroupTreeCMakeLists check
Fix an `IN LISTS` loop, fix a variable check, and escape backslashes
in the regex used to search for source group names.
2022-08-24 16:07:24 -04:00
Brad King
0ebff0d61a export: Restore exclusion of private shared library dependencies from checks
Refactoring in commit 8c65b7042e (cmExportFileGenerator: Simplify
collection of targets missing from export set, 2022-04-11,
v3.24.0-rc1~281^2) accidentally dropped the behavior change from
commit 0ad2a1c181 (Export: Never treat private link libraries as
public package dependencies., 2013-09-24, v3.0.0-rc1~559^2).
Restore the behavior and add a test.

Fixes: #23838
2022-08-15 10:40:03 -04:00
Brad King
3a38f6c618 Merge topic 'fetchcontent-set-CMAKE_VERIFY_INTERFACE_HEADER_SETS' into release-3.24
2a9cc3e8e8 FetchContent: Disable header set verification for dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7535
2022-08-04 09:34:47 -04:00
Craig Scott
2a9cc3e8e8 FetchContent: Disable header set verification for dependencies
The CMAKE_VERIFY_INTERFACE_HEADER_SETS variable is intended to
be under the control of the user. It doesn't discriminate between
header sets defined in the main project and those defined by
dependencies brought into the build directly via FetchContent.
Developers will usually only be interested in verifying the main project's
header sets, not those from dependencies.

Make the variable effectively only enable header set verification of the
main project by turning it off during FetchContent_MakeAvailable() calls.
The user still has variables like CMAKE_PROJECT_INCLUDE and
CMAKE_PROJECT_<projectName>_INCLUDE available to them if they
want to enable verification of all or specific dependencies respectively.

Fixes: #23808
2022-08-04 09:43:10 +10: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
12830cc2a9 Merge topic 'verify-interface-header-sets-interface-library-source-language' into release-3.24
41f15193e5 VERIFY_INTERFACE_HEADER_SETS: Fall back to global languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7517
2022-07-28 08:12:09 -04:00
Kyle Edwards
41f15193e5 VERIFY_INTERFACE_HEADER_SETS: Fall back to global languages
If a target doesn't have any source files, fall back to the global
list of enabled languages to determine the language of the header
file to verify.

Fixes: #23774
2022-07-27 13:29:09 -04:00
Kyle Edwards
27fd172d8d VERIFY_INTERFACE_HEADER_SETS: Finalize compile info for verify targets
Fixes: #23732
2022-07-27 12:25:15 -04:00
Robert Maynard
14a0e750cb cmake: In -P mode ignore flags like --version after --
Fixes: #21031
2022-07-22 14:30:21 -04:00
Robert Maynard
846a650ff7 cmake: In -P mode ignore extra paths on the command line
Fixes: #23748
2022-07-22 13:55:52 -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
Sumit Bhardwaj
7219988b00 VS: Exclude ZERO_CHECK.proj from .sln for include_external_msproject
In `cmGlobalVisualStudio7Generator::WriteTargetsToSolution`, we skip
writing `ZERO_CHECK.proj` to solution file as the check in
`cmGlobalVisualStudioGenerator::IsInSolution` returns `false` for
`ZERO_CHECK`. However, we write ZERO_CHECK to ProjectDependencies for
external projects as there are no checks in
`cmGlobalVisualStudio71Generator::WriteExternalProject`.

Similar to `cmGlobalVisualStudioGenerator::IsInSolution`, we introduce
`IsDepInSolution(const std::string&)` which excludes `ZERO_CHECK.proj`
from being added to sln file for the cases where we have `ZERO_CHECK.proj`.

Fixes: #23708
2022-07-20 08:51:38 -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
Brad King
5970536e16 Merge topic 'genex-LINK_LIBRARY-check-supported-properties' into release-3.24
913ea78d7a Genex LINK_LIBRARY and LINK_GROUP: check supported properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7454
2022-07-07 09:07:00 -04:00
Marc Chevrier
913ea78d7a Genex LINK_LIBRARY and LINK_GROUP: check supported properties
Refines check for properties supporting these genex.
Enhance error message.

Fixes: #23699
2022-07-06 16:15:43 +02:00
Brad King
9b051f557e Merge topic 'genex-LINK_LIBRARY-fix-generation' into release-3.24
e8792da04b genex-LINK_LIBRARY: ensure correct generation inside LINK_GROUP genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7443
2022-07-06 09:13:05 -04:00
Brad King
c70ed631f7 Merge topic 'nvhpc-Werror' into release-3.24
35ec676ace NVHPC: warnings as error flag is "-Werror"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7415
2022-07-05 10:32:54 -04:00
Brad King
6fee995256 Merge topic 'add_nvcc_compile_warning_support' into release-3.24
cd324110d2 CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target property
2e9ac1d272 Tests: Refactor warn on error tests to support multiple languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7417
2022-07-05 10:31:22 -04:00
Marc Chevrier
e8792da04b genex-LINK_LIBRARY: ensure correct generation inside LINK_GROUP genex
This fix ensures the following pattern is correctly handled:
$<LINK_GROUP:group_feat,$<LINK_LIBRARY:lib_feat,mylib>>

With:
CMAKE_LINK_GROUP_USING_group_feat = "—START_GROUP" "—END_GROUP"
CMAKE_LINK_LIBRARY_USING_lib_feat = "—PREFIX" "—LINK <LIBRARY>" "—SUFFIX"

Before the fix, we get the following generation:
—START_GROUP —PREFIX —LINK /path/to/mylib —END_GROUP —SUFFIX
—END_GROUP and —SUFFIX are in the wrong order

After the fix, we get the correct order:
—START_GROUP —PREFIX —LINK /path/to/mylib —SUFFIX —END_GROUP
2022-07-05 10:00:04 +02:00
Ben Leadbetter
8bd98b8117 Genex: Fix TARGET_BUNDLE_DIR_NAME incorrect extension
Fix the genex from commit 997af2e1a6 (Genex: Add TARGET_BUNDLE_DIR_NAME,
2022-04-14, v3.24.0-rc1~233^2) to use the correct bundle directory
extension for each bundle type.

Fixes: #23683
2022-07-01 08:18:10 -04:00
Robert Maynard
35ec676ace NVHPC: warnings as error flag is "-Werror" 2022-07-01 08:05:19 -04:00
Robert Maynard
cd324110d2 CUDA: NVCC support for COMPILE_WARNING_AS_ERROR target property 2022-07-01 08:04:54 -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
Brad King
6bc597b30e Merge topic 'file-set-crash' into release-3.24
3fee5398bd install(EXPORT): Check for missing file sets at generate time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7420
2022-06-30 08:20:23 -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
Robert Maynard
2e9ac1d272 Tests: Refactor warn on error tests to support multiple languages 2022-06-29 11:50:34 -04:00
Brad King
fd83847b14 Merge topic 'vs-compile-batching' into release-3.24
9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching
a7ebb73929 Help: Improve formatting in VS_NO_COMPILE_BATCHING docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7405
2022-06-23 09:23:55 -04:00
Brad King
9a0a94fdaa VS: Add variable to to turn off Visual Studio compile batching
Extend the change from commit b764c7c273 (VS: Add property to turn off
Visual Studio compile batching, 2022-02-07, v3.24.0-rc1~710^2) by
adding a variable to initialize the property on every target.

Issue: #23179
Fixes: #23639
2022-06-22 12:07:03 -04:00