Remove cmake depends an ancient c++ standard
This commit is contained in:
parent
e54607e5ee
commit
655b3cd0ed
|
@ -29,25 +29,10 @@ else()
|
||||||
link_directories("/usr/lib/${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu/")
|
link_directories("/usr/lib/${CMAKE_HOST_SYSTEM_PROCESSOR}-linux-gnu/")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 11)
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
|
||||||
|
|
||||||
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
set(CMAKE_BUILD_TYPE Debug)
|
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}")
|
message("Build Type: ${CMAKE_BUILD_TYPE}")
|
||||||
|
|
||||||
set (CMAKE_INSTALL_PREFIX /usr)
|
set (CMAKE_INSTALL_PREFIX /usr)
|
||||||
|
|
Loading…
Reference in New Issue