diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-10-11 18:16:10 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-10-11 18:16:10 +0200 |
commit | 91f88b15f011abe85c85893d1fe50de6c8e4189d (patch) | |
tree | 40c5819c29bd7ec047819c5d7eac0acb68be1ada /CMakeLists.txt | |
parent | d9adae46dae6e2176e8765368d2902cc24da688b (diff) | |
parent | 1a446933032beca0b1c5764acf23940ceb7a43ab (diff) | |
download | libnitrokey-91f88b15f011abe85c85893d1fe50de6c8e4189d.tar.gz libnitrokey-91f88b15f011abe85c85893d1fe50de6c8e4189d.tar.bz2 |
Merge branch 'general-fixes'v3.1
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 643e630..8259f67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,12 @@ OPTION(LIBNITROKEY_STATIC "Build libnitrokey statically" FALSE) IF (NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE RelWithDebInfo) + IF(APPLE) + # Issues occur when build with enabled optimizations + set(CMAKE_BUILD_TYPE Debug) + ELSE() + set(CMAKE_BUILD_TYPE RelWithDebInfo) + ENDIF() ENDIF() MESSAGE("${PROJECT_NAME}: Build type: ${CMAKE_BUILD_TYPE}") @@ -118,6 +123,11 @@ IF (NO_LOG) SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES COMPILE_DEFINITIONS "NO_LOG") ENDIF() +OPTION(LOG_VOLATILE_DATA "Log volatile data (debug)" OFF) +IF (LOG_VOLATILE_DATA) + SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES COMPILE_DEFINITIONS "LOG_VOLATILE_DATA") +ENDIF() + file(GLOB LIB_INCLUDES "include/*.h") install (FILES ${LIB_INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libnitrokey) |