mirror of
https://github.com/triqs/dft_tools
synced 2025-01-10 21:18:22 +01:00
[cmake] Manage dependencies in a seperate deps subdirectory
This commit is contained in:
parent
2736682002
commit
b9d934554c
@ -52,6 +52,10 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR (NOT IS_ABSOLUTE ${CMAKE_INSTA
|
|||||||
endif()
|
endif()
|
||||||
message(STATUS "-------- CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------")
|
message(STATUS "-------- CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------")
|
||||||
|
|
||||||
|
# ############
|
||||||
|
# Dependencies
|
||||||
|
add_subdirectory(deps)
|
||||||
|
|
||||||
# ############
|
# ############
|
||||||
# Options
|
# Options
|
||||||
|
|
||||||
|
18
deps/CMakeLists.txt
vendored
Normal file
18
deps/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Each dependency should be either
|
||||||
|
# * a cmake subproject in this directory
|
||||||
|
# * found in the system using find_package
|
||||||
|
# Provide either a download.sh script to get all sources
|
||||||
|
# or use e.g. git subtree/submodule or softlinks
|
||||||
|
|
||||||
|
# Add all subdirectories as CMake Sub-Projects
|
||||||
|
file(GLOB allfiles CONFIGURE_DEPENDS *)
|
||||||
|
foreach(file ${allfiles})
|
||||||
|
if(IS_DIRECTORY ${file})
|
||||||
|
add_subdirectory(${file})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# -- googletest --
|
||||||
|
if(NOT TARGET gtest)
|
||||||
|
find_package(GTest REQUIRED)
|
||||||
|
endif()
|
1
deps/download.sh
vendored
Executable file
1
deps/download.sh
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
git clone https://github.com/google/googletest --branch v1.10.x --depth 1
|
@ -19,6 +19,13 @@ Installation steps
|
|||||||
|
|
||||||
$ git clone https://github.com/TRIQS/app4triqs app4triqs.src
|
$ git clone https://github.com/TRIQS/app4triqs app4triqs.src
|
||||||
|
|
||||||
|
#. Make sure that all additional dependencies are installed on your system and available in your environment.
|
||||||
|
Alternatively build the dependencies from source instead with::
|
||||||
|
|
||||||
|
$ (cd deps && ./download.sh)
|
||||||
|
|
||||||
|
In this case they will be installed together with your application.
|
||||||
|
|
||||||
#. Create and move to a new directory where you will compile the code::
|
#. Create and move to a new directory where you will compile the code::
|
||||||
|
|
||||||
$ mkdir app4triqs.build && cd app4triqs.build
|
$ mkdir app4triqs.build && cd app4triqs.build
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
# Build googletest
|
|
||||||
set(PYTHON_EXECUTABLE ${TRIQS_PYTHON_EXECUTABLE})
|
|
||||||
add_subdirectory(gtest EXCLUDE_FROM_ALL)
|
|
||||||
|
|
||||||
# Copy h5 files to binary dir
|
# Copy h5 files to binary dir
|
||||||
file(GLOB_RECURSE all_h5_ref_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.ref.h5)
|
file(GLOB_RECURSE all_h5_ref_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.ref.h5)
|
||||||
foreach(file ${all_h5_ref_files})
|
foreach(file ${all_h5_ref_files})
|
||||||
|
Loading…
Reference in New Issue
Block a user