From 50cb4690b89201c6a6ae3abff94da3b27b53f0c0 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 31 Oct 2022 23:38:12 -0400 Subject: [PATCH] chore: drop 3.11-3.13 for extended-example Signed-off-by: Henry Schreiner --- examples/extended-project/CMakeLists.txt | 9 +++------ .../cmake/add_FetchContent_MakeAvailable.cmake | 7 ------- 2 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 examples/extended-project/cmake/add_FetchContent_MakeAvailable.cmake diff --git a/examples/extended-project/CMakeLists.txt b/examples/extended-project/CMakeLists.txt index dcf6f37..2b71057 100644 --- a/examples/extended-project/CMakeLists.txt +++ b/examples/extended-project/CMakeLists.txt @@ -1,5 +1,5 @@ -# Works with 3.11 and tested through 3.24 -cmake_minimum_required(VERSION 3.11...3.24) +# Works with 3.14 and tested through 3.24 +cmake_minimum_required(VERSION 3.14...3.24) # Project name and a few useful settings. Other commands can pick up the results project( @@ -35,11 +35,8 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) endif() # FetchContent added in CMake 3.11, downloads during the configure step +# FetchContent_MakeAvailable was added in CMake 3.14; simpler usage include(FetchContent) -# FetchContent_MakeAvailable was not added until CMake 3.14; use our shim -if(${CMAKE_VERSION} VERSION_LESS 3.14) - include(cmake/add_FetchContent_MakeAvailable.cmake) -endif() # Accumulator library # This is header only, so could be replaced with git submodules or FetchContent diff --git a/examples/extended-project/cmake/add_FetchContent_MakeAvailable.cmake b/examples/extended-project/cmake/add_FetchContent_MakeAvailable.cmake deleted file mode 100644 index f939da8..0000000 --- a/examples/extended-project/cmake/add_FetchContent_MakeAvailable.cmake +++ /dev/null @@ -1,7 +0,0 @@ -macro(FetchContent_MakeAvailable NAME) - FetchContent_GetProperties(${NAME}) - if(NOT ${NAME}_POPULATED) - FetchContent_Populate(${NAME}) - add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR}) - endif() -endmacro()