From 72ef7deda63ae62bccc57e4ab5ef36545adc2594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Carreira?= Date: Sun, 2 May 2021 23:55:07 +0100 Subject: [PATCH] Start adding cmake code to use catch2 --- CMakeLists.txt | 6 ++++++ lib/CMakeLists.txt | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07b2968..9338989 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,7 @@ OPTION(BUILD_TOOLS "Build Command Line Application" ON) OPTION(BUILD_EXAMPLES "Build Examples" OFF) OPTION(BUILD_DOC "Build Documentation" OFF) OPTION(BUILD_TESTS "Build Google Tests" OFF) +OPTION(BUILD_TESTS_CATCH2 "Build Catch2 Tests" OFF) OPTION(USE_FERVOR "Add Fervor support" OFF) @@ -119,6 +120,11 @@ IF(BUILD_TESTS) ) ENDIF() +IF(BUILD_TESTS_CATCH2) + FIND_PACKAGE(Catch2 REQUIRED) + ENABLE_TESTING() +ENDIF() + OPTION(USE_OPENCV "Add OpenCV support" ON) IF(USE_OPENCV) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 9dec7f3..2853ada 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -85,3 +85,7 @@ ENDIF() IF(BUILD_TESTS) ADD_SUBDIRECTORY(tests) ENDIF() + +IF(BUILD_TESTS_CATCH2) + ADD_SUBDIRECTORY(catch2) +ENDIF() \ No newline at end of file