Skip to content

Commit

Permalink
WrapExternal: Propertly namesapce target WithSubpackagesA::pws_a (#63)
Browse files Browse the repository at this point in the history
This is needed to work when WithSubpackages is treated as an external package
(which was exposed by the test of this new TriBITS feature).
  • Loading branch information
bartlettroscoe committed Jan 27, 2023
1 parent 0e42c4f commit 49748e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49748e3

Please sign in to comment.