Build cryptopp with OpenMP
This commit is contained in:
parent
fede748ff4
commit
9c98c5d788
17
vendor/cryptopp/CMakeLists.txt
vendored
17
vendor/cryptopp/CMakeLists.txt
vendored
@ -1,12 +1,23 @@
|
||||
project(mycryptopp)
|
||||
|
||||
add_library(cryptopp dummy.cpp)
|
||||
target_include_directories(cryptopp SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
find_package(OpenMP)
|
||||
if(OPENMP_FOUND)
|
||||
message(STATUS "Building crypto++ with OpenMP")
|
||||
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS})
|
||||
target_link_libraries(cryptopp PRIVATE ${OpenMP_CXX_FLAGS})
|
||||
else(OPENMP_FOUND)
|
||||
message(WARN "Did not find OpenMP. Performance might be degraded.")
|
||||
endif(OPENMP_FOUND)
|
||||
|
||||
|
||||
set(BUILD_TESTING OFF)
|
||||
set(BUILD_DOCUMENTATION OFF)
|
||||
set(BUILD_SHARED OFF)
|
||||
set(BUILD_STATIC ON)
|
||||
add_subdirectory(cryptopp EXCLUDE_FROM_ALL)
|
||||
|
||||
|
||||
add_library(cryptopp dummy.cpp)
|
||||
target_link_libraries(cryptopp PRIVATE cryptopp-static)
|
||||
target_include_directories(cryptopp SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user