Commit Graph

13566 Commits

Author SHA1 Message Date
Cristian Adam
74b5fae52d Clang: Use -fno-ansi-escape-codes for color diagnostics on Windows
-fno-ansi-escape-codes is used only on Windows by Clang.

Without the flag color diagnostics are displayed only if clang.exe
is executed directly. Build tools like ninja and mingw32-make
will not display colored diagnostics.

Using -fno-ansi-escape-codes will make the build tools pass
the colored diagnostics to the calling application e.g IDE.

Fixes: #24235
2023-10-23 09:41:29 -04:00
مهدي شينون (Mehdi Chinoune)
44faa3773c PGI/NVHPC: Remove -Mipa compiler option for 23.3+
`-Mipa` was removed since 23.3.  The compiler warns about it:

    nvfortran-Warning-The option -Mipa has been deprecated and is ignored.

See: https://docs.nvidia.com/hpc-sdk/archive/23.9/hpc-sdk-release-notes/index.html#deprecations
2023-10-13 14:04:09 -04:00
Heiko Becker
77ed529c22 FindRuby: Add support for 3.2 2023-10-10 09:25:05 -04:00
Brad King
8547025ff2 Merge topic 'findcuda_toolkit_restore_lib_search_dir' into release-3.28
0b6ae9c467 FindCUDAToolkit: Restore CUDAToolkit_LIBRARY_SEARCH_DIRS variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8859
2023-10-06 08:38:13 -04:00
Robert Maynard
0b6ae9c467 FindCUDAToolkit: Restore CUDAToolkit_LIBRARY_SEARCH_DIRS variable
This was accidentally dropped by commit 4316d4dcfd (FindCUDAToolkit:
Search all of `nvcc` implicit includes and library dirs, 2023-09-26).
2023-10-04 12:10:02 -04:00
Brad King
a483637821 Merge topic 'FindPkgConfig-error' into release-3.28
4c96b31e4b FindPkgConfig: Report not-found package names in fatal error message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8856
2023-10-04 11:19:36 -04:00
Brad King
1f00b0e230 Merge topic 'LLVMFlang-MSVC' into release-3.28
26bf32cdc6 LLVMFlang: Add support for targeting MSVC ABI on Windows
e9af7b9687 LLVMFlang: Add support for CMAKE_Fortran_COMPILER_TARGET
26fa048ffe Tests: Enable CMP0091/CMP0141 for MSVC settings in FortranOnly test
9d060b8682 Fortran: Save CMAKE_LINKER variable persistently for MSVC ABI
7571e653f4 CMakeDetermineCompilerABI: Add option to skip implicit link info parsing
12733d0d8d CMakeParseImplicitLinkInfo: Detect link lines using link.exe and lld-link

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8852
2023-10-04 11:18:40 -04:00
Anthony Baker
4c96b31e4b FindPkgConfig: Report not-found package names in fatal error message 2023-10-03 11:59:12 -04:00
Brad King
615e95af60 Merge topic 'FindPostgreSQL-16'
25644a78de FindPostgreSQL: Add support for version 16

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8854
2023-10-03 09:27:29 -04:00
Brad King
26bf32cdc6 LLVMFlang: Add support for targeting MSVC ABI on Windows
The compiler does not yet support everything needed to integrate well
with the MSVC ABI, in particular for runtime library selection and debug
format selection.  Document them in FIXME comments and leave this
support undocumented by CMake for now.

Fixes: #24840
Inspired-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
2023-10-03 09:15:24 -04:00
Brad King
e9af7b9687 LLVMFlang: Add support for CMAKE_Fortran_COMPILER_TARGET 2023-10-02 18:52:02 -04:00
Brad King
9d060b8682 Fortran: Save CMAKE_LINKER variable persistently for MSVC ABI
We already do this for other languages including C and CXX.
2023-10-02 18:52:00 -04:00
Brad King
7571e653f4 CMakeDetermineCompilerABI: Add option to skip implicit link info parsing
Provide a way to do the parsing earlier and not overwrite it here.
2023-10-02 18:51:59 -04:00
Brad King
12733d0d8d CMakeParseImplicitLinkInfo: Detect link lines using link.exe and lld-link
These are printed by LLVM-based compiler drivers targeting the MSVC ABI.
In our use case for this, `CMAKE_LINKER` may not yet be known, so do
not include it in the test data.
2023-10-02 18:51:46 -04:00
Brad King
25644a78de FindPostgreSQL: Add support for version 16
Fixes: #25292
2023-10-02 14:44:04 -04:00
Brad King
8735cbba5d Merge topic 'cxxmodules-no-longer-experimental'
437280b127 cxxmodules: scan C++ sources for imports by default
3cddd11649 Ninja: message about not compiled sources explicitly
068fde1c34 cmGeneratorTarget: use `this->` for method calls
197a6bf171 cxxmodules: rework control logic for scanning regular C++ sources
5eb7bd641a Tests/RunCMake/CXXModules: remove rules file requirement
ff18acc301 CXXModules: remove `EXPERIMENTAL` from C++ module variable names
0c07f39006 cmExperimental: remove the flag for C++ modules
68caec9137 Help: add a manpage for cxxmodule support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !8828
2023-10-02 11:55:38 -04:00
Ben Boeckel
ff18acc301 CXXModules: remove EXPERIMENTAL from C++ module variable names 2023-10-02 10:17:31 -04:00
Brad King
f8332bec19 FindQt4: Fix typo in documentation formatting 2023-10-02 09:52:59 -04:00
Craig Scott
7ab880421a Merge topic 'ExternalProject-declare-download-byproducts'
872daff159 ExternalProject: declare byproducts for the download step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8823
2023-10-01 07:12:56 -04:00
Ben Boeckel
872daff159 ExternalProject: declare byproducts for the download step
This can surface a conflict where two projects download the same file
and get scheduled against each other.
2023-09-30 15:59:22 +10:00
Brad King
af149fbcaa Merge topic 'FindCUDAToolkit-implicit-dirs'
4316d4dcfd FindCUDAToolkit: Search all of `nvcc` implicit includes and library dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8835
2023-09-29 09:37:30 -04:00
Brad King
88c7eaa7a7 Merge topic 'android-clang-c++23'
75e9918a66 Android: Require Clang 18 for -std=c++23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !8847
2023-09-28 09:50:36 -04:00
Robert Maynard
4316d4dcfd FindCUDAToolkit: Search all of nvcc implicit includes and library dirs
Improves the handling of CUDA layouts where we have multiple include
and library directories listed in the output of `nvcc -v`. This
updates both when the CUDA language is enabled or not.

