diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f325eb..502b77b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.0.2) include(CMakeAddFortranSubdirectory) project (QPMS) diff --git a/amos/CMakeLists.txt b/amos/CMakeLists.txt index 3dd5c56..d3717dc 100644 --- a/amos/CMakeLists.txt +++ b/amos/CMakeLists.txt @@ -1,4 +1,12 @@ enable_language (Fortran) +include(FortranCInterface) + +FortranCInterface_HEADER(amos.h + MACRO_NAMESPACE "AMOS_" + SYMBOL_NAMESPACE "amos_" + SYMBOLS zbesj zbesy zbesi zbesk zsqrt + ) + add_library(amos dgamln.f zabs.f zasyi.f zbinu.f zdiv.f zmlri.f zshch.f zunhj.f zunk1.f d1mach.f zacai.f zbesh.f zbknu.f zexp.f zmlt.f zsqrt.f zunik.f zunk2.f diff --git a/qpms/CMakeLists.txt b/qpms/CMakeLists.txt index b06aa55..b4c53c2 100644 --- a/qpms/CMakeLists.txt +++ b/qpms/CMakeLists.txt @@ -1,4 +1,22 @@ +#packages +find_package(GSL 2.0 REQUIRED) +find_package(BLAS REQUIRED) +find_package(LAPACK REQUIRED) + +#includes +set (DIRS ${GSL_INCLUDE_DIRS} ${GSLCBLAS_INCLUDE_DIRS}) +include_directories(${DIRS}) + add_library (qpms translations.c tmatrices.c vecprint.c vswf.c wigner.c lattices2d.c gaunt.c error.c legendre.c symmetries.c vecprint.c) use_c99() + +set(LIBS ${LIBS} ${GSL_LIBRARIES} ${GSLCBLAS_LIBRARIES}) + +target_link_libraries (qpms + gsl + lapack + blas + amos + ) target_include_directories (qpms PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})