PKGBUILDs/extra/conky/use-system-cmake.patch
2025-01-17 11:43:59 +00:00

155 lines
3.5 KiB
Diff

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 76a7a8ad..c56ca705 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -14,11 +14,11 @@ if(NOT OS_DARWIN)
list(FILTER test_srcs EXCLUDE REGEX ".*darwin.*\.cc?")
endif()
-add_library(Catch2 STATIC catch2/catch_amalgamated.cpp)
+find_package(Catch2 3 REQUIRED)
add_executable(test-conky test-common.cc ${test_srcs})
target_link_libraries(test-conky
- PRIVATE Catch2
+ PRIVATE Catch2::Catch2WithMain
PUBLIC conky_core
)
catch_discover_tests(test-conky)
diff --git a/tests/test-algebra.cc b/tests/test-algebra.cc
index fcd0d48f..8125fd2e 100644
--- a/tests/test-algebra.cc
+++ b/tests/test-algebra.cc
@@ -1,4 +1,4 @@
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <algebra.h>
#include <config.h>
diff --git a/tests/test-colours.cc b/tests/test-colours.cc
index 886f13b8..edfad818 100644
--- a/tests/test-colours.cc
+++ b/tests/test-colours.cc
@@ -1,4 +1,4 @@
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <colours.h>
#include <config.h>
diff --git a/tests/test-common.cc b/tests/test-common.cc
index 7e50ad99..64fd86d4 100644
--- a/tests/test-common.cc
+++ b/tests/test-common.cc
@@ -29,7 +29,7 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do
// this in one cpp file
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <common.h>
#include <conky.h>
diff --git a/tests/test-conky.cc b/tests/test-conky.cc
index a1d841b0..97cc0d1f 100644
--- a/tests/test-conky.cc
+++ b/tests/test-conky.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include "conky.h"
#include "lua-config.hh"
diff --git a/tests/test-core.cc b/tests/test-core.cc
index 769be768..573adaa7 100644
--- a/tests/test-core.cc
+++ b/tests/test-core.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <core.h>
diff --git a/tests/test-darwin.cc b/tests/test-darwin.cc
index b598706d..6396f52a 100644
--- a/tests/test-darwin.cc
+++ b/tests/test-darwin.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <darwin.h>
diff --git a/tests/test-diskio.cc b/tests/test-diskio.cc
index e5312834..41d4970d 100644
--- a/tests/test-diskio.cc
+++ b/tests/test-diskio.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <config.h>
#include <conky.h>
diff --git a/tests/test-fs.cc b/tests/test-fs.cc
index 5533f807..ab665ad5 100644
--- a/tests/test-fs.cc
+++ b/tests/test-fs.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <fs.h>
diff --git a/tests/test-gradient.cc b/tests/test-gradient.cc
index fee3247a..ba0228ad 100644
--- a/tests/test-gradient.cc
+++ b/tests/test-gradient.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <colours.h>
#include <conky.h>
diff --git a/tests/test-graph.cc b/tests/test-graph.cc
index 4478b001..4650be5b 100644
--- a/tests/test-graph.cc
+++ b/tests/test-graph.cc
@@ -27,7 +27,7 @@
*/
#include <tuple>
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include "conky.h"
#include "lua-config.hh"
#include "specials.h"
diff --git a/tests/test-linux.cc b/tests/test-linux.cc
index 79ef4523..aeababf3 100644
--- a/tests/test-linux.cc
+++ b/tests/test-linux.cc
@@ -26,7 +26,7 @@
*
*/
-#include "catch2/catch.hpp"
+#include "catch2/catch_all.hpp"
#include <linux.h>