Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Cmake detection quietness, and adhere to standard procedure #701

Merged
merged 1 commit into from
May 4, 2023
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMake/HighFiveConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if(TARGET HighFive)
return()
endif()

@PACKAGE_INIT@

# Get HighFive targets
include("${CMAKE_CURRENT_LIST_DIR}/HighFiveTargets.cmake")

Expand Down Expand Up @@ -61,8 +63,12 @@ if(HIGHFIVE_USE_XTENSOR AND NOT CMAKE_VERSION VERSION_LESS 3.8)
set_property(TARGET HighFive APPEND PROPERTY INTERFACE_COMPILE_FEATURES cxx_std_14)
endif()

message(STATUS "HIGHFIVE @PROJECT_VERSION@: (Re)Detecting Highfive dependencies (HIGHFIVE_USE_INSTALL_DEPS=NO)")
if(NOT HighFive_FIND_QUIETLY)
message(STATUS "HIGHFIVE @PROJECT_VERSION@: (Re)Detecting Highfive dependencies (HIGHFIVE_USE_INSTALL_DEPS=NO)")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/HighFiveTargetDeps.cmake")
foreach(dependency HighFive_libheaders libdeps)
copy_interface_properties(HighFive ${dependency})
endforeach()

check_required_components(HighFive)
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/

# Disable test if Boost was expressly disabled, or if HighFive is a sub-project
if (NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
if(HIGHFIVE_UNIT_TESTS)
if(HIGHFIVE_UNIT_TESTS AND NOT HighFive_FIND_QUIETLY)
message(WARNING "Unit tests have been DISABLED.")
endif()
set(HIGHFIVE_UNIT_TESTS FALSE)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dependent_library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ option(USE_BUNDLED_HIGHFIVE "Use highfive from deps folder. Otherwise must be in
if(USE_BUNDLED_HIGHFIVE)
add_subdirectory("deps/HighFive" EXCLUDE_FROM_ALL)
else()
find_package(HighFive REQUIRED)
find_package(HighFive REQUIRED QUIET)
endif()

add_library(simpleton SHARED "src/simpleton.cpp" "src/otherton.cpp")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_project_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test_install() {
local builddir="${BUILDDIR}/${project}/${2}"
shift
shift
ln -s ../../.. "${TESTDIR}/${project}/deps/HighFive"
ln -sf ../../.. "${TESTDIR}/${project}/deps/HighFive"
rm -rf "${builddir}"
mkdir -p "${builddir}"
pushd "${builddir}"
Expand Down