Remove cmake depends an ancient c++ standard

This commit is contained in:
xibowen 2023-12-19 16:46:54 +08:00 committed by shaozhimin
parent e54607e5ee
commit 655b3cd0ed
1 changed files with 0 additions and 15 deletions

View File

@ -29,25 +29,10 @@ else()
link_directories("/usr/lib/${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu/")
endif()
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_TYPE Debug)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
add_definitions(-DRELEASE_BUILD)
set(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall")
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall")
else (CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
message("CMake Build Type: ${CMAKE_BUILD_TYPE}")
set(CMAKE_C_FLAGS "$ENV{CFLAGS} -g -O0 -Wall")
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -g -O0 -Wall")
endif()
message("Build Type: ${CMAKE_BUILD_TYPE}")
set (CMAKE_INSTALL_PREFIX /usr)