diff options
author | Raul Tambre <raul@tambre.ee> | 2020-03-12 11:31:47 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-04-15 14:55:41 (GMT) |
commit | e98588aabad578a9b33aae05e77f6ec5b3ff2e46 (patch) | |
tree | 34c2ee6ab9b11721b5287a6a9a2b01afb04a5943 /Source/cmPolicies.h | |
parent | 71a06093795efc55c4ef3575b5c4177d38894870 (diff) | |
download | CMake-e98588aabad578a9b33aae05e77f6ec5b3ff2e46.zip CMake-e98588aabad578a9b33aae05e77f6ec5b3ff2e46.tar.gz CMake-e98588aabad578a9b33aae05e77f6ec5b3ff2e46.tar.bz2 |
CUDA: Add CUDA_ARCHITECTURES target property
Simplifies CUDA target architecture handling.
Required for Clang support as Clang doesn't automatically select a supported architecture.
We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it.
Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC.
Implements #17963.
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r-- | Source/cmPolicies.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index d3daad8..0eb42bf 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -308,6 +308,10 @@ class cmMakefile; 3, 17, 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0103, \ "multiple export() with same FILE without APPEND is not allowed.", \ + 3, 18, 0, cmPolicies::WARN) \ + SELECT(POLICY, CMP0104, \ + "CMAKE_CUDA_ARCHITECTURES now detected for NVCC, empty " \ + "CUDA_ARCHITECTURES not allowed.", \ 3, 18, 0, cmPolicies::WARN) #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1) @@ -338,7 +342,8 @@ class cmMakefile; F(CMP0081) \ F(CMP0083) \ F(CMP0095) \ - F(CMP0099) + F(CMP0099) \ + F(CMP0104) /** \class cmPolicies * \brief Handles changes in CMake behavior and policies |