diff --git a/CMakeLists.txt b/CMakeLists.txt index 04edf2b..8469635 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ message ("Generating project ${PROJECT_NAME}") if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") + add_definitions(-D_FORTIFY_SOURCE=2) endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/deps/cmake_modules/") @@ -31,7 +32,7 @@ option(BUILD_TOOLS "Build tools?" OFF) set(CMAKE_C_FLAGS "-Wall -ansi -pedantic -Wno-long-long -Wconversion -Wformat=2 -Wshadow -Wcast-qual -Wwrite-strings -fPIC") set(CMAKE_C_FLAGS_DEBUG "-g") -set(CMAKE_C_FLAGS_RELEASE "-O2 -D_FORTIFY_SOURCE=2") +set(CMAKE_C_FLAGS_RELEASE "-O2") set(SQLITE3_LIBRARIES "") if (NOT EMBED_SQLITE) diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 98a6fff..02b5032 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -12,7 +12,7 @@ if (EMBED_SQLITE) list (APPEND DEPS_SOURCES sqlite3.c ) -endif (EMBED_SQLITE) +endif () IF(MSVC) set(CMAKE_C_FLAGS "/Wall")