Pass through debug flag to cryptopp

This commit is contained in:
Sebastian Messmer 2018-07-08 19:58:52 -07:00
parent 30874135a2
commit ddc95903fe
1 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,10 @@ add_library(cryptopp dummy.cpp)
# note: include directory is called vendor_cryptopp instead of cryptopp to avoid include clashes with system headers
target_include_directories(cryptopp SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(cryptopp PUBLIC -DCRYPTOPP_DEBUG)
endif()
if(NOT DISABLE_OPENMP)
if((APPLE AND ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")))
AND ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0") AND (CMAKE_VERSION VERSION_LESS "3.12.0")))
@ -33,4 +37,3 @@ set(BUILD_STATIC ON)
add_subdirectory(vendor_cryptopp EXCLUDE_FROM_ALL)
target_link_libraries(cryptopp PRIVATE cryptopp-static)