diff --git a/src/external/libZFRelaxation/CMakeLists.txt b/src/external/libZFRelaxation/CMakeLists.txt index c7b9f15f..71a7c301 100644 --- a/src/external/libZFRelaxation/CMakeLists.txt +++ b/src/external/libZFRelaxation/CMakeLists.txt @@ -53,14 +53,10 @@ target_include_directories( ) #--- add library dependencies ------------------------------------------------- -if (OpenMP_FOUND) - target_compile_options(ZFRelaxation PUBLIC ${OpenMP_CXX_FLAGS}) -endif (OpenMP_FOUND) - set(gomp "") -if (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux)) - set(gomp gomp) -endif (OpenMP_FOUND AND (${CMAKE_HOST_SYSTEM_NAME} STREQUAL Linux)) +if (OpenMP_FOUND) + set(gomp OpenMP::OpenMP_CXX) +endif (OpenMP_FOUND) target_link_libraries(ZFRelaxation ${gomp} FFTW3::FFTW3 ${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools )