Commit Graph

13940 Commits

Author SHA1 Message Date
Brad King
578ba81424 Merge topic 'clang-ansi-color' into release-3.29
1004cc2b52 Clang: Drop non-existent -fno-ansi-escape-codes flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9592
2024-06-11 10:55:59 -04:00
Brad King
1004cc2b52 Clang: Drop non-existent -fno-ansi-escape-codes flag
In commit 74b5fae52d (Clang: Use -fno-ansi-escape-codes for color
diagnostics on Windows, 2023-10-19, v3.28.0-rc3~3^2) we added the
positive option `-fansi-escape-codes` and the negative form of
the option, `-fno-ansi-escape-codes`.  According to the LLVM/Clang
documentation:

* https://releases.llvm.org/18.1.4/tools/clang/docs/UsersManual.html#cmdoption-fansi-escape-codes

only the positive form of the option exists.

Fixes: #26036
2024-06-10 09:23:41 -04:00
Brad King
0167089484 CPack/WiX: Restore default (missing) InstallScope from 3.28 and lower
In commit 60661f6770 (CPack/WiX: Make InstallScope configurable,
2023-11-07, v3.29.0-rc1~413^2) the `CPACK_WIX_INSTALL_SCOPE` default was
set to `perMachine`.  While installers created with `perMachine` have
better behavior on their own than installers created without any
`InstallScope`, they do not cleanly convert existing installations on
updates.

Fixes: #26029
2024-06-05 13:47:36 -04:00
Brad King
69f26d8156 VS: Fix compiler identification of nvcc with unsupported host compiler
`nvcc` from CUDA < 12.4 does support the MSVC 14.40.17.10 toolset.
Users may specify `CUDAFLAGS=-allow-unsupported-compiler` to bypass the
check.  However, we do not use arbitrary user-specified flags during
compiler identification in the VS generator because escaping them for
the `AdditionalOptions` of the `.vcxproj` file requires non-trivial
logic that we currently only implement in the C++ generator code.
Instead, just always pass `-allow-unsupported-compiler` during CUDA
compiler identification in the VS generator.

Fixes: #26003
2024-05-23 13:22:34 -04:00
Brad King
9813b9f0ad Merge topic 'ExternalProject-xcode-effective-platform' into release-3.29
0a3caf0878 ExternalProject: Restore support for Xcode with an effective platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9517
2024-05-14 10:26:46 -04:00
Brad King
0a3caf0878 ExternalProject: Restore support for Xcode with an effective platform
Revert commit cabad8a37f (ExternalProject: Always use $<CONFIG> for
source files, 2023-02-02, v3.27.0-rc1~550^2~3) and restore
Xcode-specific behavior intentionally preserved by commit c111d440ce
(ExternalProject: Express per-config step stamp file paths using CONFIG
genex, 2022-06-08, v3.24.0-rc1~15^2).  Unfortunately we still do not
have a test case, so leave a comment to avoid reverting this.

Issue: #23645
Issue: #23652
2024-05-13 14:41:00 -04:00
Brad King
383f21147a Merge topic 'cxx-inspect-without-scanning' into release-3.29
6df925b595 cxxmodules: Do not scan sources while testing the compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9494
2024-05-07 08:34:04 -04:00
Brad King
6df925b595 cxxmodules: Do not scan sources while testing the compiler
The C++ sources we use to test the compiler do not use modules.
Avoid requiring a compiler that can scan just to enable the language,
even when CMP0155 is NEW.  The project may explicitly turn off
`CMAKE_CXX_SCAN_FOR_MODULES` before adding any targets.

Fixes: #25956
2024-05-06 13:59:27 -04:00
مهدي شينون (Mehdi Chinoune)
928943f91b FindHDF5: Fix detection of versions with more than three components
Fix detecting the version of HDF5 1.14.4.2.

