From b4e74c079c2516b915abfbacaaf474516b2259d4 Mon Sep 17 00:00:00 2001 From: Merry Date: Sat, 31 Dec 2022 16:32:10 +0000 Subject: [PATCH] externals: Integrate catch external --- externals/CMakeLists.txt | 10 ++++++++++ externals/README.md | 3 +++ 2 files changed, 13 insertions(+) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 959f3d34..928441dd 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -14,6 +14,16 @@ set(BUILD_TESTING OFF) # simply add the directory to that file as a subdirectory # to have CMake automatically recognize them. +# catch + +if (NOT TARGET Catch2::Catch2WithMain) + if (DYNARMIC_TESTS) + add_subdirectory(catch EXCLUDE_FROM_ALL) + list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/externals/catch/extras") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE) + endif() +endif() + # fmt if (NOT TARGET fmt::fmt) diff --git a/externals/README.md b/externals/README.md index 586b29a9..d71d5ae0 100644 --- a/externals/README.md +++ b/externals/README.md @@ -3,6 +3,7 @@ This repository uses subtrees to manage some of its externals. ## Initial setup ``` +git remote add externals-catch https://github.com/catchorg/Catch2.git --no-tags git remote add externals-fmt https://github.com/fmtlib/fmt.git --no-tags git remote add externals-mcl https://github.com/merryhime/mcl.git --no-tags git remote add externals-oaknut https://github.com/merryhime/oaknut.git --no-tags @@ -17,6 +18,7 @@ git remote add externals-zydis https://github.com/zyantific/zydis.git --no-tags Change `` to refer to the appropriate git reference. ``` +git fetch externals-catch git fetch externals-fmt git fetch externals-mcl git fetch externals-oaknut @@ -24,6 +26,7 @@ git fetch externals-robin-map git fetch externals-xbyak git fetch externals-zycore git fetch externals-zydis +git subtree pull --squash --prefix=externals/catch externals-catch git subtree pull --squash --prefix=externals/fmt externals-fmt git subtree pull --squash --prefix=externals/mcl externals-mcl git subtree pull --squash --prefix=externals/oaknut externals-oaknut