Fixes: #24915
2023-09-27 13:28:52 -04:00
Brad King
75e9918a66 Android: Require Clang 18 for -std=c++23
Update the Clang version checks added by

* commit eacacc70fc (Clang: use -std=c++23 for Clang 17.0+,
                     2023-05-08, v3.27.0-rc1~115^2)
* commit 0183956d30 (Clang: C++26 support,
                     2023-05-16, v3.27.0-rc1~85^2)

to account for Android NDK r26's distribution of a Clang based on a
development version of LLVM/Clang 17.0 that pre-dated addition of
these flags.

Follow the pattern from commit 12e6796b62 (Android: Do not pass
non-existent Clang -std flags, 2018-04-02, v3.12.0-rc1~284^2),
which fixed the same problem for `-std=c++17`.

Fixes: #25281
2023-09-27 12:56:49 -04:00
Brad King
5d32320bf3 Merge topic 'hip-nvidia'
fd982eec10 HIP: Add tests for special NVIDIA values of CMAKE_HIP_ARCHITECTURES
8c8b3f1bfa HIP: Fix support for -DCMAKE_HIP_ARCHITECTURES=native with NVCC
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
e43918b4ca HIP: Fix linking mixed-lang binary with CXX compiler and Makefile generators
4794505122 HIP: Do not require hip-lang package for NVIDIA platform
09d759dc7f HIP: Simplify exclusion of AMD device runtime with NVIDIA GPUs
2a60663670 HIP: Simplify CMAKE_GENERATOR references for determining compiler
8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8836
2023-09-26 09:40:25 -04:00
Brad King
8a39d146d4 Merge topic 'FindOpenMP-macOS-LLVM-Clang'
3cff031c9a FindOpenMP: Handle non-Apple clang on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8832
2023-09-26 09:33:02 -04:00
Brad King
0be496cb5a Merge topic 'orangec-compiler'
f8fa4f1ad7 ci: Add OrangeC 6.73.1 nightly CI job
531b4fe643 OrangeC: Add support for OrangeC compiler
10f435a58f Tests: Simplify nested if conditions in Complex tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Victor <lostfreeman@gmail.com>
Merge-request: !8592
2023-09-26 09:23:10 -04:00
Brad King
187fb1911f Merge topic 'add-c++23'
961a077238 IBMClang: Add provisional flags for C++23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8837
2023-09-26 09:18:10 -04:00
Craig Scott
8a90ae92af Merge topic 'FetchContent-EXCLUDE_FROM_ALL'
5f77807f1c FetchContent: Add support for EXCLUDE_FROM_ALL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8822
2023-09-26 08:35:45 -04:00
Xing Xue
961a077238 IBMClang: Add provisional flags for C++23
With this one can use the IBM Open XL C/C++ compiler to build projects
that require feature `cxx_std_23`.
2023-09-25 19:05:31 -04:00
Steven Stallion
5f77807f1c FetchContent: Add support for EXCLUDE_FROM_ALL
Fixes: #20167
2023-09-26 08:56:44 +10:00
Brad King
8c8b3f1bfa HIP: Fix support for -DCMAKE_HIP_ARCHITECTURES=native with NVCC 2023-09-25 16:21:55 -04:00
Brad King
b3e92775ab HIP: Add CMAKE_HIP_HOST_COMPILER when compiler is NVCC
Also add `HIPHOSTCXX` environment variable.
2023-09-25 16:11:18 -04:00
Brad King
4794505122 HIP: Do not require hip-lang package for NVIDIA platform
ROCm may not install the `hip-lang` cmake package on NVIDIA platforms.
Skip verifying its presence.  We do not use it for NVIDIA platforms anyway.

