Current cmake minimum version is set to cmake 3.10 in keops/pykeops/CMakeLists.txt. This version allows to define CMAKE_CUDA_STANDARD up to 14 as seen in the cmake documentation.
Using keops with a recent cuda version (>=11.1) leads to keops setting CMAKE_CUDA_STANDARD to 17 which is not supported by old cmake versions (this is done in keops/cuda.cmake). This results in the following cmake error:
CMake Error at CMakeLists.txt:342 (add_library):
CUDA_STANDARD is set to invalid value '17'
and other errors result of the C++17 flags not being passed to nvcc:
pykeops/keops/core/formulas/maths/TensorDotNoTao.h(84): error: "auto" is not allowed here
pykeops/keops/core/formulas/maths/TensorDotNoTao.h(90): error: "auto" is not allowed here
In the end the build fails and keops fails with recipe for target 'libKeOpstorch...' failed.
Support for CMAKE_CUDA_STANDARD 17 and 20 have only been introduced recently in cmake 3.18.
A simple fix would be to crash early by requiring a cmake version of a least 3.18 when cuda >=11.1 is detected (and maybe keep current cmake 3.10 for earlier cuda versions).
Current cmake minimum version is set to cmake 3.10 in
keops/pykeops/CMakeLists.txt
. This version allows to defineCMAKE_CUDA_STANDARD
up to 14 as seen in the cmake documentation.Using keops with a recent cuda version (>=11.1) leads to keops setting
CMAKE_CUDA_STANDARD
to 17 which is not supported by old cmake versions (this is done inkeops/cuda.cmake
). This results in the following cmake error:and other errors result of the C++17 flags not being passed to nvcc:
In the end the build fails and keops fails with
recipe for target 'libKeOpstorch...' failed
.Support for
CMAKE_CUDA_STANDARD
17 and 20 have only been introduced recently in cmake 3.18. A simple fix would be to crash early by requiring a cmake version of a least 3.18 when cuda >=11.1 is detected (and maybe keep current cmake 3.10 for earlier cuda versions).