Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-1.15] [c++] Set overriding user-provided prefix to be off by default #3489

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions libtiledbsoma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ option(TILEDB_WERROR "Enables the -Werror flag during compilation." OFF)
option(TILEDB_REMOVE_DEPRECATIONS "If true, do not build deprecated APIs." OFF)
option(TILEDB_SERIALIZATION "If true, enables building with support for query serialization" ON)
option(TILEDB_VERBOSE "If true, sets default logging to verbose for TileDB" OFF)
option(OVERRIDE_INSTALL_PREFIX "Ignores the setting of CMAKE_INSTALL_PREFIX and sets a default prefix" ON)
option(OVERRIDE_INSTALL_PREFIX "Ignores the setting of CMAKE_INSTALL_PREFIX and sets a default prefix" OFF)
option(ENABLE_ARROW_EXPORT "Installs an extra header for exporting in-memory results with Apache Arrow" ON)
option(TILEDB_LOG_OUTPUT_ON_FAILURE "If true, print error logs if dependency sub-project build fails" ON)
option(TILEDB_SANITIZER "Sanitizer to use in TILEDB. ")
Expand Down Expand Up @@ -122,7 +122,7 @@ endif()
#set(CMAKE_CXX_VISIBILITY_PRESET hidden)

# Root directory default installation prefix
if(OVERRIDE_INSTALL_PREFIX)
if(OVERRIDE_INSTALL_PREFIX OR NOT CMAKE_INSTALL_PREFIX)
set(PREFIX_REL_PATH "${CMAKE_SOURCE_DIR}/../dist")
get_filename_component(DEFAULT_PREFIX "${PREFIX_REL_PATH}" ABSOLUTE)
set(CMAKE_INSTALL_PREFIX "${DEFAULT_PREFIX}" CACHE PATH "Default install prefix" FORCE)
Expand Down
2 changes: 2 additions & 0 deletions scripts/bld
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ fi
# set installation path
if [ -n "${prefix}" ]; then
extra_opts+=" -DCMAKE_INSTALL_PREFIX=${prefix} -DOVERRIDE_INSTALL_PREFIX=OFF"
else
extra_opts+=" -DOVERRIDE_INSTALL_PREFIX=ON"
fi

# build with custom tiledb
Expand Down
2 changes: 2 additions & 0 deletions scripts/bld.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ if ($Configuration -eq 'Debug' -and $TileDBLocation -ne '') {

if ($Prefix -ne '') {
$ExtraOpts += " -DCMAKE_INSTALL_PREFIX=$Prefix -DOVERRIDE_INSTALL_PREFIX=OFF"
} else {
$ExtraOpts += " -DOVERRIDE_INSTALL_PREFIX=ON"
}

if ($TileDBLocation -ne '') {
Expand Down