cmake: add the forgotten OpenMP flags and libs.

This commit is contained in:
suter_a 2018-06-09 21:13:58 +02:00
parent fbb38028cb
commit da4f08f231
3 changed files with 31 additions and 3 deletions

View File

@ -80,9 +80,19 @@ target_include_directories(
)
#--- add library dependencies -------------------------------------------------
if (OpenMP_FOUND)
target_compile_options(FitPofB 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))
target_link_libraries(FitPofB
${gomp}
${FFTW3_LIBRARY} ${FFTW3F_LIBRARY} ${ROOT_LIBRARIES}
TLemRunHeader PUserFcnBase BMWtools)
TLemRunHeader PUserFcnBase BMWtools
)
#--- install FitPofB solib ----------------------------------------------------
install(TARGETS FitPofB DESTINATION lib)

View File

@ -46,7 +46,17 @@ target_include_directories(
)
#--- add library dependencies -------------------------------------------------
target_link_libraries(LFRelaxation ${GSL_LIBRARIES} ${FFTW3F_LIBRARY}
if (OpenMP_FOUND)
target_compile_options(LFRelaxation 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))
target_link_libraries(LFRelaxation
${gomp}
${GSL_LIBRARIES} ${FFTW3F_LIBRARY}
${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools
)

View File

@ -46,8 +46,16 @@ 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))
target_link_libraries(ZFRelaxation
${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools
${gomp} ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase cuba BMWtools
)
#--- install ZFRelaxation solib -----------------------------------------------