dft_tools/CMakeLists.txt

38 lines
1.2 KiB
CMake
Raw Normal View History

# Version number of the application
2015-10-28 14:25:47 +01:00
set (DFT_TOOLS_VERSION "1.4")
2013-07-23 19:49:42 +02:00
# 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)
2013-09-01 17:56:17 +02:00
project(dft_tools CXX Fortran)
2013-07-23 19:49:42 +02:00
set(CMAKE_BUILD_TYPE Release)
enable_testing()
# Load TRIQS, including all predefined variables from TRIQS installation
2013-07-29 12:26:52 +02:00
find_package(TRIQS REQUIRED)
2013-07-23 19:49:42 +02:00
if (NOT ${TRIQS_WITH_PYTHON_SUPPORT})
2014-11-08 00:37:32 +01:00
MESSAGE(FATAL_ERROR "dft_tools require Python support in TRIQS")
2013-07-23 19:49:42 +02:00
endif()
# Check that versions are compatible
if(NOT DFT_TOOLS_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: ${DFT_TOOLS_VERSION})")
endif()
2013-07-23 19:49:42 +02:00
# We want to be installed in the TRIQS tree
set(CMAKE_INSTALL_PREFIX ${TRIQS_PATH})
add_subdirectory(fortran/dmftproj)
add_subdirectory(python)
add_subdirectory(test)
2013-08-07 16:40:18 +02:00
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})