Skip to content

Commit

Permalink
[cmake] Bump cmake version requirement to 2.8.12 and properly set tri…
Browse files Browse the repository at this point in the history
…qs version requirement
  • Loading branch information
Wentzell committed Jan 14, 2020
1 parent d919676 commit 6f0f36a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ 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)
# start configuration
cmake_minimum_required(VERSION 2.8.12)
project(hubbardI CXX Fortran)
set(CMAKE_BUILD_TYPE Release)
enable_testing()
Expand All @@ -15,22 +15,17 @@ enable_testing()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

# Load TRIQS, including all predefined variables from TRIQS installation
find_package(TRIQS REQUIRED)
find_package(TRIQS 1.4 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(fortran)
add_subdirectory(python)
add_subdirectory(test)

Expand Down

0 comments on commit 6f0f36a

Please sign in to comment.