From 6622a11dc70e1c756827643259eeccea7689e1a6 Mon Sep 17 00:00:00 2001 From: dezhliao Date: Fri, 27 Sep 2024 14:13:17 -0700 Subject: [PATCH] Use -std=c++17 instead of -std=c++11 --- libhsakmt/tests/kfdtest/CMakeLists.txt | 2 +- rocrtst/samples/CMakeLists.txt | 2 +- rocrtst/samples/rocm_async/CMakeLists.txt | 4 ++-- rocrtst/suites/test_common/CMakeLists.txt | 2 +- runtime/cmake_modules/hsa_common.cmake | 2 +- runtime/hsa-ext-finalize/CMakeLists.txt | 2 +- runtime/hsa-ext-image/CMakeLists.txt | 2 +- runtime/hsa-runtime/cmake_modules/hsa_common.cmake | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libhsakmt/tests/kfdtest/CMakeLists.txt b/libhsakmt/tests/kfdtest/CMakeLists.txt index 62a50841a..d956cf4f7 100644 --- a/libhsakmt/tests/kfdtest/CMakeLists.txt +++ b/libhsakmt/tests/kfdtest/CMakeLists.txt @@ -221,7 +221,7 @@ message( STATUS "PROJECT_SOURCE_DIR:" ${PROJECT_SOURCE_DIR} ) # message(STATUS "${file}") #endforeach() -#add_definitions(-Wall -std=c++11) +#add_definitions(-Wall -std=c++17) if ( "${CMAKE_C_COMPILER_VERSION}" STRGREATER "4.8.0") ## Add --enable-new-dtags to generate DT_RUNPATH diff --git a/rocrtst/samples/CMakeLists.txt b/rocrtst/samples/CMakeLists.txt index 607b56129..b0ebf4856 100755 --- a/rocrtst/samples/CMakeLists.txt +++ b/rocrtst/samples/CMakeLists.txt @@ -179,7 +179,7 @@ add_definitions(-DLITTLEENDIAN_CPU=1) # # Linux Compiler options # -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno") diff --git a/rocrtst/samples/rocm_async/CMakeLists.txt b/rocrtst/samples/rocm_async/CMakeLists.txt index 2080b40b0..c92ed23ce 100644 --- a/rocrtst/samples/rocm_async/CMakeLists.txt +++ b/rocrtst/samples/rocm_async/CMakeLists.txt @@ -67,10 +67,10 @@ if("${tmp}" STREQUAL "debug") endif() if(ISDEBUG) - set(CMAKE_CXX_FLAGS "-std=c++11 -O0") + set(CMAKE_CXX_FLAGS "-std=c++17 -O0") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb") else() - set(CMAKE_CXX_FLAGS "-std=c++11 -O2") + set(CMAKE_CXX_FLAGS "-std=c++17 -O2") endif() # diff --git a/rocrtst/suites/test_common/CMakeLists.txt b/rocrtst/suites/test_common/CMakeLists.txt index c0c0fc408..b1d68661a 100755 --- a/rocrtst/suites/test_common/CMakeLists.txt +++ b/rocrtst/suites/test_common/CMakeLists.txt @@ -239,7 +239,7 @@ add_definitions(-DLITTLEENDIAN_CPU=1) # # Linux Compiler options # -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno") diff --git a/runtime/cmake_modules/hsa_common.cmake b/runtime/cmake_modules/hsa_common.cmake index 50e38fc5c..050d33dfc 100644 --- a/runtime/cmake_modules/hsa_common.cmake +++ b/runtime/cmake_modules/hsa_common.cmake @@ -53,7 +53,7 @@ endif() if(UNIX) set(PS ":") - set(CMAKE_CXX_FLAGS "-Wall -std=c++11 ${EXTRA_CFLAGS}") + set(CMAKE_CXX_FLAGS "-Wall -std=c++17 ${EXTRA_CFLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic") if (CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--unresolved-symbols=ignore-in-shared-libs") diff --git a/runtime/hsa-ext-finalize/CMakeLists.txt b/runtime/hsa-ext-finalize/CMakeLists.txt index 6c6dbdcba..36c568dd0 100755 --- a/runtime/hsa-ext-finalize/CMakeLists.txt +++ b/runtime/hsa-ext-finalize/CMakeLists.txt @@ -102,7 +102,7 @@ if( NOT DEFINED OPEN_SOURCE_DIR ) endif() ## ------------------------- Linux Compiler and Linker options ------------------------- -set ( CMAKE_CXX_FLAGS "-std=c++11 " ) +set ( CMAKE_CXX_FLAGS "-std=c++17 " ) set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-deprecated-declarations -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -fPIC" ) diff --git a/runtime/hsa-ext-image/CMakeLists.txt b/runtime/hsa-ext-image/CMakeLists.txt index 6c286e3d0..88fd95587 100644 --- a/runtime/hsa-ext-image/CMakeLists.txt +++ b/runtime/hsa-ext-image/CMakeLists.txt @@ -61,7 +61,7 @@ set( OPEN_SOURCE_DIR ${OPEN_SOURCE_DIR} CACHE PATH "Open source root dir" FORCE set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64") ## ------------------------- Linux Compiler and Linker options ------------------------- -set ( CMAKE_CXX_FLAGS "-std=c++11 " ) +set ( CMAKE_CXX_FLAGS "-std=c++17 " ) set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-deprecated-declarations -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -fPIC" ) diff --git a/runtime/hsa-runtime/cmake_modules/hsa_common.cmake b/runtime/hsa-runtime/cmake_modules/hsa_common.cmake index 04025b8ec..203f9b195 100644 --- a/runtime/hsa-runtime/cmake_modules/hsa_common.cmake +++ b/runtime/hsa-runtime/cmake_modules/hsa_common.cmake @@ -51,7 +51,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(ONLY64STR "64") endif() -set(HSA_COMMON_CXX_FLAGS "-Wall" "-std=c++11") +set(HSA_COMMON_CXX_FLAGS "-Wall" "-std=c++17") set(HSA_COMMON_CXX_FLAGS ${HSA_COMMON_CXX_FLAGS} "-fPIC") if (CMAKE_COMPILER_IS_GNUCXX) set(HSA_COMMON_CXX_FLAGS ${HSA_COMMON_CXX_FLAGS} "-Wl,--unresolved-symbols=ignore-in-shared-libs")