From d4886a7fee85b18ad09cc972fb44ea43486a3b5f Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Sat, 27 Nov 2021 23:28:27 +0000 Subject: [PATCH] Fix fetch content to build main product --- .gitignore | 4 ++-- CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6ed9357..d8fcc1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Created by https://www.gitignore.io/api/c++,clion,linux # Edit at https://www.gitignore.io/?templates=c++,clion,linux - +deps/** ### C++ ### # Prerequisites *.d @@ -146,4 +146,4 @@ doc/ compile_commands.json # Build dirs -build* \ No newline at end of file +build* diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a3daad..de95f7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,6 +162,8 @@ IF(BUILD_TESTS) DESCRIPTION "Catch2 unit tests" TYPE OPTIONAL ) + FETCHCONTENT_MAKEAVAILABLE(googletest Catch2) + INCLUDE(${CMAKE_SOURCE_DIR}/deps/catch2-src/contrib/Catch.cmake) INCLUDE(CTest) ENABLE_TESTING()