ECC-1268: eccodes_f90 library should link to threading library (pthreads/omp)

This commit is contained in:
Shahram Najm 2021-07-29 12:21:48 +01:00
parent b70198151d
commit 77490a8dc5
2 changed files with 2 additions and 1 deletions

View File

@ -274,6 +274,7 @@ if( HAVE_ECCODES_THREADS )
ecbuild_critical("Pthreads is not supported on your system: thread library found=[${CMAKE_THREAD_LIBS_INIT}]")
endif()
set( GRIB_PTHREADS 1 )
set( THREADS_LIBRARIES Threads::Threads )
if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
set( GRIB_LINUX_PTHREADS 1 )
endif()

View File

@ -49,7 +49,7 @@ if( HAVE_FORTRAN )
GENERATED grib_f90.f90 eccodes_f90.f90
PUBLIC_INCLUDES $<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}>
$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>
PRIVATE_LIBS eccodes )
PRIVATE_LIBS eccodes ${THREADS_LIBRARIES} )
if( DEFINED ecbuild_VERSION AND NOT ${ecbuild_VERSION} VERSION_LESS 3.1 )
# Installed module directory is not in the PUBLIC INCLUDES!