From 05acd975a20552bb1426a5faf8611179fa04929c Mon Sep 17 00:00:00 2001 From: Florian Kurpicz Date: Fri, 24 Nov 2023 17:36:56 +0100 Subject: [PATCH] Replace git submodules with CMake FetchContent_Declare --- .gitmodules | 6 ------ CMakeLists.txt | 25 +++++++++++++++---------- extlib/tlx | 1 - extlib/utils | 1 - 4 files changed, 15 insertions(+), 18 deletions(-) delete mode 160000 extlib/tlx delete mode 160000 extlib/utils diff --git a/.gitmodules b/.gitmodules index 8fad4b4..4d5bae4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "extlib/tlx"] - path = extlib/tlx - url = https://github.com/tlx/tlx -[submodule "extlib/utils"] - path = extlib/utils - url = https://github.com/pasta-toolbox/utils [submodule "extlib/doxygen-awesome-css"] path = extlib/doxygen-awesome-css url = https://github.com/jothepro/doxygen-awesome-css.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 5926bc7..03b25c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,11 +18,13 @@ # ################################################################################ -cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.24 FATAL_ERROR) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) +include(FetchContent) + project(pasta_bit_vector) # Options when compiling pasta::bit_vector @@ -36,16 +38,19 @@ option(PASTA_BIT_VECTOR_BUILD_BENCHMARKS option(PASTA_BIT_VECTOR_COVERAGE_REPORTING "Enable coverage reporting for pasta::bit_vector" OFF) -# Add tlx subdirectory only, if it has not been added by another project already -if(NOT TARGET tlx) - add_subdirectory(extlib/tlx) -endif() +FetchContent_Declare( + tlx + GIT_REPOSITORY https://github.com/tlx/tlx.git + GIT_TAG b6af589 #release 0.6.1 +) -# Add pasta::utils subdirectory only, if it has not been added by another -# project already -if (NOT TARGET pasta_utils) - add_subdirectory(extlib/utils) -endif() +FetchContent_Declare( + pasta_utils + GIT_REPOSITORY https://github.com/pasta-toolbox/utils.git + GIT_TAG 92828b8 #main +) + +FetchContent_MakeAvailable(tlx pasta_utils) # Optional code coverage (library compile options are only set if coverage # reporting is enabled diff --git a/extlib/tlx b/extlib/tlx deleted file mode 160000 index 1b2059e..0000000 --- a/extlib/tlx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1b2059e19f3605c854f2a7450fa102e3e40dc10e diff --git a/extlib/utils b/extlib/utils deleted file mode 160000 index 4be3c5a..0000000 --- a/extlib/utils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4be3c5a6b7004488bb9d23057484a774c823e75e