Commit Graph

11 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Marc Chevrier
0619c064ff Linker configuration: enhance usability
The linker configuration file is now optional: It is loaded only if
variable CMAKE_<LANG>_USE_LINKER_CONFIGURATION is set to TRUE.

The file CMakeAddNewLanguage.txt is updated to take into account the
linker configuration.

Fixes: #26393
2024-10-24 16:37:30 +02:00
Brad King
ae1d5ef47f Modules: Initialize per-language platform-specific flag variables consistently
The `Platform/<OS>.cmake` modules record platform-specific flag
variables for the C toolchain.  The `CMake<LANG>Information` modules
initialize the per-language platform-specific flag variables to defaults
copied from C.  However, they have diverged over time, and not all
platform-specific flag variables are initialized correctly for all
languages.  Factor out the CXX language's instance of this logic into a
helper macro, and reuse it for all languages for which we previously
had the platform-specific flag variables at least partially filled out.

Previously the Fortran language's copy of this logic used
`if(NOT DEFINED <var>)` instead of just `if(NOT <var>)` to allow
`Platform/<OS>-<COMPILER_ID>-<LANG>` modules to specify empty values for
some platform-specific flag variables without being overridden.
Use this approach in the helper macro so it applies to all languages.

Fixes: #25990
2024-05-16 11:46:58 -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
bae57dc281 HIP: Fix search for hip-lang CMake package on multiarch distros
We need `CMAKE_LIBRARY_ARCHITECTURE` to find the package before HIP
compiler ABI detection.  However, if HIP is the first enabled language,
the value is not known until `CMAKE_HIP_LIBRARY_ARCHITECTURE` is
determined by the ABI detection step.  Resolve this by detecting
`CMAKE_HIP_LIBRARY_ARCHITECTURE` from the compiler id output.

Fixes: #24562
2023-05-31 16:53:47 -04:00
Gergely Meszaros
22051103b8 HIP: Find hip-lang-config.cmake with REQUIRED
Use REQUIRED for the find_package that loads the hip config, because
it may fail, e.g. because dependent libraries are not found. Before
this if the find_package failed cmake silently continued.
2022-10-09 19:19:45 +02:00
Brad King
36966f63ca Merge topic 'hip-no-hipcc'
cb93f72624 HIP: Simplify detection of HIP runtime CMake package
a71f0fc9c7 HIP: Remove ROMClang compiler id and use Clang directly
b125e9809a HIP: Detect ROCm path earlier
735f41fc2d HIP: Use 'rocm_agent_enumerator' to determine CMAKE_HIP_ARCHITECTURES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !6533
2021-09-20 12:38:44 -04:00
Brad King
cb93f72624 HIP: Simplify detection of HIP runtime CMake package
It only makes sense to use the CMake package from the same ROCm
installation that the compiler uses.  Ask the HIP compiler to report the
location of the ROCm installation.  Verify up front that it contains the
expected CMake package file.
2021-09-16 15:33:53 -04:00
Marc Chevrier
14e57e9637 LINK_WHAT_YOU_USE feature: externalize configuration
Currently, this feature is only supported on ELF platforms. So, the property
LINK_WHAT_YOU_USE will be ignored for other plateforms.
Moreover, flags and commands are now controled by CMake variables.

Fixes: #20174
2021-07-09 14:50:50 +02:00
Robert Maynard
947dbed0aa HIP: Automatically inject the hip::device runtime target
Any target that might need to link to hip code needs the `hip::device`
target
2021-06-07 19:25:33 +00:00
Robert Maynard
b50bfc8913 HIP: Add language to CMake 2021-06-07 19:25:33 +00:00