diff --git a/.gitmodules b/.gitmodules index 7ddb9ce..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +0,0 @@ -[submodule "external/litexx"] - path = external/litexx - url = https://github.com/seanmiddleditch/litexx -[submodule "external/doctest"] - path = external/doctest - url = https://github.com/onqtam/doctest diff --git a/CMakeLists.txt b/CMakeLists.txt index 6308446..344597a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.8) project(formatxx - VERSION 0.9.0 + VERSION 0.10.0 LANGUAGES CXX ) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index c25d679..343fd0b 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,9 +1,25 @@ -if(NOT TARGET litexx) - add_subdirectory(litexx EXCLUDE_FROM_ALL) -endif() +include(FetchContent) +FetchContent_Declare(doctest + GIT_REPOSITORY https://github.com/onqtam/doctest.git + GIT_TAG 2.3.1 + GIT_SHALLOW ON + GIT_SUBMODULES "" +) +FetchContent_Declare(litexx + GIT_REPOSITORY https://github.com/seanmiddleditch/litexx.git + GIT_TAG 0.1.0 + GIT_SHALLOW ON + GIT_SUBMODULES "" +) if(FORMATXX_BUILD_TESTS AND NOT TARGET doctest) + FetchContent_Populate(doctest) set(DOCTEST_WITH_TESTS OFF CACHE BOOL "enable doctest tests") set(DOCTEST_WITH_MAIN_IN_STATIC_LIB OFF CACHE BOOL "enable doctest static library") - add_subdirectory(doctest EXCLUDE_FROM_ALL) + add_subdirectory(${doctest_SOURCE_DIR} ${doctest_BINARY_DIR} EXCLUDE_FROM_ALL) +endif() + +if(NOT TARGET litexx) + FetchContent_Populate(litexx) + add_subdirectory(${litexx_SOURCE_DIR} ${litexx_BINARY_DIR} EXCLUDE_FROM_ALL) endif() diff --git a/external/doctest b/external/doctest deleted file mode 160000 index b2611a1..0000000 --- a/external/doctest +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b2611a140fe67d983b7078a3d3cf76a79efaaa9b diff --git a/external/litexx b/external/litexx deleted file mode 160000 index 19c31a3..0000000 --- a/external/litexx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 19c31a3d1cdd7ca5ba99c28b7d634cc9e2e97539