3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-31 16:45:49 +01:00

[cmake] Improve command line output for dependency configuration

This commit is contained in:
Nils Wentzell 2020-04-28 10:51:06 -04:00
parent a619870f92
commit 8c407831c8

View File

@ -5,15 +5,14 @@ function(external_dependency)
# Was dependency already found?
if(${ARGV0}_FOUND)
message(STATUS "Dependency ${ARGV0} was already resolved")
endif()
else()
if(NOT Build_Deps)
find_package(${ARGV0} ${${ARGV0}_VERSION} QUIET)
endif()
if(${ARGV0}_FOUND)
message(STATUS "Found dependency ${ARGV0} with find_package command")
else()
message(STATUS "Building Dependency ${ARGV0} from source.")
message(STATUS " =============== Configuring Dependency ${ARGV0} =============== ")
if(ARG_EXCLUDE_FROM_ALL)
set(subdir_opts EXCLUDE_FROM_ALL)
endif()
@ -33,6 +32,7 @@ function(external_dependency)
else()
message(FATAL_ERROR "Could not find dependency ${ARGV0}")
endif()
set(${ARGV0}_FOUND TRUE CACHE BOOL "Was dependency ${ARGV0} found?")
set(${ARGV0}_FOUND TRUE PARENT_SCOPE)
endif()
endif()
endfunction()