Fixes: #25271
2023-09-25 16:06:36 -04:00
Brad King
09d759dc7f HIP: Simplify exclusion of AMD device runtime with NVIDIA GPUs 2023-09-25 16:06:36 -04:00
Brad King
2a60663670 HIP: Simplify CMAKE_GENERATOR references for determining compiler 2023-09-25 16:06:36 -04:00
Brad King
8124950f6c CUDA: Generalize CMAKE_{CUDA => <LANG>}_HOST_COMPILER variable docs 2023-09-25 16:06:30 -04:00
David Lindauer
531b4fe643 OrangeC: Add support for OrangeC compiler
Add compiler information modules.  Update the test suite.

Fixes: #25032
Co-authored-by: Brad King <brad.king@kitware.com>
2023-09-25 12:27:29 -04:00
Brad King
62d93c9f43 Merge topic 'FindDoxygen-broken-binary'
a960b901de FindDoxygen: Remove redundant debug message when Doxygen fails
59a4aaa237 FindDoxygen: Disable Doxygen if executable returns non-zero result

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8815
2023-09-25 08:59:43 -04:00
Brad King
89d155e1bb Merge topic 'CrayClang-compiler'
80838316a8 CrayClang: Add support for this compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8781
2023-09-25 08:58:25 -04:00
Brad King
82a2f198d8 Merge topic 'cxxmodules-gcc-14'
4089954595 gitlab-ci: update to GCC CI container with merged P1689R5
c2564f5916 ci: drop extra scandep source settings for GCC
ee52a02d56 ci: update GCC build to use master after P1689R5 is merged
4f0410959e GCC: add rules for scanning C++ module dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8827
2023-09-25 08:56:04 -04:00
Keno Fischer
3cff031c9a FindOpenMP: Handle non-Apple clang on macOS
I was noticing that FindOpenMP was failing to find my openmp installation
on macos when building with a custom-compiled clang. Upon inspection it
appears that FindOpenMP is looking for `AppleClang` as a compiler
identification and the `Clang` case is only applicable for Win32.
Try to fix that by treating custom `Clang` on macos the same as
`AppleClang`.
2023-09-24 19:28:58 +02:00
Christoph Grüninger
a960b901de FindDoxygen: Remove redundant debug message when Doxygen fails
We warn for this now.
2023-09-22 10:11:30 -04:00
Christoph Grüninger
59a4aaa237 FindDoxygen: Disable Doxygen if executable returns non-zero result
This makes detection of Doxygen more robust in case of broken Doxygen
executables. Doxygen is called to determine its version number. If this
call returns a non-zero result, we have an indication that the Doxygen
executable is broken. We report Doxygen as not found to prevent issues
with checks for other Doxygen component, that might lead to
configuration aborts.

Fixes: #18708
2023-09-22 10:11:22 -04:00
Ryan Krattiger
80838316a8 CrayClang: Add support for this compiler
Add `CrayClang` compiler ID for newer Cray compilers.

Fixes: #25102
2023-09-22 09:39:52 -04:00
Brad King
122ec98dcf Merge topic 'hip-nvidia'
6546aa2a2a ci: Add HIP job using CUDA on NVIDIA GPUs
18158bf81c HIP: Add support for NVIDIA GPUs
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
90e23f40ee Tests/HIP/WithDefs: Clean up test case
9ebdf3281f Tests/HIP/ArchitectureOff: Cover HIP_ARCHITECTURES initialization
cfec29196e ci: Add CUDA 11.8 to HIP 5.5 image
26470eb987 ci: Put HIP GPU platform in CMake_TEST_HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8817
2023-09-22 09:19:52 -04:00
Brad King
d2655c59dc Merge topic 'cuda-factor-out-lang'
b32ea7cff0 CUDA: Factor out helper to generate CUDA architecture flags
b3a1f17567 CUDA: Factor out helper to validate CMAKE_CUDA_ARCHITECTURES
8617c28221 CUDA: Factor out helper for detecting native CUDA architectures
0db0fe7958 CUDA: Factor out helper to compute all CUDA architectures
c16f1e2b93 CUDA: Factor out helper to find CUDA Toolkit for compiler
a6841a967b CUDA: Factor out helper to filter implicit link libraries
deff0e638d CUDA: Factor out helper to parse NVCC implicit compiler and linker flags
e1b2a5062f CUDA: Factor out some NVCC compiler information
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !8816
2023-09-22 09:18:53 -04:00
Brad King
af888a07f8 Merge topic 'macOS-simplify-framework-link-option'
a61c1d6ff4 macOS: Framework: simplify link flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !8824
2023-09-22 09:06:10 -04:00
Brad King
18158bf81c HIP: Add support for NVIDIA GPUs
Add support for using the CUDA Toolkit's NVCC to compile HIP code.

Fixes: #25143
2023-09-21 15:34:37 -04:00
Brad King
127b6fa06b HIP: Add CMAKE_HIP_PLATFORM variable to specify GPU platform
For now, require the value to be `amd`, since that is the only
platform we currently support.
2023-09-21 15:34:37 -04:00