From f9ef443aae8b577e76ee76076351fab70fc18139 Mon Sep 17 00:00:00 2001 From: nychiang Date: Thu, 23 Jan 2025 17:33:21 -0800 Subject: [PATCH] create branch --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0422167..99c3af69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required (VERSION 3.18) -set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -lstdc++fs ") + set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_CUDA_SEPARABLE_COMPILATION ON) @@ -127,7 +129,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) target_compile_features(hiop_options INTERFACE - cxx_std_14 + cxx_std_17 cxx_alignas cxx_alignof cxx_attributes @@ -237,8 +239,9 @@ if(HIOP_USE_GPU) check_language(CUDA) if(NOT DEFINED CMAKE_CUDA_STANDARD) - set(CMAKE_CUDA_STANDARD 14) + set(CMAKE_CUDA_STANDARD 17) set(CMAKE_CUDA_STANDARD_REQUIRED ON) + set(CUDA_NVCC_FLAGS "-std=c++17") endif() if(NOT CMAKE_CUDA_ARCHITECTURES)