From 868dcae683671243bff4fd82fa7025fb47225cf9 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 21 Dec 2019 01:29:25 +0200 Subject: [PATCH] Use the local BoostFetch --- CMakeLists.txt | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8775f0e..786db5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,29 +20,19 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) # Testing - # `function` confuses FetchContent, sees empty CMAKE_CURRENT_LIST_DIR - macro(fetch_and_include name) - - message(STATUS "Fetching ${name}") - - file(DOWNLOAD - "https://raw.githubusercontent.com/boostorg/mincmake/master/${name}" - "${CMAKE_BINARY_DIR}/fetch_and_include/${name}" - ) - - include("${CMAKE_BINARY_DIR}/fetch_and_include/${name}") - - endmacro() - - fetch_and_include(cmake/boost_fetch.cmake) - - boost_fetch(boostorg/assert TAG develop) - boost_fetch(boostorg/config TAG develop) - boost_fetch(boostorg/core TAG develop) - include(CTest) add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) + include(BoostFetch) + + set(BUILD_TESTING OFF) + + boost_fetch(boostorg/assert TAG develop EXCLUDE_FROM_ALL) + boost_fetch(boostorg/config TAG develop EXCLUDE_FROM_ALL) + boost_fetch(boostorg/core TAG develop EXCLUDE_FROM_ALL) + + unset(BUILD_TESTING) + # Installation include(GNUInstallDirs)