set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
- endif()
-
- #---- Include boost to add coroutines ----
- find_package(Boost COMPONENTS coroutine QUIET)
-
- if(Boost_FOUND)
- string(REPLACE "." "0" Boost_VERSION_NODOT ${Boost_VERSION})
- if(NOT Boost_VERSION_NODOT VERSION_LESS 105900)
- message(STATUS "Found boost::coroutine2.")
- add_definitions(-DBT_BOOST_COROUTINE2)
- set(BT_COROUTINES true)
- elseif(NOT Boost_VERSION_NODOT VERSION_LESS 105300)
- message(STATUS "Found boost::coroutine.")
- add_definitions(-DBT_BOOST_COROUTINE)
- set(BT_COROUTINES true)
- endif()
- include_directories(${Boost_INCLUDE_DIRS})
- endif()
-
-
- if(NOT DEFINED BT_COROUTINES)
- message(STATUS "Coroutines disabled. Install Boost to enable them (version 1.59+ recommended).")
- add_definitions(-DBT_NO_COROUTINES)
+ else()
+ add_definitions(-Wpedantic)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)