Skip to content

Commit

Permalink
Added PDAF dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
LSchueler committed Jun 6, 2019
1 parent 9f71cae commit 332f192
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pdaf_base/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
7 changes: 7 additions & 0 deletions pdaf_user/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
file(GLOB PDAF_USER_SOURCES *.F90)

set(CMAKE_Fortran_COMPILER "mpifort")

This comment has been minimized.

Copy link
@bilke

bilke Jun 6, 2019

Member

Do not set this variable. The user has to set this via env variable on first CMake run (or it is already by the a loaded module etc.):

FC=mpifort cmake ...

This comment has been minimized.

Copy link
@LSchueler

LSchueler Jun 6, 2019

Author Member

OK, thanks for the info. I'll put that into the documentation then.


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")
Expand Down

0 comments on commit 332f192

Please sign in to comment.