diff --git a/pdaf_base/src/CMakeLists.txt b/pdaf_base/src/CMakeLists.txt index be480d6..e922675 100644 --- a/pdaf_base/src/CMakeLists.txt +++ b/pdaf_base/src/CMakeLists.txt @@ -1,5 +1,9 @@ file(GLOB PDAF_BASE_SOURCES *.F90) +find_package(LAPACK REQUIRED) +find_package(BLAS REQUIRED) + add_library(PDAF_base STATIC ${PDAF_BASE_SOURCES}) target_include_directories(PDAF_base PRIVATE dummympi) +target_link_libraries(PDAF_base PRIVATE ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) target_compile_options(PDAF_base PRIVATE "-fdefault-real-8") diff --git a/pdaf_user/CMakeLists.txt b/pdaf_user/CMakeLists.txt index c12d444..4908941 100644 --- a/pdaf_user/CMakeLists.txt +++ b/pdaf_user/CMakeLists.txt @@ -1,8 +1,15 @@ file(GLOB PDAF_USER_SOURCES *.F90) +set(CMAKE_Fortran_COMPILER "mpifort") + +find_package(MPI REQUIRED) +find_package(LAPACK REQUIRED) +find_package(BLAS REQUIRED) + add_library(pdaf ${PDAF_USER_SOURCES}) target_include_directories(pdaf PRIVATE dummympi) target_link_libraries(pdaf PRIVATE PDAF_base) +target_link_libraries(pdaf PRIVATE ${MPI_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) if(APPLE AND BUILD_SHARED_LIBS) target_link_libraries(pdaf PUBLIC "-framework Accelerate")