Skip to content

Commit

Permalink
Use C++17
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Oct 9, 2023
1 parent 697255c commit 60a229e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ endif()

# ========= Settings for CUB begin =========
# the following settings are modified from cub/CMakeLists.txt
set(CMAKE_CXX_STANDARD 14 CACHE STRING "The C++ version to be used.")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)

message(STATUS "C++ Standard version: ${CMAKE_CXX_STANDARD}")
Expand Down
4 changes: 4 additions & 0 deletions cmake/torch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ execute_process(

message(STATUS "PyTorch version: ${TORCH_VERSION}")

if(TORCH_VERSION VERSION_GREATER_EQUAL "2.1")
set(CMAKE_CXX_STANDARD 17)
endif()

if(K2_WITH_CUDA)

execute_process(
Expand Down

0 comments on commit 60a229e

Please sign in to comment.