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

Set RPATH for install target #588

Merged
merged 3 commits into from
Nov 29, 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
5 changes: 5 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Debug -- -j 4

- name: Install
shell: bash
working-directory: ${{runner.workspace}}/build
run: sudo make install

- name: Test CLI
shell: bash
working-directory: ${{runner.workspace}}/build
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ if (UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb") # Add debug info anyway
endif()

# modify RPATH when installing to a non-system directory (e.g. /usr/local).
# required to find libtbb with non-system libtbb.
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if(NOT PISA_SYSTEM_ONETBB AND "${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
endif()

find_package(OpenMP)
Expand Down
4 changes: 2 additions & 2 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ target_compile_options(FastPFor PRIVATE -Wno-cast-align)

# Add CLI11
if (NOT PISA_SYSTEM_CLI11 AND PISA_BUILD_TOOLS)
set(CLI11_TESTING OFF CACHE BOOL "skip trecpp testing")
set(CLI11_TESTING OFF CACHE BOOL "skip cli11 testing")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/CLI11 EXCLUDE_FROM_ALL)
endif()

Expand Down Expand Up @@ -113,7 +113,7 @@ if (NOT PISA_SYSTEM_ONETBB)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/oneTBB)
endif()

if (PISA_ENABLE_TESTING AND NOT PISA_SYSTEM_GOOGLE_BENCHMARK)
if (PISA_ENABLE_BENCHMARKING AND NOT PISA_SYSTEM_GOOGLE_BENCHMARK)
set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL "skip Google Benchmark testing")
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "skip Google Benchmark testing")
set(BENCHMARK_ENABLE_WERROR OFF CACHE BOOL "disable -Werror")
Expand Down
6 changes: 4 additions & 2 deletions test/cli/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# This script should be executed within the build directory that is directly
# in the project directory, e.g., /path/to/pisa/build

PISA_BIN="./bin"
export PATH="$PISA_BIN:$PATH"
command -v compress_inverted_index >/dev/null 2>&1 || {
echo >&2 "tools not available in default path"
exit 1
}

test_dir=${TEST_DIR:-../test}

Expand Down
2 changes: 0 additions & 2 deletions test/cli/test_count_postings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set +x

PISA_BIN="bin"
export PATH="$PISA_BIN:$PATH"
DIR=$(dirname "$0")

@test "Extract posting counts" {
Expand Down
2 changes: 0 additions & 2 deletions test/cli/test_taily_stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set +x

PISA_BIN="bin"
export PATH="$PISA_BIN:$PATH"
DIR=$(dirname "$0")

echo_int () {
Expand Down
3 changes: 0 additions & 3 deletions test/cli/test_wand_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

set +x

PISA_BIN="bin"
export PATH="$PISA_BIN:$PATH"

queries=$(cat <<HERE
301:International Organized Crime
302:Poliomyelitis and Post-Polio
Expand Down
Loading