mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-07 12:06:27 +00:00
Merge pull request #91 from wllm-rbnt/dbg
Implement compilation options
This commit is contained in:
commit
fe8ff451cc
1 changed files with 17 additions and 0 deletions
|
@ -7,6 +7,23 @@ project(
|
||||||
LANGUAGES C
|
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)
|
||||||
|
add_definitions(-DDEBUG)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb3")
|
||||||
|
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(CheckSymbolExists)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue