2 find_package(GSL 2.0 REQUIRED)
3 find_package(BLAS REQUIRED)
4 find_package(LAPACK REQUIRED)
6 # disable an annoying warning that gives false positives probably due to a bug in gcc
7 # and other not very relevant warnings
8 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-int-in-bool-context -Wno-comment")
11 include(GetGitRevisionDescription)
12 get_git_head_revision(GIT_REFSPEC GIT_SHA1)
13 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.c.in" "${CMAKE_CURRENT_BINARY_DIR}/version.c" @ONLY)
14 list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/version.c" version.h)
17 set (DIRS ${GSL_INCLUDE_DIRS} ${GSLCBLAS_INCLUDE_DIRS})
18 include_directories(${DIRS})
22 add_library (qpms SHARED translations.c tmatrices.c vecprint.c vswf.c wigner.c ewald.c
23 ewaldsf.c pointgroups.c latticegens.c
24 lattices2d.c gaunt.c error.c legendre.c symmetries.c vecprint.c
25 bessel.c own_zgemm.c parsing.c scatsystem.c materials.c drudeparam_data.c
26 lll.c beyn.c trivialgroup.c version.c
30 set(LIBS ${LIBS} ${GSL_LIBRARIES} ${GSLCBLAS_LIBRARIES})
33 target_link_libraries (qpms
40 target_include_directories (qpms PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
42 target_compile_options(qpms PRIVATE -Wall -Wno-return-type -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-label)
43 target_compile_definitions(qpms PRIVATE LATTICESUMS32 QPMS_VECTORS_NICE_TRANSFORMATIONS
44 EWALD_AUTO_CUTOFF QPMS_EVALUATE_PARANOID_ASSERTS
48 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
49 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})