From 5997aff8fc1c6480ddc91341916aea0001944a27 Mon Sep 17 00:00:00 2001 From: Theodore Tsirpanis Date: Wed, 3 Apr 2024 21:49:22 +0300 Subject: [PATCH] Always use vcpkg. (#4570) [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. --- .github/workflows/nightly-test.yml | 4 ++-- bootstrap | 9 --------- bootstrap.ps1 | 20 +------------------- cmake/Options/BuildOptions.cmake | 2 +- 4 files changed, 4 insertions(+), 31 deletions(-) diff --git a/.github/workflows/nightly-test.yml b/.github/workflows/nightly-test.yml index 323985d6450..d53b0d50faf 100644 --- a/.github/workflows/nightly-test.yml +++ b/.github/workflows/nightly-test.yml @@ -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 }} diff --git a/bootstrap b/bootstrap index 6060194bf98..a149b12b7e1 100755 --- a/bootstrap +++ b/bootstrap @@ -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. @@ -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) @@ -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" @@ -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"`;; @@ -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";; @@ -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";; @@ -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} \ diff --git a/bootstrap.ps1 b/bootstrap.ps1 index 7b3a98f63ca..03384495ec9 100644 --- a/bootstrap.ps1 +++ b/bootstrap.ps1 @@ -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. @@ -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. @@ -135,8 +128,6 @@ Param( [switch]$EnableReleaseSymbols, [switch]$EnableCoverage, [switch]$EnableVerbose, - [switch]$EnableVcpkg, - [switch]$DisableVcpkg, [switch]$EnableAzure, [switch]$EnableS3, [switch]$EnableGcs, @@ -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) { @@ -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" diff --git a/cmake/Options/BuildOptions.cmake b/cmake/Options/BuildOptions.cmake index 7baebff4d23..4bc86d5f733 100644 --- a/cmake/Options/BuildOptions.cmake +++ b/cmake/Options/BuildOptions.cmake @@ -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