diff --git a/CMakeLists.txt b/CMakeLists.txt index ef38d1f7c..cd595ef7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,14 +6,14 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS on) set(CMAKE_INCLUDE_CURRENT_DIR ON) if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") endif() # 加速编译优化参数 diff --git a/tests/libdmusic-test/CMakeLists.txt b/tests/libdmusic-test/CMakeLists.txt index 4bc197a06..347e04b76 100644 --- a/tests/libdmusic-test/CMakeLists.txt +++ b/tests/libdmusic-test/CMakeLists.txt @@ -17,7 +17,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") endif() set(CMAKE_EXPORT_COMPILE_COMMANDS on)