From 49748e3a5d6a42c92a29564025b4636d912318ac Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Fri, 27 Jan 2023 15:38:11 -0700 Subject: [PATCH] WrapExternal: Propertly namesapce target WithSubpackagesA::pws_a (#63) This is needed to work when WithSubpackages is treated as an external package (which was exposed by the test of this new TriBITS feature). --- test/core/ExamplesUnitTests/TribitsExampleProject_Tests.cmake | 2 +- .../packages/wrap_external/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/core/ExamplesUnitTests/TribitsExampleProject_Tests.cmake b/test/core/ExamplesUnitTests/TribitsExampleProject_Tests.cmake index af0ab3206..4b7f3c8ef 100644 --- a/test/core/ExamplesUnitTests/TribitsExampleProject_Tests.cmake +++ b/test/core/ExamplesUnitTests/TribitsExampleProject_Tests.cmake @@ -2448,7 +2448,7 @@ tribits_add_advanced_test( TribitsExampleProject_ALL_NoFortran_WrapExternal_Verb "WithSubpackages_LIBRARIES='WithSubpackagesC::pws_c[;]WithSubpackagesB::pws_b[;]WithSubpackagesA::pws_a'" - "WrapExternal_LIBRARIES='external_func[;]pws_a'" + "WrapExternal_LIBRARIES='external_func[;]WithSubpackagesA::pws_a'" "pws_b_TARGET_NAME='pws_b'" "b_test_TARGET_NAME='WithSubpackagesB_b_test'" diff --git a/tribits/examples/TribitsExampleProject/packages/wrap_external/CMakeLists.txt b/tribits/examples/TribitsExampleProject/packages/wrap_external/CMakeLists.txt index ea7161b61..a9f8b0a37 100644 --- a/tribits/examples/TribitsExampleProject/packages/wrap_external/CMakeLists.txt +++ b/tribits/examples/TribitsExampleProject/packages/wrap_external/CMakeLists.txt @@ -133,13 +133,13 @@ add_dependencies(external_func build_external_func) # E.2) Make sure before we build the external library, we first build the # libraries. -add_dependencies(build_external_func pws_a) +add_dependencies(build_external_func WithSubpackagesA::pws_a) # NOTE: You have to put the lib dependencies on build target, not the imported # library target! # E.3) Update the TriBITS variables append_set(${PACKAGE_NAME}_LIB_TARGETS external_func) -global_set(${PACKAGE_NAME}_LIBRARIES external_func pws_a) +global_set(${PACKAGE_NAME}_LIBRARIES external_func WithSubpackagesA::pws_a) global_set(${PACKAGE_NAME}_HAS_NATIVE_LIBRARIES ON) tribits_include_directories(${EXTERNAL_FUNC_SOURCE_DIR}) # NOTE: Above, you have to add the upstream dependent libraries to the current