forked from TRIQS/hubbardI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (35 loc) · 1.33 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Version number of the application
set (HUBBARD1_VERSION "1.4")
set (HUBBARD1_RELEASE "1.4.0")
# Append triqs installed files to the cmake load path
list(APPEND CMAKE_MODULE_PATH ${TRIQS_PATH}/share/triqs/cmake)
# start configuration
cmake_minimum_required(VERSION 2.8)
project(hubbardI CXX Fortran)
set(CMAKE_BUILD_TYPE Release)
enable_testing()
# We use shared libraries
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
# Load TRIQS, including all predefined variables from TRIQS installation
find_package(TRIQS REQUIRED)
if (NOT ${TRIQS_WITH_PYTHON_SUPPORT})
MESSAGE(FATAL_ERROR "Hubbard I application require Python support in TRIQS")
endif()
# Check that versions are compatible
if(NOT HUBBARD1_VERSION EQUAL TRIQS_VERSION)
message(FATAL_ERROR "The application version is not compatible with the TRIQS library (TRIQS library version: ${TRIQS_VERSION} while this application version: ${HUBBARD1_VERSION})")
endif()
# We want to be installed in the TRIQS tree
set(CMAKE_INSTALL_PREFIX ${TRIQS_PATH})
# Codes and tests
add_subdirectory(fortran)
add_subdirectory(python)
add_subdirectory(test)
# Documentation
option(BUILD_DOC "Build documentation" OFF)
if(${BUILD_DOC})
if(NOT TRIQS_WITH_DOCUMENTATION)
message("Error: TRIQS library has not been compiled with its documentation")
endif()
add_subdirectory(doc)
endif(${BUILD_DOC})