Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fb8139e
Remove `TILEDB_STATIC` and unify `tiledb_static` and `tiledb_shared`.
teo-tsirpanis Nov 20, 2023
35732e8
Add bootstrap script options to set `BUILD_SHARED_LIBS`.
teo-tsirpanis Nov 20, 2023
e04fd2d
Update the release script to build shared libraries.
teo-tsirpanis Nov 20, 2023
7b90b53
Add `TileDB::tiledb_static` and `TileDB::tiledb_shared` exported alia…
teo-tsirpanis Nov 20, 2023
841ae32
Compile the Win32 resources only when we build a shared library.
teo-tsirpanis Nov 21, 2023
05fe01c
Update CI workflows.
teo-tsirpanis Nov 21, 2023
ea075ab
Update comments.
teo-tsirpanis Nov 21, 2023
b332b87
Rename mentions of `TILEDB_CORE_OBJECTS_EXPORTS` to `tiledb_EXPORTS`.
teo-tsirpanis Nov 22, 2023
371f41c
Don't create a context in global scope in `quickstart_dense.cc`.
teo-tsirpanis Nov 24, 2023
908f4b2
Don't define the alias targets if they are already defined.
teo-tsirpanis Nov 24, 2023
4c91a24
List the files in build directory on failure.
teo-tsirpanis Nov 24, 2023
4a0ea34
Build, run and delete each example individually.
teo-tsirpanis Nov 27, 2023
1519711
Do not source `run-nix-examples.sh`.
teo-tsirpanis Nov 27, 2023
63ca096
Fix linker errors when building the benchmarks.
teo-tsirpanis Nov 28, 2023
1bbd6cc
Fix building the examples.
teo-tsirpanis Nov 28, 2023
6b4fcdd
Delete seemingly useless code.
teo-tsirpanis Nov 28, 2023
6663f3c
Fix name clashes with syscalls.
teo-tsirpanis Dec 5, 2023
a7eb4b7
Merge branch 'dev' into oriskany
teo-tsirpanis Dec 6, 2023
782a955
Address most PR feedback.
teo-tsirpanis Dec 6, 2023
94112e5
Fix outdated bootstrap script documentation.
teo-tsirpanis Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ env:
TILEDB_AZURE: OFF
TILEDB_GCS: OFF
TILEDB_SERIALIZATION: OFF
TILEDB_STATIC: OFF
TILEDB_TOOLS: ON
TILEDB_BASE_BOOTSTRAP_OPTIONS: '-EnableVerbose -EnableStaticTileDB'
TILEDB_BASE_BOOTSTRAP_OPTIONS: '-EnableVerbose'

jobs:
build:
Expand Down Expand Up @@ -155,10 +154,6 @@ jobs:
if ($env:TILEDB_SERIALIZATION -eq "ON") {
$bootstrapOptions = "-EnableSerialization " + $bootstrapOptions
}
# static already added above as initial default
# if ($env:TILEDB_STATIC -eq "ON") {
# $bootstrapOptions = $bootstrapOptions + " -EnableStaticTileDB"
# }
# if ($env:TILEDB_HDFS -eq "ON") {
# $bootstrapOptions = $bootstrapOptions + " -EnableHDFS"
#}
Expand Down Expand Up @@ -392,11 +387,6 @@ jobs:
Write-Host "cmd: '$cmd'"
Invoke-Expression $cmd

#.\$CMakeBuildType\ExampleExe_static.exe
$cmd = ".\$CMakeBuildType\ExampleExe_static.exe"
Write-Host "cmd: '$cmd'"
Invoke-Expression $cmd

- name: Packaging test
shell: pwsh
run: |
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci-linux_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ jobs:

###################################################
# Build and run Examples
make -C $GITHUB_WORKSPACE/build -j3 examples
source $GITHUB_WORKSPACE/scripts/run-nix-examples.sh
# The following script must not be sourced.
# It relies on finding its source directory.
$GITHUB_WORKSPACE/scripts/run-nix-examples.sh

###################################################
# Build benchmark code
Expand All @@ -216,6 +217,10 @@ jobs:
if: ${{ failure() && startsWith(matrix.os, 'ubuntu-') == true }} # only run this job if the build step failed
run: ./scripts/ci/posix/dump-core-stacks.sh

- name: List files in build directory on failure
run: du --exclude _deps -h $GITHUB_WORKSPACE/build
if: ${{ failure() }}

