1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 00:45:36 +00:00

cmake fix for threading

This commit is contained in:
Antonin Portelli 2024-02-10 19:12:59 +01:00
parent c93cdf5c5a
commit e8b0565164
2 changed files with 3 additions and 1 deletions

View File

@ -55,6 +55,7 @@ file(CREATE_LINK ${eigen3_SOURCE_DIR}/Eigen
${CMAKE_SOURCE_DIR}/lib/LatAnalyze/Eigen SYMBOLIC) ${CMAKE_SOURCE_DIR}/lib/LatAnalyze/Eigen SYMBOLIC)
# dependencies # dependencies
find_package(Threads REQUIRED)
find_package(GSL REQUIRED) find_package(GSL REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C CXX) find_package(HDF5 REQUIRED COMPONENTS C CXX)
find_package(Minuit2 QUIET) find_package(Minuit2 QUIET)

View File

@ -61,7 +61,8 @@ target_sources(
${EIGEN_HEADERS} ${EIGEN_HEADERS}
${LATAN_HEADERS}) ${LATAN_HEADERS})
target_link_libraries(LatAnalyze PRIVATE compiler_flags parsers tinyxml2) target_link_libraries(LatAnalyze PRIVATE compiler_flags parsers tinyxml2)
target_link_libraries(LatAnalyze PUBLIC GSL::gsl hdf5::hdf5 hdf5::hdf5_cpp) target_link_libraries(LatAnalyze PUBLIC GSL::gsl hdf5::hdf5 hdf5::hdf5_cpp
${CMAKE_THREAD_LIBS_INIT})
if(Minuit2_FOUND) if(Minuit2_FOUND)
target_link_libraries(LatAnalyze PUBLIC Minuit2::Minuit2) target_link_libraries(LatAnalyze PUBLIC Minuit2::Minuit2)
endif() endif()