Fixes: #25945
2024-04-30 11:22:41 -04:00
Brad King
8f44e1a07b Merge topic 'save-restore-PACKAGE_PREFIX_DIR' into release-3.29
8ac7958e3a generate_apple_*_selection_file: Save/restore PACKAGE_PREFIX_DIR
bf88879f1f generate_apple_architecture_selection_file: Avoid early returns
a4ac2c92f4 Help: Add missing section heading for apple architecture selection
b7fcc44be9 Help: Fix CMakePackageConfigHelpers typos, grammar and formatting
f1cacaa830 Tests/RunCMake/CMakePackage: Define variable closer to where it is used

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9430
2024-04-22 08:42:12 -04:00
Craig Scott
8ac7958e3a generate_apple_*_selection_file: Save/restore PACKAGE_PREFIX_DIR
Issue: #25827
2024-04-19 11:41:12 -04:00
Craig Scott
bf88879f1f generate_apple_architecture_selection_file: Avoid early returns
This refactoring makes the generated file follow the same structure as
generate_apple_platform_selection_file(). It uses a single if-elseif-else-endif
block rather than a sequence of if-endif blocks. This avoids any early
return() calls, allowing cleanup code to be added at the end later.
2024-04-19 18:17:19 +10:00
Craig Scott
a4ac2c92f4 Help: Add missing section heading for apple architecture selection 2024-04-19 18:17:19 +10:00
Craig Scott
b7fcc44be9 Help: Fix CMakePackageConfigHelpers typos, grammar and formatting 2024-04-19 18:17:19 +10:00
Brad King
0d5953b373 FindBoost: Add support for Boost 1.85
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_85_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.85.0 source tree.
They are the same as 1.84's dependencies, so just update
the version check for warning about newer versions.

Fixes: #25905
2024-04-16 10:01:00 -04:00
Brad King
0e4db17764 CMakePackageConfigHelpers: Restore undocumented PACKAGE_PREFIX_DIR variable
Revert commit 6ddf8712cd (CMakePackageConfigHelpers: Use unique variable
name for pkg prefix, 2024-03-30, v3.29.1~8^2).  It regressed existing
projects that rely on the undocumented `PACKAGE_PREFIX_DIR` variable in
package configuration files generated by `CMakePackageConfigHelpers`.

Fixes: #25873
Fixes: #25885
Issue: #25827
2024-04-11 09:23:46 -04:00
Kai Pastor
4ab860c4c7 FindJasper: Fix Jasper::Jasper IMPORTED_CONFIGURATIONS
In commit 6e8754c625 (FindJasper: Add IMPORTED target, 2021-10-06,
v3.22.0-rc1~20^2) this property was not set correctly.  This was
detected by `CMP0160` because the `IMPORTED` property is read-only.
2024-04-10 12:12:05 -04:00
Matthias Isele
9ff5dae3f6 FindOpenSSL: Update layout for Shining Light Productions debug libraries
The installer no longer names debug libraries with a `d` suffix.  They
are distinguished by the per-runtime-library directory containing them.

Fixes: #25856
2024-04-03 16:59:30 -04:00
Matthias Isele
aa86f487c2 FindOpenSSL: Update layout for Shining Light Productions 32-bit package
Issue: #25856
2024-04-03 16:59:13 -04:00
Brad King
26d1a5aec8 Merge topic 'artos-lib-prefix' into release-3.29
e6b63b5cb2 ARTOS: Add support for finding library files named with 'lib' prefix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Bert Ezendam <bert.ezendam@alliander.com>
Merge-request: !9399
2024-04-03 09:36:19 -04:00
Brad King
a045c5c4ec Merge topic 'vs-intel-oneapi' into release-3.29
3f5cd0389f IntelLLVM: Fix link flags with Visual Studio generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9398
2024-04-03 09:35:19 -04:00
Brad King
3f5cd0389f IntelLLVM: Fix link flags with Visual Studio generators
The link flag wrapping added by commit 5d5a712303 (IntelLLVM: Pass
linker flags to the compiler when used as linker, 2022-05-27,
v3.25.0-rc1~344^2~4) is not needed with Visual Studio generators because
MSBuild invokes the linker directly.  Furthermore, that commit omitted
wrapping of the per-config linker flags.

Revise the logic to add the link flag wrapping more precisely.

Fixes: #25533
2024-04-02 12:54:01 -04:00
Brad King
e6b63b5cb2 ARTOS: Add support for finding library files named with 'lib' prefix
Update the platform module added by commit 462fbd1eca (Add support for
ARTOS platform using GNU C with ac compiler driver, 2015-08-13,
v3.4.0-rc1~201^2) to tell `find_library` to consider library file names
starting in `lib`.

FindEXPAT needs this on ARTOS since commit 13079f382b (FindEXPAT: Fix
for debug and other modified builds, 2023-02-18, v3.27.0-rc1~463^2)
removed its explicit `libexpat` library name candidate.

