From be35dacf2910daf47fa560f4488239da86e3f8ca Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Fri, 4 Sep 2020 13:36:33 -0400 Subject: [PATCH] Use find_package in NCEP_sp --- NCEP_sp/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/NCEP_sp/CMakeLists.txt b/NCEP_sp/CMakeLists.txt index 0daa7aa..20b3a36 100644 --- a/NCEP_sp/CMakeLists.txt +++ b/NCEP_sp/CMakeLists.txt @@ -18,10 +18,16 @@ set (CMAKE_Fortran_FLAGS_RELEASE "-O2 ${GEOS_Fortran_Release_FPE_Flags} ${EXTEND esma_add_library (${this} SRCS ${srcs} DEPENDENCIES NCEP_w3_${precision}) +if (APPLE) + set(MKL_Fortran TRUE) +endif () +find_package(MKL) if (MKL_FOUND) - target_link_libraries(${this} PUBLIC ${MKL_LIBRARIES}) + set(BLA_VENDOR Intel10_64lp_seq) + target_link_libraries(${this} PRIVATE ${MKL_LIBRARIES}) else () - target_link_libraries(${this} PUBLIC ${LAPACK_LIBRARIES}) + find_package(LAPACK REQUIRED) + target_link_libraries(${this} PRIVATE ${LAPACK_LIBRARIES}) endif () if (precision MATCHES "r4i4")