From 7fe9caf4105a1f83ddfe7edcfff4e086a8373f4c Mon Sep 17 00:00:00 2001 From: Tobias Schmidt Date: Wed, 10 Mar 2021 20:57:57 +0100 Subject: [PATCH] add import script for catch2 --- import/catch2.cmake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 import/catch2.cmake diff --git a/import/catch2.cmake b/import/catch2.cmake new file mode 100644 index 0000000..4c9f60e --- /dev/null +++ b/import/catch2.cmake @@ -0,0 +1,18 @@ +include(FetchContent) + +FetchContent_Declare( + Catch2 + GIT_REPOSITORY https://github.com/catchorg/Catch2.git + GIT_TAG v2.13.1 +) + +FetchContent_MakeAvailable(Catch2) +add_library(catch2 ALIAS Catch2) + +# set export variables +set(CATCH2_LIBRARY catch2) +set(CATCH2_SOURCE_DIR ${Catch2_SOURCE_DIR}) + +message(STATUS "[CATCH2] settings") +message(STATUS " CATCH2_LIBRARY = ${CATCH2_LIBRARY}") +message(STATUS " CATCH2_SOURCE_DIR = ${CATCH2_SOURCE_DIR}") \ No newline at end of file