From 0c69cc9658413defe0f87c1035368e82322a7b7e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 29 Jul 2021 15:31:38 +0100 Subject: [PATCH] ECC-1268: Second try --- CMakeLists.txt | 2 +- fortran/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f22856c09..c4265cfaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,7 +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 ) + set( ECCODES_PTHREADS_LIBRARIES Threads::Threads ) # ECC-1268 if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" ) set( GRIB_LINUX_PTHREADS 1 ) endif() diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index bb4cc1194..650296c06 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -49,8 +49,7 @@ if( HAVE_FORTRAN ) GENERATED grib_f90.f90 eccodes_f90.f90 PUBLIC_INCLUDES $ $ - PRIVATE_LIBS eccodes ) - # PRIVATE_LIBS eccodes ${THREADS_LIBRARIES} ) + PRIVATE_LIBS eccodes ${ECCODES_PTHREADS_LIBRARIES} ) if( DEFINED ecbuild_VERSION AND NOT ${ecbuild_VERSION} VERSION_LESS 3.1 ) # Installed module directory is not in the PUBLIC INCLUDES!