Fixes: #25776
2024-04-02 12:48:24 -04:00
Evan Wilde
3fb4092826 Swift: Add CMAKE_LINKER_TYPE support
Extend commit 96a953b1ed (Add options to specify linker tool, 2023-09-27,
v3.29.0-rc1~577^2) with the `CMAKE_Swift_USING_LINKER_*` variables
needed to support `CMAKE_LINKER_TYPE` for Swift.
2024-04-02 10:42:12 -04:00
Brad King
e6dee2a4bd FindMPI: Fix finding IntelLLVM wrappers on Windows
In commit 5e700411d2 (FindMPI: add IntelLLVM MPI wrappers, 2024-01-19,
v3.29.0-rc1~92^2) we added `mpiicpx.bat` for C++ on Windows, but that is
a GNU-like front-end that we do not yet support.  Use `mpiicx.bat` for
both C and C++ on Windows, just as we use `icx` to compile both.

Fixes: #25807
2024-04-01 12:11:32 -04:00
Craig Scott
6ddf8712cd CMakePackageConfigHelpers: Use unique variable name for pkg prefix
Fixes: #25827
2024-04-01 09:32:37 +11:00
Craig Scott
91b9d35608 CMakePackageConfigHelpers: Remove unused variable 2024-04-01 09:32:28 +11:00
Brad King
c5c524394e Merge topic 'ExternalProject-list-separator-docs-example' into release-3.29
5d33f41e23 ExternalProject: reword `LIST_SEPARATOR` to indicate what it *does*
611ffce98c ExternalProject: add an example of `LIST_SEPARATOR` usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9376
2024-03-28 11:51:02 -04:00
Ben Boeckel
5d33f41e23 ExternalProject: reword LIST_SEPARATOR to indicate what it *does*
Also remove the (IMO) confusing suggestion to have ` ` as a separator as
it interferes with things like spaces in argument values (e.g., paths)
or generated arguments such as `-GUnix Makefiles`. The new example is
likely more common usage of the facility.
2024-03-28 10:36:31 -04:00
Ben Boeckel
611ffce98c ExternalProject: add an example of LIST_SEPARATOR usage 2024-03-28 10:36:31 -04:00
Brad King
d0272bea04 Merge topic 'FindPkgConfig-no-Strawberry-Perl' into release-3.29
d0dd134bdb FindPkgConfig: Avoid finding Strawberry Perl's pkg-config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9375
2024-03-27 08:17:05 -04:00
Brad King
d0dd134bdb FindPkgConfig: Avoid finding Strawberry Perl's pkg-config
Strawberry Perl may be in the `PATH` to provide `perl`, but it also
comes with a `pkg-config` tool that is unrelated to normal MinGW
distributions.  Since commit c6efbd78d8 (MSVC: Teach find_library to
consider the 'libfoo.a' naming convention, 2024-01-19, v3.29.0-rc1~91^2)
we need to avoid searching Strawberry Perl's `.../c/lib` directory, so
do not let its `pkg-config` point us there.

Fixes: #25820
Issue: #23975
2024-03-26 08:51:32 -04:00
Brad King
a80d8e839d IntelLLVM: Revert accidental use of -external:I with Fortran compilers
In commit 8218aed118 (IntelLLVM: support marking include paths as SYSTEM
directories, 2023-08-15, v3.29.0-rc1~81^2) this flag was added for the C
and C++ compilers, but was accidentally added for Fortran too.  Remove
it for the latter, as it is unsupported.

Issue: #25807
2024-03-24 15:03:11 -04:00
scivision
bade9832e6 FindMatlab: R2024a version map 2024-03-21 10:13:59 -04:00
Brad King
3135a99467 Merge topic 'package-dispatch-apple' into release-3.29
85d6d3b2e3 generate_apple_*_selection_file: Add option to capture errors
2149dbd379 generate_apple_architecture_selection_file: Document $(ARCHS_STANDARD) support
be642f6ed5 generate_apple_architecture_selection_file: Simplify signature
8959ad9db1 Tests/RunCMake/CMakePackage: Fix Apple architecture selection argument order
677f3d721b Tests/RunCMake/CMakePackage: Add architecture i386 for macOS on Xcode < 10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9349
2024-03-20 09:51:43 -04:00
Brad King
85d6d3b2e3 generate_apple_*_selection_file: Add option to capture errors
Add an option to capture error messages in a variable instead of
terminating with a fatal error.

