Fix OpenMP for old CMake on Linux
This commit is contained in:
parent
a10dd04dea
commit
3c10e095d8
5
vendor/cryptopp/CMakeLists.txt
vendored
5
vendor/cryptopp/CMakeLists.txt
vendored
@ -17,7 +17,12 @@ if(NOT DISABLE_OPENMP)
|
||||
target_link_libraries(cryptopp PRIVATE -lomp)
|
||||
else()
|
||||
find_package(OpenMP)
|
||||
if (NOT OpenMP_CXX_LIBRARIES)
|
||||
# Older CMake didn't have OpenMP_CXX_LIBRARIES defined yet, but passed the library in OpenMP_CXX_FLAGS
|
||||
set(OpenMP_CXX_LIBRARIES ${OpenMP_CXX_FLAGS})
|
||||
endif()
|
||||
if(OPENMP_FOUND)
|
||||
message(STATUS "Using OpenMP flags: ${OpenMP_CXX_FLAGS}")
|
||||
message(STATUS "Using OpenMP library: ${OpenMP_CXX_LIBRARIES}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
target_link_libraries(cryptopp PRIVATE ${OpenMP_CXX_LIBRARIES})
|
||||
|
Loading…
Reference in New Issue
Block a user