Skip to content

Commit

Permalink
Replace git submodules with CMake FetchContent_Declare
Browse files Browse the repository at this point in the history
  • Loading branch information
kurpicz committed Nov 24, 2023
1 parent 7ff99c4 commit 05acd97
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
25 changes: 15 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion extlib/tlx
Submodule tlx deleted from 1b2059
1 change: 0 additions & 1 deletion extlib/utils
Submodule utils deleted from 4be3c5

0 comments on commit 05acd97

Please sign in to comment.