More CMakeLists.txt additions.

Former-commit-id: a013013072fc854abcc7e5cc8366e1979ce4d3ba
This commit is contained in:
Marek Nečada 2019-03-20 14:13:41 +02:00
parent 522a6d9b85
commit 959bb09526
3 changed files with 27 additions and 1 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.0.2)
include(CMakeAddFortranSubdirectory)
project (QPMS)

View File

@ -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

View File

@ -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})