From 7fa0ab2f0d964286384af9dcad2b07cb5958ea09 Mon Sep 17 00:00:00 2001 From: Kyle Gerheiser <3209794+kgerheiser@users.noreply.github.com> Date: Thu, 19 Nov 2020 14:39:37 -0500 Subject: [PATCH] Check OpenMP_C_FOUND instead of OpenMP_FOUND OpenMP_FOUND can be true if the Fortran OpenMP library was found. Specifically check if OpenMP_C_FOUND instead. --- wgrib2/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgrib2/CMakeLists.txt b/wgrib2/CMakeLists.txt index 45e913e6..664ddd61 100644 --- a/wgrib2/CMakeLists.txt +++ b/wgrib2/CMakeLists.txt @@ -46,7 +46,7 @@ if(USE_PNG) target_link_libraries(obj_lib PUBLIC PNG::PNG) endif() -if(OpenMP_FOUND) +if(OpenMP_C_FOUND) target_link_libraries(obj_lib PUBLIC OpenMP::OpenMP_C) endif()