Disable "hard" examples in CI
[qpms.git] / CMakeLists.txt
blobe17a741c31075f396bfcf92fdcb4e5195bbee697
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)
8 include(version.cmake)
9 include(GNUInstallDirs)
11 project (QPMS)
13 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
15 macro(use_c99)
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}")
19     endif ()
20   else ()
21     set (CMAKE_C_STANDARD 99)
22   endif ()
23 endmacro(use_c99)
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
35                 PROJECT amos
36                 LIBRARIES amos
37                 NO_EXTERNAL_INSTALL)
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)
52 enable_testing()
53 add_subdirectory (tests EXCLUDE_FROM_ALL)
55 #add_subdirectory (apps/transop-ewald)