From a84e858bb9c380308a0e2c3d1fc61de263bf559b Mon Sep 17 00:00:00 2001 From: Florian Fontan Date: Sat, 6 Jul 2024 16:26:52 +0200 Subject: [PATCH] Update CMake files --- CMakeLists.txt | 3 +++ extern/CMakeLists.txt | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd09517..36e7507 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.15.0) project(KnapsackSolver LANGUAGES CXX) +# Avoid FetchContent warning. +cmake_policy(SET CMP0135 NEW) + # Require C++11. set(CMAKE_CXX_STANDARD 11) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 8888333..4005e3c 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -4,12 +4,9 @@ include(FetchContent) # Fetch boost. set(BOOST_INCLUDE_LIBRARIES thread filesystem system program_options) set(BOOST_ENABLE_CMAKE ON) -include(FetchContent) FetchContent_Declare( Boost - GIT_REPOSITORY https://github.com/boostorg/boost.git - GIT_TAG boost-1.84.0 - GIT_SHALLOW TRUE + URL https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.xz EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(Boost) @@ -17,7 +14,7 @@ FetchContent_MakeAvailable(Boost) FetchContent_Declare( optimizationtools GIT_REPOSITORY https://github.com/fontanf/optimizationtools.git - GIT_TAG 33a3966ece149d390ec7ce08699669b5267e64aa + GIT_TAG 66f61a3e02c746c57584a5d5257e1b1455d4a9ae #SOURCE_DIR "${PROJECT_SOURCE_DIR}/../optimizationtools/" EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(optimizationtools)