From c93b1811a438a3eaa6634ac60b5d73468d128e12 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:16:03 -0700 Subject: [PATCH 1/3] updating link to aec library --- wgrib2/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgrib2/CMakeLists.txt b/wgrib2/CMakeLists.txt index 6308b6c2..a36e8e64 100644 --- a/wgrib2/CMakeLists.txt +++ b/wgrib2/CMakeLists.txt @@ -116,7 +116,7 @@ target_link_libraries(obj_lib PUBLIC gctpc -lm) target_link_libraries(wgrib2_exe PRIVATE gctpc) if(USE_AEC) - target_link_libraries(wgrib2_exe PRIVATE aec) + target_link_libraries(wgrib2_exe PRIVATE ${LIBAEC_LIBRARIES}) endif() if(USE_JASPER) From f895964050cc2949fc2ac82367f9e10ad8069758 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:24:35 -0700 Subject: [PATCH 2/3] removing OpenMP_CXX_FOUND --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da99120f..2b71bc33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,12 +115,6 @@ endif() message(STATUS "Checking if the user want to use OpenMP...") if(USE_OPENMP) find_package(OpenMP) - if(OpenMP_CXX_FOUND) - target_link_libraries(MyTarget PUBLIC OpenMP::OpenMP_CXX) - endif() -# if(OpenMP_Fortran_FOUND) -# target_link_libraries(MyTarget PUBLIC OpenMP::OpenMP_Fortran) -# endif() endif() message(STATUS "Checking if the user wants to use PNG...") From e15326247abe670f875aba6f90933a4d2dc53825 Mon Sep 17 00:00:00 2001 From: AlysonStahl-NOAA <166434581+AlysonStahl-NOAA@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:30:34 -0700 Subject: [PATCH 3/3] making sure OpenMP_C is found --- CMakeLists.txt | 2 +- wgrib2/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b71bc33..ac62e561 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ endif() message(STATUS "Checking if the user want to use OpenMP...") if(USE_OPENMP) - find_package(OpenMP) + find_package(OpenMP REQUIRED COMPONENTS C) endif() message(STATUS "Checking if the user wants to use PNG...") diff --git a/wgrib2/CMakeLists.txt b/wgrib2/CMakeLists.txt index 6308b6c2..5a222a9c 100644 --- a/wgrib2/CMakeLists.txt +++ b/wgrib2/CMakeLists.txt @@ -92,7 +92,7 @@ if(USE_PNG) target_link_libraries(obj_lib PUBLIC PNG::PNG) endif() -if(OpenMP_C_FOUND) +if(USE_OPENMP) target_link_libraries(obj_lib PUBLIC OpenMP::OpenMP_C) endif()