Skip to content
Permalink
Browse files

Use FetchContent to download dependencies (#6)

* Use FetchContent to obtain doctest

* Remove doctest submodule

* Call this 0.1.0

* Fix for FetchContent
  • Loading branch information...
seanmiddleditch committed May 4, 2019
1 parent 19c31a3 commit 0fa462ceab8fb581deb0701de2f732201d33099a
Showing with 11 additions and 6 deletions.
  1. +0 −3 .gitmodules
  2. +1 −1 CMakeLists.txt
  3. +10 −1 external/CMakeLists.txt
  4. +0 −1 external/doctest
@@ -1,3 +0,0 @@
[submodule "external/doctest"]
path = external/doctest
url = https://github.com/onqtam/doctest
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12)

project(litexx
VERSION 0.0.1
VERSION 0.1.0
HOMEPAGE_URL https://github.com/seanmiddleditch/litexx.git
LANGUAGES CXX
)
@@ -1,6 +1,15 @@
include(FetchContent)
FetchContent_Declare(doctest
GIT_REPOSITORY https://github.com/onqtam/doctest.git
GIT_TAG 2.3.1
GIT_SHALLOW ON
GIT_SUBMODULES ""
)

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

Submodule doctest deleted from b2611a

0 comments on commit 0fa462c

Please sign in to comment.
You can’t perform that action at this time.