diff --git a/CMakeLists.txt b/CMakeLists.txt index a6aec091..0da36a67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ -cmake_minimum_required(VERSION 3.0) -project(torchscatter) -set(CMAKE_CXX_STANDARD 14) +cmake_minimum_required(VERSION 3.18) +project(torchscatter LANGUAGES CXX CUDA) +set(CMAKE_CXX_STANDARD 17) set(TORCHSCATTER_VERSION 2.1.2) option(WITH_CUDA "Enable CUDA support" OFF) @@ -11,6 +11,8 @@ if(WITH_CUDA) add_definitions(-D__CUDA_NO_HALF_OPERATORS__) add_definitions(-DWITH_CUDA) set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr") + set(CMAKE_CUDA_STANDARD 17) + set(CMAKE_CUDA_STANDARD_REQUIRED ON) endif() if (WITH_PYTHON)