AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
536 stars 343 forks source link

CMake: Update CUDA Logic to 3.24+ #3948

Open ax3l opened 4 months ago

ax3l commented 4 months ago

In CMake 3.24, the native flag was introduced for CUDA_ARCHITECTURES, which is what we currently do in our old logic. https://cmake.org/cmake/help/latest/prop_tgt/CUDA_ARCHITECTURES.html

Transitioning is now possible (CMake is at 3.29) and we can then drop cmake_policy(SET CMP0104 OLD) that we used for the transition period. https://github.com/AMReX-Codes/amrex/blob/24.05/CMakeLists.txt#L19-L27