diff options
author | Brad King <brad.king@kitware.com> | 2020-06-05 14:04:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-05 14:09:33 (GMT) |
commit | 5bf9a290e74d14de7f0dc56bf31e273d7a02e282 (patch) | |
tree | f10aa3e1bfd9e49de8ecc120c3d1a2741c6867e9 /Help/guide/tutorial/Step11/MathFunctions/MathFunctions.h | |
parent | 7934352e44db7a7afeb4fdd07939ec8394a91a6b (diff) | |
download | CMake-5bf9a290e74d14de7f0dc56bf31e273d7a02e282.zip CMake-5bf9a290e74d14de7f0dc56bf31e273d7a02e282.tar.gz CMake-5bf9a290e74d14de7f0dc56bf31e273d7a02e282.tar.bz2 |
CUDA: Fix CUDA_ARCHITECTURES policy CMP0104 check in try_compile
Since commit e98588aaba (CUDA: Add CUDA_ARCHITECTURES target property,
2020-03-12), `CMAKE_CUDA_ARCHITECTURES` is both initialized and required
by policy CMP0104's `NEW` behavior. Inside a `try_compile` project we
use `cmake_minimum_required(VERSION ...)` with the current running
version of CMake. Now that our version number is 3.18, `CMP0104` gets
set to `NEW` in the `try_compile`. If the outer projects does not set
the policy then `CMAKE_CUDA_ARCHITECTURES` is not available and the
`try_compile` fails to generate.
Teach `try_compile` to check the outer project's policy status and
set policy CMP0104 to `OLD` if needed to match.
Fixes: #20794
Diffstat (limited to 'Help/guide/tutorial/Step11/MathFunctions/MathFunctions.h')
0 files changed, 0 insertions, 0 deletions