From dfc7aa23d7815e65b099b1e6790fd05e92c6bc60 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 3 Oct 2023 17:27:35 -0400 Subject: [PATCH] indentlog: use xo_external_target_dependency() for catch2 --- utest/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utest/CMakeLists.txt b/utest/CMakeLists.txt index b94f1dd5..1b92e999 100644 --- a/utest/CMakeLists.txt +++ b/utest/CMakeLists.txt @@ -15,14 +15,17 @@ target_code_coverage(${SELF_EXECUTABLE_NAME} AUTO ALL) # ---------------------------------------------------------------- # 3rd party dependency: catch2 +xo_external_target_dependency(${SELF_EXECUTABLE_NAME} Catch2 Catch2::Catch2) + # 1. using target_link_libraries(.. Catch2) here doesn't work; # build tries to link to a Catch2 library. # perhaps Catch2 target not declared INTERFACE? # 2. nix build doesn't need this; dependency on catch2 # puts include directory in NIX_CFLAGS_COMPILE, so stuff 'just works' # -find_package(Catch2 2 REQUIRED) -target_link_libraries(${SELF_EXECUTABLE_NAME} Catch2::Catch2) + +#find_package(Catch2 2 REQUIRED) +#target_link_libraries(${SELF_EXECUTABLE_NAME} Catch2::Catch2) #set(Catch2_INCLUDES "${Catch2_DIR}/../../../include") #target_include_directories(${SELF_EXECUTABLE_NAME} PUBLIC ${Catch2_INCLUDES})