- name: 'Upload failure artifacts (Linux)' # https://github.com/actions/upload-artifact#where-does-the-upload-go
if: ${{ startsWith(matrix.os, 'ubuntu-') == true }} # only run this job if the build step failed
uses: actions/upload-artifact@v3
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/mingw-w64-tiledb/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ build() {
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DTILEDB_STATIC=ON \
-DTILEDB_TESTS=OFF \
-DTILEDB_S3=ON \
-DCOMPILER_SUPPORTS_AVX2=OFF \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ jobs:
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=./dist \
-DTILEDB_S3=ON \
-DTILEDB_AZURE=ON \
-DTILEDB_GCS=ON \
-DTILEDB_HDFS=${{ startsWith(matrix.platform, 'windows') && 'OFF' || 'ON' }} \
-DTILEDB_SERIALIZATION=ON \
-DTILEDB_WEBP=ON \
-DTILEDB_STATIC=OFF \
-DTILEDB_TESTS=OFF \
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
${{ matrix.cmake_args }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/unit-test-runs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ env:
TILEDB_AZURE: OFF
TILEDB_GCS: OFF
TILEDB_SERIALIZATION: ON
TILEDB_STATIC: ON
TILEDB_TOOLS: ON
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'

Expand Down Expand Up @@ -59,8 +58,7 @@ jobs:
-DTILEDB_GCS=${TILEDB_GCS} \
-DTILEDB_S3=${TILEDB_S3} \
-DTILEDB_SERIALIZATION=${TILEDB_SERIALIZATION} \
-DTILEDB_ASSERTIONS=${TILEDB_ASSERTIONS} \
-DTILEDB_STATIC=${TILEDB_STATIC}
-DTILEDB_ASSERTIONS=${TILEDB_ASSERTIONS}
make -j4
# Build all unit tests
make -C tiledb tests -j4
Expand Down
30 changes: 24 additions & 6 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Configuration:
--enable-vcpkg use vcpkg for downloading and building dependencies
--dependency=DIRs specify the dependencies at DIRs, separated by colon
['"${default_dependency}"']
--linkage specify the linkage of tiledb. Defaults to static.
[static|shared]
--force-build-all-deps force building of all dependencies, even those
already installed at system-level
--remove-deprecations build TileDB without any deprecated APIs
Expand All @@ -45,9 +47,9 @@ Configuration:
--disable-tests disables building the TileDB tests
--disable-stats disables internal TileDB statistics
--disable-avx2 disables use of AVX2 instructions
--disable-webp disables building of webp library and linkage test
--disable-webp disables building of webp library
--disable-vcpkg disables use of vcpkg for downloading and building dependencies
--enable-static-tiledb enables building TileDB as a static library
--enable-static-tiledb enables building TileDB as a static library (deprecated, use --linkage=static)
--enable-sanitizer=SAN enable sanitizer (clang only)
(address|memory|leak|thread|undefined)
--enable-debug enable debug build
Expand Down Expand Up @@ -101,7 +103,7 @@ tiledb_cpp_api="ON"
tiledb_force_all_deps="OFF"
tiledb_remove_deprecations="OFF"
tiledb_stats="ON"
tiledb_static="OFF"
build_shared_libs="OFF"
tiledb_disable_avx2=""
tiledb_assertions="OFF"
tiledb_serialization="OFF"
Expand All @@ -121,6 +123,7 @@ while test $# != 0; do
tiledb_vcpkg="ON";;
--dependency=*) dir=`arg "$1"`
dependency_dir="$dir";;
--linkage=*) linkage=`arg "$1"`;;
--force-build-all-deps) tiledb_force_all_deps="ON";;
--remove-deprecations) tiledb_remove_deprecations="ON";;
--disable-werror) tiledb_werror="OFF";;
Expand All @@ -140,7 +143,8 @@ while test $# != 0; do
--enable-azure) tiledb_azure="ON";;
--enable-gcs) tiledb_gcs="ON";;
--enable-serialization) tiledb_serialization="ON";;
--enable-static-tiledb) tiledb_static="ON";;
--enable-static-tiledb) echo "Argument '--enable-static-tiledb' is obsolete and will be removed in a future version. TileDB is now built as a static library by default and linkage is controlled with the --linkage option."
enable_static_tiledb="ON";;
--enable-sanitizer=*) san=`arg "$1"`
sanitizer="$san";;
--enable-tools) tiledb_tools="ON";;
Expand Down Expand Up @@ -176,7 +180,8 @@ for en in "${enables[@]}"; do
ccache) tiledb_ccache="ON";;
arrow-tests) tiledb_arrow_tests="ON";;
hdfs) tiledb_hdfs="ON";;
static-tiledb) tiledb_static="ON";;
static-tiledb) echo "Argument '--enable-static-tiledb' is obsolete and will be removed in a future version. TileDB is now built as a static library by default and linkage is controlled with the --linkage option."
enable_static_tiledb="ON";;
experimental-features) tiledb_experimental_features="ON";;
rest-tests) tiledb_tests_enable_rest="ON";;
aws-s3-config) tiledb_tests_aws_s3_config="ON";;
Expand All @@ -188,6 +193,19 @@ if [ "${source_dir}" = "${binary_dir}" ]; then
die "cannot build the project in the source directory! Out-of-source build is enforced!"
fi

