projects/guix·blob javascript-team · refs

43 lines · 1.3 KiB

1From 8f03ca270d1aa5dcafa945c941cf52ff14cb47da Mon Sep 17 00:00:00 2001
2Message-Id: <8f03ca270d1aa5dcafa945c941cf52ff14cb47da.1682600200.git.dev@jpoiret.xyz>
3From: Josselin Poiret <[email protected]>
4Date: Thu, 27 Apr 2023 14:51:51 +0200
5Subject: [PATCH] Use provided catch2
6
7From: Josselin Poiret <[email protected]>
8
9---
10 CMakeLists.txt | 10 +---------
11 1 file changed, 1 insertion(+), 9 deletions(-)
12
13diff --git a/CMakeLists.txt b/CMakeLists.txt
14index ddab64e..2d5eac8 100644
15--- a/CMakeLists.txt
16+++ b/CMakeLists.txt
17@@ -8,7 +8,6 @@ project(tl-expected
18 include(CMakePackageConfigHelpers)
19 include(CMakeDependentOption)
20 include(GNUInstallDirs)
21-include(FetchContent)
22 include(CTest)
23
24 if (NOT DEFINED CMAKE_CXX_STANDARD)
25@@ -63,14 +62,7 @@ install(FILES
26 install(DIRECTORY "include/" TYPE INCLUDE)
27
28 if(EXPECTED_BUILD_TESTS)
29- set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
30- set(CATCH_INSTALL_HELPERS OFF)
31- set(CATCH_BUILD_TESTING OFF)
32- set(CATCH_INSTALL_DOCS OFF)
33- FetchContent_Declare(Catch2 URL
34- https://github.com/catchorg/Catch2/archive/v2.13.10.zip)
35- FetchContent_MakeAvailable(Catch2)
36-
37+ find_package(Catch2 CONFIG)
38 file(GLOB test-sources CONFIGURE_DEPENDS tests/*.cpp)
39 list(FILTER test-sources EXCLUDE REGEX "tests/test.cpp")
40 add_executable(${PROJECT_NAME}-tests "${test-sources}")
41--
422.39.2
43