make sure that OpenMP is used if present.

This commit is contained in:
2018-05-04 21:37:46 +02:00
parent 13242bd5d0
commit e05aee0ce9
2 changed files with 8 additions and 1 deletions

View File

@ -43,7 +43,10 @@ find_package(FFTW3 REQUIRED)
find_package(LibXml2 REQUIRED) find_package(LibXml2 REQUIRED)
#--- check for OpenMP --------------------------------------------------------- #--- check for OpenMP ---------------------------------------------------------
find_package(OpenMP REQUIRED) find_package(OpenMP)
if (OpenMP_FOUND)
add_definitions(-DHAVE_GOMP)
endif (OpenMP_FOUND)
#--- check for Qt ------------------------------------------------------------- #--- check for Qt -------------------------------------------------------------
if (qt_based_tools) if (qt_based_tools)

View File

@ -95,6 +95,10 @@ if (nexus)
set(DependOnLibs ${DependOnLibs} ${LIBNEXUS_LIBRARY}) set(DependOnLibs ${DependOnLibs} ${LIBNEXUS_LIBRARY})
set(DependOnLibs ${DependOnLibs} PNeXus) set(DependOnLibs ${DependOnLibs} PNeXus)
endif (nexus) endif (nexus)
message("debug> OpenMP_FOUND: ${OpenMP_FOUND}, libs: ${OpenMP_CXX_LIBRARIES}")
if (OpenMP_FOUND)
set(DependOnLibs ${DependOnLibs} ${OpenMP_CXX_LIBRARIES})
endif (OpenMP_FOUND)
target_link_libraries(PUserFcnBase ${ROOT_LIBRARIES}) target_link_libraries(PUserFcnBase ${ROOT_LIBRARIES})
target_link_libraries(PMusr ${DependOnLibs}) target_link_libraries(PMusr ${DependOnLibs})