Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cmake_policy(VERSION ${CMAKE_VERSION})

# ############
# Define Project
project(triqs_dft_tools VERSION 3.3.1 LANGUAGES CXX Fortran)
project(triqs_dft_tools VERSION 3.3.1 LANGUAGES CXX)
get_directory_property(IS_SUBPROJECT PARENT_DIRECTORY)

# ############
Expand Down Expand Up @@ -89,9 +89,6 @@ include(GNUInstallDirs)
# Find / Build dependencies
add_subdirectory(deps)

# add here stuff for the Fortran part in DFTTools
add_subdirectory(fortran/dmftproj)

# Tests
if(Build_Tests)
add_subdirectory(test)
Expand Down
54 changes: 7 additions & 47 deletions deps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,48 +1,8 @@
include(external_dependency.cmake)
include(get_cpm.cmake)

# Add your dependencies with the function
#
# external_dependency(name
# [VERSION <version-number>]
# [GIT_REPO <url>]
# [GIT_TAG <tag>]
# [BUILD_ALWAYS]
# [EXCLUDE_FROM_ALL]
# )
#
# Resolve the dependency using the following steps in order.
# If a step was successful, skip the remaining ones.
#
# 1. Use find_package(name [<version-number>])
# to locate the package in the system.
# Skip this step if Build_Deps option is set.
# 2. Try to find a directory containing the sources
# at ${CMAKE_CURRENT_SOURCE_DIR}/name and
# ${CMAKE_SOURCE_DIR}/deps/name. If found
# build it as a cmake sub-project.
# 3. If GIT_REPO is provided, git clone the sources,
# and build them as a cmake sub-project.
#
# Addtional options:
#
# GIT_TAG - Use this keyword to specify the git-tag, branch or commit hash
#
# BUILD_ALWAYS - If set, this dependency will always be built from source
# and will never be searched in the system.
#
# EXCLUDE_FROM_ALL - If set, targets of the dependency cmake subproject
# will not be included in the ALL target of the project.
# In particular the dependency will not be installed.

if(NOT DEFINED Build_Deps)
set(Build_Deps "Always" CACHE STRING "Do we build dependencies from source? [Never/Always/IfNotFound]")
else()
set(Build_Deps_Opts "Never" "Always" "IfNotFound")
if(NOT ${Build_Deps} IN_LIST Build_Deps_Opts)
message(FATAL_ERROR "Build_Deps option should be either 'Never', 'Always' or 'IfNotFound'")
endif()
set(Build_Deps ${Build_Deps} CACHE STRING "Do we build dependencies from source? [Never/Always/IfNotFound]")
if(NOT IS_SUBPROJECT AND NOT Build_Deps STREQUAL "Always" AND (ASAN OR UBSAN))
message(WARNING "For builds with llvm sanitizers (ASAN/UBSAN) it is recommended to use -DBuild_Deps=Always to avoid false positives.")
endif()
endif()
# -- dftkit --
CPMAddPackage(
NAME dftkit
GITHUB_REPOSITORY triqs/dftkit
GIT_TAG unstable
)
95 changes: 0 additions & 95 deletions deps/external_dependency.cmake

This file was deleted.

20 changes: 20 additions & 0 deletions deps/get_cpm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Download CPM.cmake if not already available
set(CPM_DOWNLOAD_VERSION 0.42.0)

if(CPM_SOURCE_CACHE)
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
else()
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
endif()

if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
file(DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
${CPM_DOWNLOAD_LOCATION}
)
endif()

include(${CPM_DOWNLOAD_LOCATION})
25 changes: 0 additions & 25 deletions fortran/dmftproj/CMakeLists.txt

This file was deleted.

14 changes: 0 additions & 14 deletions fortran/dmftproj/SRC_templates/case.cf_f_mm2

This file was deleted.

7 changes: 0 additions & 7 deletions fortran/dmftproj/SRC_templates/case.cf_p_cubic

This file was deleted.

16 changes: 0 additions & 16 deletions fortran/dmftproj/SRC_templates/case.indmftpr

This file was deleted.

Loading
Loading