1 cmake_minimum_required(VERSION 3.0.2)
3 option(QPMS_USE_FORTRAN_AMOS "Use the original AMOS Fortran libraries instead of the C ones" OFF)
5 if (QPMS_USE_FORTRAN_AMOS)
6 include(CMakeAddFortranSubdirectory)
7 endif (QPMS_USE_FORTRAN_AMOS)
9 include(GNUInstallDirs)
13 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
16 if (CMAKE_VERSION VERSION_LESS "3.1")
17 if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
18 set (CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
21 set (CMAKE_C_STANDARD 99)
25 # We need the amos libraries to be compiled with -fPIC
26 # but at the same time, we do not want to make a .so file,
27 # so distutils package it with the rest of qpms c/cython lib.
28 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
30 set (QPMS_VERSION_MAJOR 0)
31 #set (QPMS_VERSION_MINOR 3)
33 if (QPMS_USE_FORTRAN_AMOS)
34 cmake_add_fortran_subdirectory (amos
38 set(QPMS_AMOSLIB amos)
39 else (QPMS_USE_FORTRAN_AMOS)
40 set(CAMOS_BUILD_STATIC ON)
41 add_subdirectory (camos)
42 set(QPMS_AMOSLIB camos)
43 endif (QPMS_USE_FORTRAN_AMOS)
46 set(FADDEEVA_BUILD_STATIC ON)
47 add_subdirectory(faddeeva)
49 add_subdirectory (qpms)
53 add_subdirectory (tests EXCLUDE_FROM_ALL)
55 #add_subdirectory (apps/transop-ewald)