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

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")