mirror of
https://github.com/adulau/ssldump.git
synced 2024-12-22 07:55:57 +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
|
||||
)
|
||||
|
||||
######## 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(GNUInstallDirs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue