when using INTEL_LR_THREADS from C++11 we must add the threads library

This commit is contained in:
Axel Kohlmeyer 2021-03-18 20:33:36 -04:00
parent 59c0325f08
commit 1710fb86d3
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,12 @@ if(INTEL_LRT_MODE STREQUAL "THREADS")
endif()
endif()
if(INTEL_LRT_MODE STREQUAL "C++11")
target_compile_definitions(lammps PRIVATE -DLMP_INTEL_USELRT -DLMP_INTEL_LRT11)
if(Threads_FOUND)
target_compile_definitions(lammps PRIVATE -DLMP_INTEL_USELRT -DLMP_INTEL_LRT11)
target_link_libraries(lammps PRIVATE Threads::Threads)
else()
message(FATAL_ERROR "Must have working threads library for Long-range thread support")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")