From 6481881bb053fa73bc40a8f3da9db054c80816fa Mon Sep 17 00:00:00 2001 From: Gonzalo Brito Gadeschi Date: Tue, 27 Feb 2024 04:28:21 -0800 Subject: [PATCH] [CUDA] Update CMake file for CUDA C++17 support --- src/cuda/model.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cuda/model.cmake b/src/cuda/model.cmake index ec96a194..58d15ef3 100644 --- a/src/cuda/model.cmake +++ b/src/cuda/model.cmake @@ -22,7 +22,12 @@ register_flag_optional(CUDA_EXTRA_FLAGS macro(setup) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CUDA_STANDARD 17) + if(NOT DEFINED CMAKE_CUDA17_STANDARD_COMPILE_OPTION) + set(CMAKE_CUDA17_STANDARD_COMPILE_OPTION "") + set(CMAKE_CUDA17_EXTENSION_COMPILE_OPTION "") + endif() # XXX CMake 3.18 supports CMAKE_CUDA_ARCHITECTURES/CUDA_ARCHITECTURES but we support older CMakes if(POLICY CMP0104)