mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-23 23:48:22 +02:00
Closes: https://bugs.gentoo.org/953012 Signed-off-by: Julien Roy <julien@jroy.ca> Signed-off-by: Yixun Lan <dlan@gentoo.org>
64 lines
2.4 KiB
Diff
64 lines
2.4 KiB
Diff
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
|
index 028b3994..0b105eb2 100644
|
|
--- a/tests/CMakeLists.txt
|
|
+++ b/tests/CMakeLists.txt
|
|
@@ -1,17 +1,9 @@
|
|
include(FetchContent)
|
|
|
|
-FetchContent_Declare(
|
|
- ut
|
|
- GIT_REPOSITORY https://github.com/openalgz/ut
|
|
- GIT_TAG v0.0.5
|
|
- GIT_SHALLOW TRUE
|
|
-)
|
|
+find_package(ut2-glaze REQUIRED)
|
|
|
|
message(STATUS "Fetching dependencies...")
|
|
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
|
-set(CMAKE_SKIP_INSTALL_RULES ON CACHE BOOL "" FORCE)
|
|
-FetchContent_MakeAvailable(ut)
|
|
-set(CMAKE_SKIP_INSTALL_RULES OFF CACHE BOOL "" FORCE)
|
|
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL FALSE)
|
|
message(STATUS "...finished fetching dependencies.")
|
|
|
|
@@ -20,7 +12,7 @@ add_code_coverage_all_targets()
|
|
|
|
add_library(glz_test_common INTERFACE)
|
|
target_compile_features(glz_test_common INTERFACE cxx_std_23)
|
|
-target_link_libraries(glz_test_common INTERFACE ut::ut glaze::glaze)
|
|
+target_link_libraries(glz_test_common INTERFACE ut2-glaze::ut2-glaze glaze::glaze)
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
target_compile_options(glz_test_common INTERFACE -fno-exceptions -fno-rtti)
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
|
@@ -46,7 +38,7 @@ endif()
|
|
|
|
add_library(glz_test_exceptions INTERFACE)
|
|
target_compile_features(glz_test_exceptions INTERFACE cxx_std_23)
|
|
-target_link_libraries(glz_test_exceptions INTERFACE ut::ut glaze::glaze)
|
|
+target_link_libraries(glz_test_exceptions INTERFACE ut2-glaze::ut2-glaze glaze::glaze)
|
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
|
target_compile_options(glz_test_exceptions INTERFACE)
|
|
target_compile_options(glz_test_exceptions INTERFACE -Wall -Wextra -pedantic)
|
|
diff --git a/tests/asio_repe/CMakeLists.txt b/tests/asio_repe/CMakeLists.txt
|
|
index 1518b4e5..3cc27f67 100644
|
|
--- a/tests/asio_repe/CMakeLists.txt
|
|
+++ b/tests/asio_repe/CMakeLists.txt
|
|
@@ -1,14 +1,9 @@
|
|
project(asio_repe)
|
|
|
|
-FetchContent_Declare(
|
|
- asio
|
|
- GIT_REPOSITORY https://github.com/chriskohlhoff/asio.git
|
|
- GIT_TAG asio-1-32-0
|
|
- GIT_SHALLOW TRUE
|
|
-)
|
|
-FetchContent_MakeAvailable(asio)
|
|
+find_package(PkgConfig REQUIRED)
|
|
+pkg_check_modules(asio GLOBAL IMPORTED_TARGET REQUIRED asio)
|
|
|
|
add_executable(${PROJECT_NAME} ${PROJECT_NAME}.cpp)
|
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE include ${asio_SOURCE_DIR}/asio/include)
|
|
-target_link_libraries(${PROJECT_NAME} PRIVATE glz_test_exceptions)
|
|
\ No newline at end of file
|
|
+target_link_libraries(${PROJECT_NAME} PRIVATE glz_test_exceptions)
|