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()