Fixes: #25778
2024-03-19 09:52:32 -04:00
Brad King
2149dbd379 generate_apple_architecture_selection_file: Document $(ARCHS_STANDARD) support
Also add a test case.

Fixes: #25780
2024-03-19 09:52:32 -04:00
Brad King
be642f6ed5 generate_apple_architecture_selection_file: Simplify signature
Allow callers to pass multiple values to list-valued arguments
instead of putting the entire list in a single quoted argument.

Fixes: #25779
2024-03-19 09:52:32 -04:00
Craig Scott
31fb693d06 Help: Fix typos and grammar in pre-3.29 docs 2024-03-19 21:47:21 +11:00
Brad King
8f0801cacc Merge topic 'LINKER_TYPE-mold-support' into release-3.29
801ae06952 LINKER_TYPE: Support MOLD only on GCC versions that support it
939ac5287e LINKER_TYPE: fix spelling error in message
922883782b LINKER_TYPE: Document that linker tool should be in the PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9334
2024-03-14 11:45:13 -04:00
Brad King
d93a7c18d8 Merge topic 'fc-MakeAvailable-leak-var' into release-3.29
2b68048bdb FetchContent: Don't leak temporary variable and restore var robustly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9338
2024-03-14 11:44:00 -04:00
Marc Chevrier
801ae06952 LINKER_TYPE: Support MOLD only on GCC versions that support it
Fixes: #25748
2024-03-13 11:13:21 -04:00
Craig Scott
2b68048bdb FetchContent: Don't leak temporary variable and restore var robustly
In FetchContent_MakeAvailable(), the __fcprefix__ previously used
when pushing the value of CMAKE_EXPORT_FIND_PACKAGE_NAME
to the variable stack is not needed. The stack will never be empty
at that point, so pushing an empty value will be handled correctly.
By removing the __fcprefix__, we no longer need any temporary
variable when restoring CMAKE_EXPORT_FIND_PACKAGE_NAME.

But we need to ensure CMAKE_EXPORT_FIND_PACKAGE_NAME is
left undefined if it wasn't defined before, and pushing an empty
value doesn't let us distinguish between unset and set-but-empty.
Therefore, when CMAKE_EXPORT_FIND_PACKAGE_NAME is undefined,
push a specific value that can't be used by the project instead and
check for that when popping it again. This ensures we can robustly
distinguish the two cases and will always restore the right state.

Fixes: #25758
2024-03-13 17:27:18 +11:00
Brad King
e572986231 LinkerId: Update detection of linker tool for Xcode 15.3
Xcode now prints extra `ExecuteExternalTool` lines that happen to
mention the linker tool, but not in conjunction with actually linking
something.  Ignore them.
2024-03-12 09:48:01 -04:00
Brad King
d914c76d63 Merge topic 'llvm-objdump' into release-3.29
c51f84b96a GET_RUNTIME_DEPENDENCIES: Allow more whitespace before objdump's "DLL Name:"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9325
2024-03-11 10:15:16 -04:00
Alexander Neumann
c34ef6c922 ASM_MARMASM: Remove broken partial support for preprocessor defines
Avoid passing unsupported options to the assembler.

In commit 3166547cf6 (ASM_MARMASM: Add support for Microsoft ARM
assembler language, 2022-10-14, v3.26.0-rc1~383^2) we copied the
assembler command line from `CMakeASM_MASMInformation`, but the
`marmasm` tool does not accept `-D` command-line options.

Issue: #24317
2024-03-10 11:20:20 -04:00
Adrian Pop
c51f84b96a GET_RUNTIME_DEPENDENCIES: Allow more whitespace before objdump's "DLL Name:"
LLVM's `llvm-objdump` has spaces before "DLL Name:" instead of tabs.
2024-03-10 11:03:21 -04:00
Charlie Savage
c2bf3e46fa FindRuby: Fix finding Ruby 3.1+ on Windows
It switched to the UCRT C runtime.
2024-03-05 08:47:59 -05:00
Charlie Savage
867550db43 FindRuby: Add support for 3.3 2024-03-05 08:46:29 -05:00
Brad King
e80ad5809b Merge topic 'FindTIFF-cmake-package' into release-3.29
b6b2f73f36 FindTIFF: Fix name of upstream TIFF cmake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9300
2024-03-01 08:59:50 -05:00