Skip to content

Commit 28aeb65

Browse files
Remove link-completeness tests. (#5785)
Because we are shipping TileDB as a single unit, and because object libraries are an implementation detail, having checks that each object library can be independently linked (with explicitly stated dependencies) provides zero practical benefit, while adding almost one hundred `compile_***_.cc` files to source control. Any link errors that might occur in shipping libraries or unit tests will be caught in CI and addressed accordingly. This also lets us use the standard `commence`/`conclude` pattern for all remaining object libraries. --- TYPE: NO_HISTORY
1 parent fbe88b4 commit 28aeb65

File tree

112 files changed

+53
-3885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+53
-3885
lines changed

.github/workflows/build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ jobs:
227227
}
228228
229229
# CMake exits with non-0 status if there are any warnings during the build, so
230-
cmake --build $env:BUILD_BUILDDIRECTORY -j --target tiledb_unit unit_vfs tiledb_regression all_link_complete --config $CMakeBuildType
230+
cmake --build $env:BUILD_BUILDDIRECTORY -j --target tiledb_unit unit_vfs tiledb_regression --config $CMakeBuildType
231231
232232
if ($env:TILEDB_AZURE -eq "ON") {
233233
if($env.TILEDB_USE_CUSTOM_NODE_JS) {

CMakeLists.txt

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -483,32 +483,13 @@ if(TILEDB_TESTS)
483483
endif()
484484

485485
# -------------------------------------------------------
486-
# Accumulators for object libraries and unit tests
486+
# Accumulators for unit tests
487487
# -------------------------------------------------------
488488
#
489-
# All link-completeness targets from object libraries are aggregated onto a
490-
# single target.
491-
#
492-
# 1. Before any subdirectories are added:
493-
# a) Declare a target for all link-completeness checks. It's a phantom target
494-
# having only dependencies and with no build actions of its own.
495-
# b) Declare an accumulator for link-completeness targets.
496-
# 2. For each object library within the various subdirectories, add a
497-
# link-completeness target, either
498-
# a) manually, as an explicit dependency of the `all_link_complete` target.
499-
# b) automatically, as an implicit part of an object library environment.
500-
# The environment puts the link-completess target into the accumulator.
501-
# 3. After all the subdirectories are added:
502-
# a) The list of all targets from the accumulator is added as a dependency
503-
# of `all_link_complete`.
504-
#
505-
# All unit tests are similarly aggregated onto the target `all_unit_tests`.
489+
# All unit tests are aggregated onto the target `all_unit_tests`.
506490
#
507491
include(accumulator)
508492

509-
add_custom_target(all_link_complete)
510-
define_accumulator(object_library_compile_targets)
511-
512493
define_accumulator(unit_test_targets)
513494
#
514495
# This is the legacy position of this target declaration; it should appear in
@@ -592,14 +573,6 @@ if (TILEDB_TESTS)
592573
)
593574
endif()
594575

595-
# -------------------------------------------------------
596-
#
597-
# All the compile-targets from object library definitions are dependencies of
598-
# the `all_link_complete` phantom target.
599-
#
600-
retrieve_from(Compile_Targets ACCUMULATOR object_library_compile_targets)
601-
add_dependencies(all_link_complete ${Compile_Targets})
602-
603576
###########################################################
604577
# Uninstall
605578
###########################################################

cmake/object_library.cmake

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,6 @@ macro(TileDB_Environment_object_library_end)
184184
#
185185
#target_link_libraries(${TileDB_Environment_object_library_end_Library} PUBLIC configuration_definitions)
186186

187-
# Compile test
188-
add_executable(${TileDB_Environment_object_library_end_Compile} EXCLUDE_FROM_ALL)
189-
target_link_libraries(${TileDB_Environment_object_library_end_Compile} PRIVATE ${TileDB_Environment_object_library_end_Library})
190-
# Link assert since it is used everywhere (good)
191-
target_link_libraries(${TileDB_Environment_object_library_end_Compile} PRIVATE assert)
192-
# There must be a file named `test/compile_<object_library>_main.cc` for each object library.
193-
# TODO: Add explicit check for missing `..._main.cc` file.
194-
target_sources(${TileDB_Environment_object_library_end_Compile} PRIVATE
195-
test/${TileDB_Environment_object_library_end_Compile}_main.cc $<TARGET_OBJECTS:${TileDB_Environment_object_library_end_Library}>
196-
)
197-
# Append the current link-complete compile target to the complete list of them
198-
put_into(ACCUMULATOR object_library_compile_targets LIST ${TileDB_Environment_object_library_end_Compile})
199-
# ----------------------------------
200-
201187
message(${TileDB_Environment_object_library_end_Log_Level} "<<< object-library conclude end <<<")
202188
endmacro()
203189

cmake/unit_test.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ macro(TileDB_Environment_unit_test_end)
186186
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
187187
)
188188

189-
# Append the current link-complete compile target to the complete list of them
189+
# Append the current unit test target to the complete list of them
190190
put_into(ACCUMULATOR unit_test_targets LIST ${TileDB_Environment_unit_test_end_Unit_Test})
191191
# ----------------------------------
192192

scripts/ci/build_libtiledb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ cmake --build . -j4 --target install
3535

3636
ls -la
3737

38-
cmake --build . -j4 --target tiledb_unit unit_vfs tiledb_regression all_link_complete
38+
cmake --build . -j4 --target tiledb_unit unit_vfs tiledb_regression

test/support/test/compile_mem_helpers_main.cc

Lines changed: 0 additions & 34 deletions
This file was deleted.

test/support/test/compile_tdb_catch_main.cc

Lines changed: 0 additions & 34 deletions
This file was deleted.

tiledb/api/c_api/array/test/compile_capi_array_stub_main.cc

Lines changed: 0 additions & 35 deletions
This file was deleted.

tiledb/api/c_api/array_schema/test/compile_capi_array_schema_stub_main.cc

Lines changed: 0 additions & 35 deletions
This file was deleted.

tiledb/api/c_api/attribute/test/compile_capi_attribute_stub_main.cc

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)