Skip to content

Commit

Permalink
Import TILEDB_CORE_OBJECTS by linking to it, instead of adding its …
Browse files Browse the repository at this point in the history
…objects as sources.

Now that `TILEDB_CORE_OBJECTS` has dependencies on its own, they have to be propagated.
  • Loading branch information
teo-tsirpanis committed Oct 23, 2023
1 parent b7797bf commit dc437bd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ target_include_directories(
target_link_libraries(tiledb_unit
PUBLIC
TILEDB_CORE_OBJECTS_ILIB
TILEDB_CORE_OBJECTS
Catch2::Catch2
tiledb_test_support_lib
)
Expand Down
2 changes: 1 addition & 1 deletion tiledb/api/c_api/array/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ find_package(Catch_EP REQUIRED)
# #TODO: link only against a new CAPI array handle, not all core objects
add_executable(
unit_capi_array EXCLUDE_FROM_ALL
$<TARGET_OBJECTS:TILEDB_CORE_OBJECTS>
)

target_link_libraries(unit_capi_array
PUBLIC
Catch2::Catch2WithMain
export
TILEDB_CORE_OBJECTS_ILIB
TILEDB_CORE_OBJECTS
)

# Sources for tests
Expand Down
2 changes: 1 addition & 1 deletion tiledb/sm/array/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ conclude(unit_test)

commence(unit_test consistency)
this_target_sources(main.cc unit_consistency.cc)
this_target_sources($<TARGET_OBJECTS:TILEDB_CORE_OBJECTS>)
this_target_link_libraries(TILEDB_CORE_OBJECTS)
this_target_link_libraries(TILEDB_CORE_OBJECTS_ILIB)
conclude(unit_test)
2 changes: 1 addition & 1 deletion tiledb/sm/subarray/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ conclude(unit_test)

commence(unit_test add_ranges_list)
this_target_sources(main.cc unit_add_ranges_list.cc)
this_target_link_libraries($<TARGET_OBJECTS:TILEDB_CORE_OBJECTS>)
this_target_link_libraries(TILEDB_CORE_OBJECTS)
this_target_link_libraries(tiledb_test_support_lib)
target_include_directories(unit_add_ranges_list PRIVATE
"$<TARGET_PROPERTY:TILEDB_CORE_OBJECTS,INCLUDE_DIRECTORIES>")
Expand Down
2 changes: 1 addition & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ add_executable(tiledb EXCLUDE_FROM_ALL
src/commands/help_command.cc
src/commands/info_command.cc
src/main/tiledb.cc
$<TARGET_OBJECTS:TILEDB_CORE_OBJECTS>
)

# List of all tool targets
Expand All @@ -45,6 +44,7 @@ set(TILEDB_TOOLS tiledb)
foreach(TOOL ${TILEDB_TOOLS})
target_link_libraries(${TOOL} PRIVATE
TILEDB_CORE_OBJECTS_ILIB
TILEDB_CORE_OBJECTS
clipp::clipp
)
target_include_directories(${TOOL} PRIVATE
Expand Down

0 comments on commit dc437bd

Please sign in to comment.