if [ "${linkage}" = "static" ] || [ "${linkage}" = "" ]; then
build_shared_libs="OFF"
elif [ "${linkage}" = "shared" ]; then
build_shared_libs="ON"
else
die "unknown linkage: ${linkage}"
fi

# Fail if both --linkage=shared and --enable-static-tiledb are specified
if [ "${build_shared_libs}" = "ON" ] && [ "${enable_static_tiledb}" = "ON" ]; then
die "cannot specify both --linkage=shared and --enable-static-tiledb"
fi

# Check clang compiler
if [[ x"${CC}" = x"" ]]; then
CC=gcc
Expand Down Expand Up @@ -219,6 +237,7 @@ ${cmake} -DCMAKE_BUILD_TYPE=${build_type} \
-DCMAKE_C_COMPILER="${c_compiler}" \
-DCMAKE_CXX_COMPILER="${cxx_compiler}" \
-DCMAKE_PREFIX_PATH="${dependency_dir}" \
-DBUILD_SHARED_LIBS=${build_shared_libs} \
-DTILEDB_VCPKG=${tiledb_vcpkg} \
-DTILEDB_ASSERTIONS=${tiledb_assertions} \
-DTILEDB_VERBOSE=${tiledb_verbose} \
Expand All @@ -231,7 +250,6 @@ ${cmake} -DCMAKE_BUILD_TYPE=${build_type} \
-DTILEDB_WERROR=${tiledb_werror} \
-DTILEDB_CPP_API=${tiledb_cpp_api} \
-DTILEDB_STATS=${tiledb_stats} \
-DTILEDB_STATIC=${tiledb_static} \
-DTILEDB_TESTS=${tiledb_tests} \
-DTILEDB_CCACHE=${tiledb_ccache} \
-DTILEDB_ARROW_TESTS=${tiledb_arrow_tests} \
Expand Down
24 changes: 21 additions & 3 deletions bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Installs files in tree rooted at PREFIX (defaults to TileDB\dist).
.PARAMETER Dependency
Semicolon separated list to binary dependencies.

.PARAMETER Linkage
Specify the linkage type to build TileDB with. Valid values are
"static" and "shared". Default is "static".

.PARAMETER CMakeGenerator
Optionally specify the CMake generator string, e.g. "Visual Studio 15
2017". Check 'cmake --help' for a list of supported generators.
Expand Down Expand Up @@ -58,6 +62,7 @@ Enables building with serialization support.

.PARAMETER EnableStaticTileDB
Enables building TileDB as a static library.
Deprecated, use -Linkage static instead.

.PARAMETER EnableBuildDeps
Enables building TileDB dependencies from source (superbuild)
Expand Down Expand Up @@ -113,6 +118,7 @@ https://github.com/TileDB-Inc/TileDB
Param(
[string]$Prefix,
[string]$Dependency,
[string]$Linkage = "static",
[string]$CMakeGenerator,
[switch]$EnableAssert,
[switch]$EnableDebug,
Expand Down Expand Up @@ -240,9 +246,21 @@ if ($DisableWebP.IsPresent) {
$BuildWebP="OFF"
}

$TileDBStatic = "OFF";
$BuildSharedLibs = "OFF";
if ($Linkage -eq "shared") {
$BuildSharedLibs = "ON"
}
elseif ($Linkage -ne "static") {
Write-Error "Invalid linkage type: $Linkage. Valid values are 'static' and 'shared'."
exit 1
}

if ($EnableStaticTileDB.IsPresent) {
$TileDBStatic = "ON"
Write-Warning "-EnableStaticTileDB is deprecated and will be removed in a future version. TileDB is now built as a static library by default. Use -Linkage shared to build a shared library."
if ($Linkage -eq "shared") {
Write-Error "Cannot specify -EnableStaticTileDB alongside -Linkage shared."
exit 1
}
}

$TileDBTools = "OFF";
Expand Down Expand Up @@ -308,7 +326,7 @@ if ($CMakeGenerator -eq $null) {

# Run CMake.
# We use Invoke-Expression so we can echo the command to the user.
$CommandString = "cmake -A X64 -DTILEDB_VCPKG=$UseVcpkg -DCMAKE_BUILD_TYPE=$BuildType -DCMAKE_INSTALL_PREFIX=""$InstallPrefix"" -DCMAKE_PREFIX_PATH=""$DependencyDir"" -DMSVC_MP_FLAG=""/MP$BuildProcesses"" -DTILEDB_ASSERTIONS=$AssertionMode -DTILEDB_VERBOSE=$Verbosity -DTILEDB_AZURE=$UseAzure -DTILEDB_S3=$UseS3 -DTILEDB_GCS=$UseGcs -DTILEDB_SERIALIZATION=$UseSerialization -DTILEDB_WERROR=$Werror -DTILEDB_CPP_API=$CppApi -DTILEDB_TESTS=$Tests -DTILEDB_STATS=$Stats -DTILEDB_STATIC=$TileDBStatic -DTILEDB_FORCE_ALL_DEPS=$TileDBBuildDeps -DTILEDB_REMOVE_DEPRECATIONS=$RemoveDeprecations -DTILEDB_TOOLS=$TileDBTools -DTILEDB_EXPERIMENTAL_FEATURES=$TileDBExperimentalFeatures -DTILEDB_WEBP=$BuildWebP -DTILEDB_CRC32=$BuildCrc32 -DTILEDB_ARROW_TESTS=$ArrowTests -DTILEDB_TESTS_ENABLE_REST=$RestTests -DTILEDB_TESTS_AWS_S3_CONFIG=$ConfigureS3 $GeneratorFlag ""$SourceDirectory"""
$CommandString = "cmake -A X64 -DTILEDB_VCPKG=$UseVcpkg -DCMAKE_BUILD_TYPE=$BuildType -DCMAKE_INSTALL_PREFIX=""$InstallPrefix"" -DCMAKE_PREFIX_PATH=""$DependencyDir"" -DMSVC_MP_FLAG=""/MP$BuildProcesses"" -DTILEDB_ASSERTIONS=$AssertionMode -DTILEDB_VERBOSE=$Verbosity -DTILEDB_AZURE=$UseAzure -DTILEDB_S3=$UseS3 -DTILEDB_GCS=$UseGcs -DTILEDB_SERIALIZATION=$UseSerialization -DTILEDB_WERROR=$Werror -DTILEDB_CPP_API=$CppApi -DTILEDB_TESTS=$Tests -DTILEDB_STATS=$Stats -DBUILD_SHARED_LIBS=$BuildSharedLibs -DTILEDB_FORCE_ALL_DEPS=$TileDBBuildDeps -DTILEDB_REMOVE_DEPRECATIONS=$RemoveDeprecations -DTILEDB_TOOLS=$TileDBTools -DTILEDB_EXPERIMENTAL_FEATURES=$TileDBExperimentalFeatures -DTILEDB_WEBP=$BuildWebP -DTILEDB_CRC32=$BuildCrc32 -DTILEDB_ARROW_TESTS=$ArrowTests -DTILEDB_TESTS_ENABLE_REST=$RestTests -DTILEDB_TESTS_AWS_S3_CONFIG=$ConfigureS3 $GeneratorFlag ""$SourceDirectory"""
Write-Host $CommandString
Write-Host
Invoke-Expression "$CommandString"
Expand Down
2 changes: 1 addition & 1 deletion cmake/Options/BuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ option(TILEDB_ASSERTIONS "Build with assertions enabled (default off for release
option(TILEDB_CPP_API "Enables building of the TileDB C++ API." ON)
option(TILEDB_CMAKE_IDE "(Used for CLion builds). Disables superbuild and sets the EP install dir." OFF)
option(TILEDB_STATS "Enables internal TileDB statistics gathering." ON)
option(TILEDB_STATIC "Enables building TileDB as a static library." OFF)
option(BUILD_SHARED_LIBS "Enables building TileDB as a shared library." OFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as in the bootstrap scripts, this would be better as a "static" or "shared" rather than boolean.

See https://stackoverflow.com/questions/8709877/cmake-string-options for how to do this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUILD_SHARED_LIBS is a standard CMake variable. I don't think it's a good idea to specify linkage in a different way.

Copy link
Contributor

@eric-hughes-tiledb eric-hughes-tiledb Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUILD_SHARED_LIBS is a standard CMake variable.

OK.

option(TILEDB_TESTS "If true, enables building the TileDB unit test suite" ON)
option(TILEDB_TOOLS "If true, enables building the TileDB tools" OFF)
option(TILEDB_SERIALIZATION "If true, enables building with support for query serialization" OFF)
Expand Down
2 changes: 1 addition & 1 deletion cmake/TileDB-Superbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ list(JOIN CMAKE_PREFIX_PATH "|" CMAKE_PREFIX_PATH_STR)

# Forward any additional CMake args to the non-superbuild.
set(INHERITED_CMAKE_ARGS
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH_STR}
-DCMAKE_BUILD_TYPE=$<CONFIG>
Expand All @@ -47,7 +48,6 @@ set(INHERITED_CMAKE_ARGS
-DSANITIZER=${SANITIZER}
-DTILEDB_EP_BASE=${TILEDB_EP_BASE}
-DTILEDB_STATS=${TILEDB_STATS}
-DTILEDB_STATIC=${TILEDB_STATIC}
-DTILEDB_TESTS=${TILEDB_TESTS}
-DTILEDB_TOOLS=${TILEDB_TOOLS}
-DTILEDB_SERIALIZATION=${TILEDB_SERIALIZATION}
Expand Down
15 changes: 11 additions & 4 deletions cmake/inputs/Config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#
# This file attempts to locate the TileDB library. If found, the following
# imported targets are created:
# - TileDB::tiledb_shared
# - TileDB::tiledb_static
# - TileDB::tiledb (points to either a static or shared library)
# - TileDB::tiledb_shared (if TileDB is built as a shared library)
# - TileDB::tiledb_static (if TileDB is built as a static library)
# And the following variables are defined:
# - TILEDB_FOUND
# - TileDB_FOUND
#

@PACKAGE_INIT@

if(@TILEDB_STATIC@) # TILEDB_STATIC
if(NOT @BUILD_SHARED_LIBS@) # NOT BUILD_SHARED_LIBS
include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(BZip2)
Expand Down Expand Up @@ -43,9 +44,15 @@ endif()
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")

if(@BUILD_SHARED_LIBS@ AND NOT TARGET TileDB::tiledb_shared) # BUILD_SHARED_LIBS AND NOT TARGET TileDB::tiledb_shared
add_library(TileDB::tiledb_shared ALIAS TileDB::tiledb)
elseif(NOT TARGET TileDB::tiledb_static)
add_library(TileDB::tiledb_static ALIAS TileDB::tiledb)
endif()

# Define a convenience all-caps variable
if (NOT DEFINED TILEDB_FOUND)
if (TARGET TileDB::tiledb_shared)
if (TARGET TileDB::tiledb)
set(TILEDB_FOUND TRUE)
else()
set(TILEDB_FOUND FALSE)
Expand Down
25 changes: 2 additions & 23 deletions examples/c_api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,12 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF) # Don't use GNU extensions

# Add custom target 'examples_c'
add_custom_target(examples_c DEPENDS tiledb_shared)

if (TILEDB_STATIC)
add_custom_target(static_examples_c DEPENDS tiledb_static)
endif()
add_custom_target(examples_c)

# Function that builds an executable per example
function(build_TileDB_example_capi TARGET)
add_executable(${TARGET}_c EXCLUDE_FROM_ALL ${TARGET}.c)
target_link_libraries(${TARGET}_c PUBLIC local_install tiledb_shared)
target_link_libraries(${TARGET}_c PUBLIC local_install tiledb)
if (NOT WIN32)
# On Linux, must explicitly link -lpthread -ldl in order for static linking
# to libzstd or libcurl to work.
Expand All @@ -49,20 +45,6 @@ function(build_TileDB_example_capi TARGET)
add_dependencies(examples_c ${TARGET}_c)
endfunction()

function(build_TileDB_static_example_capi TARGET)
add_executable(static_${TARGET}_c EXCLUDE_FROM_ALL ${TARGET}.c)
target_include_directories(static_${TARGET}_c PUBLIC
"${CMAKE_CURRENT_BINARY_DIR}/../"
)
target_link_libraries(static_${TARGET}_c tiledb_static)
if (NOT WIN32)
# On Linux, must explicitly link -lpthread -ldl in order for static linking
# to libzstd or libcurl to work.
target_link_libraries(static_${TARGET}_c pthread dl)
endif()
add_dependencies(static_examples_c static_${TARGET}_c)
endfunction()

# Get the example sources
file(GLOB TILEDB_EXAMPLE_SOURCES_CAPI "*.c")

Expand All @@ -80,7 +62,4 @@ foreach(EXAMPLE_SOURCE ${TILEDB_EXAMPLE_SOURCES_CAPI})

# Build example executable
build_TileDB_example_capi(${EXAMPLE_BIN})
if (TILEDB_STATIC)
build_TileDB_static_example_capi(${EXAMPLE_BIN})
endif()
endforeach()
Loading