Skip to content

Commit

Permalink
Another attempt at fixing the RPATH issue in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Sep 28, 2024
1 parent 53b091d commit ff3d7b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ jobs:
run: cmake --build out/build --parallel --config ${{ env.BUILD_TYPE }}

- name: Inspect build outputs
run: ls -lh out/build/bin/*
if: env.OPERATING_SYSTEM == 'linux'
run: |
ls -lh out/build/bin/*
(cd out/build/bin/* && for f in *; do echo $f; objdump -p $f | grep -P 'RUNPATH|RPATH'; done)
- name: Unit Tests
run: ctest --test-dir out/build --build-config ${{ env.BUILD_TYPE }} --output-on-failure
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${BUILD_TYPE} "${OUTPUT_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${BUILD_TYPE} "${OUTPUT_DIR}")

# Look for shared libs in the same directory as the executable when running tests
set(CMAKE_BUILD_RPATH "\$ORIGIN")
set(CMAKE_INSTALL_RPATH "\$ORIGIN")
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

# Find Git package, if not need to install manually or through .yml file
find_package(Git)
Expand Down

0 comments on commit ff3d7b7

Please sign in to comment.