From b55c8d68a56b9c8b2747318a2415ad90cfde4b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Tue, 4 Oct 2016 19:50:38 +0200 Subject: [PATCH] Add more compiler flags that was used with scons --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ee71dd..fad2c0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,9 @@ set(libucore_VERSION ${libucore_VERSION_MAJOR}.${libucore_VERSION_MINOR}.${libuc set(CMAKE_VERBOSE_MAKEFILE ON) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pthread") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wundef -Wcast-qual -Wshadow -Wcast-align -pipe -Wno-unused-parameter -Werror=implicit-function-declaration -Winit-self -pthread") +add_definitions(-D_FILE_OFFSET_BITS=64) +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -O2 -pthread") option(CODE_COVERAGE "build with code coverage intrumentation" OFF) @@ -21,7 +23,7 @@ if (CODE_COVERAGE) endif() option(BUILD_DEBUG "build debug binaries" ON) -if (BUILD_ENVOY_DEBUG) +if (BUILD_DEBUG) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0") add_definitions(-DDEBUG) else()