| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Prepare to use it for other languages.
|
|
|
|
| |
Prepare to use it for other languages.
|
|
|
|
| |
Prepare to use it for other languages.
|
|
|
|
|
|
|
|
| |
Replace old-style `file(APPEND .../CMake{Output,Error}.log)` logging
with calls to `message(CONFIGURE_LOG)` to record the steps in the
`CMakeConfigureLog.yaml` configure log instead.
Issue: #23200
|
|
|
|
|
|
|
|
|
|
| |
`try_compile` and `try_run` now automatically log checks using them to
`CMakeConfigureLog.yaml`.
Add `LOG_DESCRIPTION` arguments to some `try_compile` calls to
replace the description previously written to the old logs.
Issue: #23200
|
|
|
|
|
|
|
|
| |
We need to revert this change as it can disable error messages
when compiling invalid CUDA code.
This reverts commit ea659b155d (CUDA: Always mark cuda toolkit as system
include, 2022-06-27, v3.25.0-rc1~269^2).
|
|
|
|
|
|
|
|
|
|
|
| |
Modify some modules that ship with CMake to use the new SOURCES_FROM_*
arguments to try_compile / try_run as added by commits cb14ae2b87
(try_compile: Add SOURCE_FROM_{ARG,VAR}, 2022-09-21) and 611d801790
(try_compile: Add SOURCE_FROM_FILE, 2022-09-22). This covers users which
previously either used an existing file (but sometimes needed to rename
it), or which wrote out their source in entirety. It does NOT cover
users that actually need configure_file functionality, as those will be
more involved to update and will thus be tackled in part 2.
|
|
|
|
|
|
|
|
|
|
|
| |
Modify most of the modules that ship with CMake to use the new
try_compile / try_run signatures added by commit aa9220d3a0
(try_compile: Add keyword-dispatched signature, 2022-09-02). This
improves debugging by each invocation using its own directory so that
the results of multiple invocations can be retained.
This does not cover any invocations which provide an entire project, as
that flavor of try_compile has not yet been updated.
|
|
|
|
| |
Fixes: #23731
|
|
|
|
| |
Fixes #23459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `native` architecture compiles for the host's GPUs, but our CI jobs
may may run on hosts with GPUs newer than supported by their version of
the CUDA toolkit. Add an undocumented environment variable to tell
CMake to clamp the native architecture to that supported by the toolkit.
Without this, we may try to compile for architectures not supported by
the CUDA Toolkit, which fails. Since commit d1b48bfabd (CUDA: Add
support for CUDA_ARCHITECTURES=native, 2022-03-04), our CUDA 9.2 CI job
fails when it runs on a CI host with a GPU architecture newer than that
CUDA 9.2 supports. Clamping the architecture level fixes that.
Do not document this clamp behavior publicly, at least for now.
Users can be responsible for building with a CUDA toolkit recent
enough to support their host's GPUs.
Issue: #22375
|
|
|
|
|
|
|
|
|
|
|
| |
CUDA 11.6 added the `nvcc -arch=native` flag to automatically compile
for the host GPUs' architectures. Add support for specifying this
special `native` value in `CMAKE_CUDA_ARCHITECTURES` and
`CUDA_ARCHITECTURES`. During the compiler ABI detection step,
detect the native architectures so we can pass them explicitly
when using Clang or older versions of nvcc.
Fixes: #22375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the logic that converts a `try_compile` result from a cache
entry to a normal variable to tolerate an existing normal variable
under CMP0126 NEW behavior. Otherwise the `try_compile` result
is ignored because CMake uses the false value of the normal variable,
and CMake incorrectly reports that the compiler does not work.
This went unnoticed for some languages (e.g. C and CXX) because the
check for a working compiler is skipped if ABI detection works.
It does affect other languages (e.g. CSharp).
Fixes: #22423
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We run a `try_compile` with a tiny test source to check if the compiler
works so that we can fail early if it does not. When the compiler does
work, we immediately `try_compile` the ABI detection source. In the
common case that both steps work, we gain no useful information from the
first one and the work was wasted.
Re-order the checks to try the ABI detection first. If it works then
assume the compiler works and skip the dedicated check. If the ABI
check fails then proceed with the normal test for a working compiler so
the diagnostic can be shown as before.
Fixes: #18703
|
|
|
|
|
|
| |
Filter CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES just after it is
computed. Re-use the same exclusion list for filtering
CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES to avoid duplication.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When crosscompiling we pass the sysroot.
We need to try various architecture flags. Clang doesn't automatically
select one that works. First try the ones that are more likely to work
for modern installations:
* <=sm_50 is deprecated since CUDA 10.2, try sm_52 first for
future compatibility.
* <=sm_20 is removed since CUDA 9.0, try sm_30.
Otherwise fallback to Clang's current default. Currently that's `sm_20`,
the lowest it supports.
Separable compilation isn't supported yet.
Fixes: #16586
|
|
|
|
|
|
|
|
|
|
| |
The special case added by commit 87df637078 (CUDA: Do not treat CUDA
toolkit include directories as implicit, 2020-02-02, v3.17.0-rc1~31^2)
breaks CMake's protections against changing the compiler's implicit
include directory order. Do this only for the NVIDIA compiler where it
is needed as a workaround to another problem. That compiler does not
put the host compiler's implicit include directories in `-I` paths so we
do not detect them as `CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES` anyway.
|
|
|
|
|
|
|
|
|
| |
CMake properly detects the toolkit directories as implicit system
includes, but CUDA compilers don't add explicit `-isystem` markups to
these directories when compiling CUDA code. Due to this limitation,
allow users to explicitly specify these directories as SYSTEM dirs.
Fixes: #16464, #19864
|
|
|
|
|
| |
Fixes #17559
Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
|
| |
|
|
|
|
| |
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
|
|
|
|
| |
Found via `codespell`
|
|
|
|
|
|
| |
When we report that a compiler was unable to build a simple test
program, indent the output of the attempt so that our message formatting
will show it as a pre-formatted block.
|
|
|
|
|
| |
The `nvcc -v` output on Windows uses response files, so load the one we
need to extract the full link line.
|
| |
|
|
|