3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-23 04:43:42 +01:00

[cmake] Small cleanings in messages printed by external_denendency function

This commit is contained in:
Nils Wentzell 2020-04-29 17:57:16 -04:00
parent 8206a43651
commit c06d4b79a5

View File

@ -34,7 +34,7 @@ function(external_dependency)
if(NOT ARG_BUILD_ALWAYS AND NOT Build_Deps STREQUAL "Always") if(NOT ARG_BUILD_ALWAYS AND NOT Build_Deps STREQUAL "Always")
find_package(${ARGV0} ${${ARGV0}_VERSION} QUIET HINTS ${CMAKE_INSTALL_PREFIX}) find_package(${ARGV0} ${${ARGV0}_VERSION} QUIET HINTS ${CMAKE_INSTALL_PREFIX})
if(${ARGV0}_FOUND) if(${ARGV0}_FOUND)
message(STATUS "Found dependency ${ARGV0} in system.") message(STATUS "Found dependency ${ARGV0} in system")
return() return()
elseif(Build_Deps STREQUAL "Never") elseif(Build_Deps STREQUAL "Never")
message(FATAL_ERROR "Could not find dependency ${ARGV0} in system. Please install the dependency manually or use -DBuild_Deps=IfNotFound during cmake configuration to automatically build all dependencies that are not found.") message(FATAL_ERROR "Could not find dependency ${ARGV0} in system. Please install the dependency manually or use -DBuild_Deps=IfNotFound during cmake configuration to automatically build all dependencies that are not found.")
@ -48,7 +48,7 @@ function(external_dependency)
set(Build_Tests OFF) set(Build_Tests OFF)
endif() endif()
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}) if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0})
message(STATUS "Found sources for dependency ${ARGV0} at ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}.") message(STATUS "Found sources for dependency ${ARGV0} at ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}")
add_subdirectory(${ARGV0} ${subdir_opts}) add_subdirectory(${ARGV0} ${subdir_opts})
elseif(ARG_GIT_REPO) elseif(ARG_GIT_REPO)
set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/${ARGV0}) set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/${ARGV0})
@ -61,7 +61,7 @@ function(external_dependency)
endif() endif()
add_subdirectory(${src_dir} ${bin_dir} ${subdir_opts}) add_subdirectory(${src_dir} ${bin_dir} ${subdir_opts})
else() else()
message(FATAL_ERROR "Could not find or build dependency ${ARGV0}.") message(FATAL_ERROR "Could not find or build dependency ${ARGV0}")
endif() endif()
set_property(GLOBAL PROPERTY ${ARGV0}_FOUND TRUE) set_property(GLOBAL PROPERTY ${ARGV0}_FOUND TRUE)