mirror of
https://github.com/adulau/ssldump.git
synced 2024-12-03 14:57:13 +00:00
Add compilation options to CMakeLists.txt
This commit is contained in:
parent
6c1aa99da8
commit
cec86cfc7d
1 changed files with 16 additions and 0 deletions
|
@ -7,6 +7,22 @@ project(
|
|||
LANGUAGES C
|
||||
)
|
||||
|
||||
######## User defined options
|
||||
option(DEBUG_BUILD "Build with debug facilities" OFF)
|
||||
option(DISABLE_OPTIMIZATION "Build without compiler optimizations" OFF)
|
||||
################
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
|
||||
if(DEBUG_BUILD)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb3 -DDEBUG")
|
||||
endif()
|
||||
|
||||
if(DISABLE_OPTIMIZATION)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
endif()
|
||||
|
||||
include(CheckSymbolExists)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue