Skip to content

Commit

Permalink
Always use vcpkg. (#4570)
Browse files Browse the repository at this point in the history
[SC-36911](https://app.shortcut.com/tiledb-inc/story/36911/remove-enable-vcpkg-options-from-cmake-command-line-and-bootstrap-scripts)

This PR changes the severity of the message when we configure with
`-DTILEDB_VCPKG=OFF` from a `DEPRECATION` to a `FATAL_ERROR`. This means
that using the legacy `ExternalProject`-based mechanism for acquiring
dependencies is no longer supported. The `ExternalProject` modules have
become dead code and will be removed in a subsequent PR.

---
TYPE: BUILD
DESC: Vcpkg is always enabled; turning the `TILEDB_VCPKG` option off is
no longer supported and fails.
  • Loading branch information
teo-tsirpanis authored Apr 3, 2024
1 parent eefea1f commit 5997aff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ jobs:
EXPERIMENTAL: ${{ matrix.experimental || 'OFF' }}
working-directory: ${{ matrix.working_directory || github.workspace }}
run: |
cmake -B build ${{ matrix.config != 'Debug' && '-DTILEDB_VCPKG=OFF' }} -DTILEDB_WERROR=ON -DTILEDB_SERIALIZATION=ON -DTILEDB_EXPERIMENTAL_FEATURES=$EXPERIMENTAL -DCMAKE_BUILD_TYPE=${{ matrix.config || 'Release' }} -DTILEDB_SANITIZER=$SANITIZER_ARG -DTILEDB_VCPKG_BASE_TRIPLET=${{ matrix.base_triplet }}
cmake -B build -DTILEDB_WERROR=ON -DTILEDB_SERIALIZATION=ON -DTILEDB_EXPERIMENTAL_FEATURES=$EXPERIMENTAL -DCMAKE_BUILD_TYPE=${{ matrix.config || 'Release' }} -DTILEDB_SANITIZER=$SANITIZER_ARG -DTILEDB_VCPKG_BASE_TRIPLET=${{ matrix.base_triplet }}
- name: Configure TileDB CMake (Windows)
if: contains(matrix.os, 'windows')
working-directory: ${{ matrix.working_directory || github.workspace }}
run: |
cmake -B build -S $env:GITHUB_WORKSPACE ${{ matrix.config != 'Debug' && '-DTILEDB_VCPKG=OFF' }} -DTILEDB_WERROR=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=${{ matrix.config || 'Release' }}
cmake -B build -S $env:GITHUB_WORKSPACE -DTILEDB_WERROR=ON -DTILEDB_SERIALIZATION=ON -DCMAKE_BUILD_TYPE=${{ matrix.config || 'Release' }}
- name: Build TileDB
working-directory: ${{ matrix.working_directory || github.workspace }}
Expand Down
9 changes: 0 additions & 9 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Configuration:
--prefix=PREFIX install files in tree rooted at PREFIX
['"${default_prefix}"']
--vcpkg-base-triplet=TRIPLET vcpkg base triplet to use when building with sanitizers
--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 shared.
Expand All @@ -49,7 +48,6 @@ Configuration:
--disable-stats disables internal TileDB statistics
--disable-avx2 disables use of AVX2 instructions
--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 (deprecated, use --linkage=static)
--enable-sanitizer=SAN enable sanitizer (clang only)
(address|memory|leak|thread|undefined)
Expand Down Expand Up @@ -90,7 +88,6 @@ Example:
# Parse arguments
prefix_dirs="${default_prefix}"
vcpkg_base_triplet=""
tiledb_vcpkg="ON"
dependency_dir="${default_dependency}"
sanitizer=""
build_type="Release"
Expand Down Expand Up @@ -122,8 +119,6 @@ while test $# != 0; do
prefix_dirs="$dir";;
--vcpkg-base-triplet=*) vcpkg_base_triplet=`arg "$1"`
vcpkg_base_triplet="-DTILEDB_VCPKG_BASE_TRIPLET=${vcpkg_base_triplet}";;
--enable-vcpkg) echo "Argument '--enable-vcpkg' is obsolete and will be removed in a future version. Vcpkg is now enabled by default."
tiledb_vcpkg="ON";;
--dependency=*) dir=`arg "$1"`
dependency_dir="$dir";;
--linkage=*) linkage=`arg "$1"`;;
Expand All @@ -135,7 +130,6 @@ while test $# != 0; do
--disable-stats) tiledb_stats="OFF";;
--disable-avx2) tiledb_disable_avx2="-DCOMPILER_SUPPORTS_AVX2=FALSE";;
--disable-webp) tiledb_build_webp="OFF";;
--disable-vcpkg) tiledb_vcpkg="OFF";;
--enable-assertions) tiledb_assertions="ON";;
--enable-debug) build_type="Debug";;
--enable-release-symbols) build_type="RelWithDebInfo";;
Expand Down Expand Up @@ -167,8 +161,6 @@ done
IFS=',' read -ra enables <<< "$enable_multiple"
for en in "${enables[@]}"; do
case "$en" in
vcpkg) echo "Argument '--enable-vcpkg' is obsolete and will be removed in a future version. Vcpkg is now enabled by default."
tiledb_vcpkg="ON";;
assertions) tiledb_assertions="ON";;
debug) build_type="Debug";;
release-symbols) build_type="RelWithDebInfo";;
Expand Down Expand Up @@ -239,7 +231,6 @@ ${cmake} -DCMAKE_BUILD_TYPE=${build_type} \
-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} \
-DTILEDB_HDFS=${tiledb_hdfs} \
Expand Down
20 changes: 1 addition & 19 deletions bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ Enable build with code coverage support.
.PARAMETER EnableVerbose
Enable verbose status messages.
.PARAMETER EnableVcpkg
Enables building dependencies with vcpkg.
Deprecated, this is now the default behavior.
.PARAMETER EnableAzure
Enables building with the Azure storage backend.
Expand Down Expand Up @@ -104,9 +100,6 @@ Disable building the TileDB tests.
.Parameter DisableStats
Disables internal TileDB statistics.
.PARAMETER DisableVcpkg
Disables building dependencies with vcpkg.
.PARAMETER BuildProcesses
Number of parallel compile jobs.
Expand Down Expand Up @@ -135,8 +128,6 @@ Param(
[switch]$EnableReleaseSymbols,
[switch]$EnableCoverage,
[switch]$EnableVerbose,
[switch]$EnableVcpkg,
[switch]$DisableVcpkg,
[switch]$EnableAzure,
[switch]$EnableS3,
[switch]$EnableGcs,
Expand Down Expand Up @@ -210,15 +201,6 @@ else {
$_RemoveDeprecations = "OFF"
}

# Set vcpkg flag
$UseVcpkg = "ON"
if ($EnableVcpkg.IsPresent) {
Write-Warning "-EnableVcpkg is deprecated and will be removed in a future version. Vcpkg is now enabled by default. Use -DisableVcpkg to disable it."
}
elseif ($DisableVcpkg.IsPresent) {
$UseVcpkg = "OFF"
}

# Set TileDB Azure flag
$UseAzure = "OFF"
if ($EnableAzure.IsPresent) {
Expand Down Expand Up @@ -348,7 +330,7 @@ if ($CMakeGenerator -eq $null) {

# Run CMake.
# We use Invoke-Expression so we can echo the command to the user.
$CommandString = "cmake $ArchFlag -DTILEDB_VCPKG=$UseVcpkg -DCMAKE_BUILD_TYPE=$BuildType -DCMAKE_INSTALL_PREFIX=""$InstallPrefix"" $VcpkgBaseTriplet -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_AWS_S3_CONFIG=$ConfigureS3 $GeneratorFlag ""$SourceDirectory"""
$CommandString = "cmake $ArchFlag -DCMAKE_BUILD_TYPE=$BuildType -DCMAKE_INSTALL_PREFIX=""$InstallPrefix"" $VcpkgBaseTriplet -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_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 @@ -49,7 +49,7 @@ if (DEFINED TILEDB_STATIC)
endif()

if (NOT TILEDB_VCPKG)
message(DEPRECATION "Disabling TILEDB_VCPKG is deprecated and will be removed in a future version.")
message(FATAL_ERROR "Disabling TILEDB_VCPKG is not supported.")
endif()

# enable assertions by default for debug builds
Expand Down

1 comment on commit 5997aff

@barracuda156
Copy link
Contributor

@barracuda156 barracuda156 commented on 5997aff May 9, 2024

Choose a reason for hiding this comment

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

@teo-tsirpanis It is undesirable to force a usage of a particular package manager.

Opened an issue re this: #4960

Please sign in to comment.