Skip to content

Commit

Permalink
Fixing fortify sources
Browse files Browse the repository at this point in the history
  • Loading branch information
navaneeth committed Apr 12, 2015
1 parent 6dc29ec commit 34138a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (EMBED_SQLITE)
list (APPEND DEPS_SOURCES
sqlite3.c
)
endif (EMBED_SQLITE)
endif ()

IF(MSVC)
set(CMAKE_C_FLAGS "/Wall")
Expand Down

0 comments on commit 34138a0

Please sign in to comment.