2019-03-20 14:13:41 +02:00
|
|
|
#packages
|
|
|
|
find_package(GSL 2.0 REQUIRED)
|
|
|
|
find_package(BLAS REQUIRED)
|
|
|
|
find_package(LAPACK REQUIRED)
|
2020-03-12 21:09:20 +02:00
|
|
|
find_package(ZBESSEL REQUIRED)
|
2019-03-20 14:13:41 +02:00
|
|
|
|
2020-01-06 17:01:40 +02:00
|
|
|
# disable an annoying warning that gives false positives probably due to a bug in gcc
|
|
|
|
# and other not very relevant warnings
|
|
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-int-in-bool-context -Wno-comment")
|
2019-04-03 16:41:10 +03:00
|
|
|
|
2019-03-20 14:13:41 +02:00
|
|
|
#includes
|
|
|
|
set (DIRS ${GSL_INCLUDE_DIRS} ${GSLCBLAS_INCLUDE_DIRS})
|
|
|
|
include_directories(${DIRS})
|
|
|
|
|
2019-08-12 16:33:54 +03:00
|
|
|
add_library (qpms SHARED translations.c tmatrices.c vecprint.c vswf.c wigner.c ewald.c
|
2019-08-10 08:08:16 +03:00
|
|
|
ewaldsf.c pointgroups.c latticegens.c
|
2019-03-20 20:46:47 +02:00
|
|
|
lattices2d.c gaunt.c error.c legendre.c symmetries.c vecprint.c
|
2019-08-25 18:58:05 +03:00
|
|
|
bessel.c own_zgemm.c parsing.c scatsystem.c materials.c drudeparam_data.c
|
2020-03-06 14:27:59 +02:00
|
|
|
lll.c beyn.c trivialgroup.c
|
2019-08-25 18:58:05 +03:00
|
|
|
)
|
2019-03-19 16:33:44 +02:00
|
|
|
use_c99()
|
2019-03-20 14:13:41 +02:00
|
|
|
|
|
|
|
set(LIBS ${LIBS} ${GSL_LIBRARIES} ${GSLCBLAS_LIBRARIES})
|
|
|
|
|
|
|
|
target_link_libraries (qpms
|
|
|
|
gsl
|
|
|
|
lapack
|
|
|
|
blas
|
2020-03-12 21:09:20 +02:00
|
|
|
zbessel
|
2019-03-20 14:13:41 +02:00
|
|
|
)
|
2019-03-19 16:33:44 +02:00
|
|
|
target_include_directories (qpms PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
2019-08-12 16:33:54 +03:00
|
|
|
|
2020-01-20 12:22:45 +02:00
|
|
|
target_compile_options(qpms PRIVATE -Wall -Wno-return-type -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-label)
|
2019-09-30 14:37:28 +03:00
|
|
|
target_compile_definitions(qpms PRIVATE LATTICESUMS32 QPMS_VECTORS_NICE_TRANSFORMATIONS
|
2020-01-23 16:16:41 +02:00
|
|
|
EWALD_AUTO_CUTOFF QPMS_EVALUATE_PARANOID_ASSERTS
|
2019-09-30 14:37:28 +03:00
|
|
|
)
|
2019-08-16 11:17:59 +03:00
|
|
|
|
2019-08-12 16:33:54 +03:00
|
|
|
install(TARGETS qpms
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|