Skip to content

Commit

Permalink
chore: Link with librt on Linux in test main for Boost.Interprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
Tradias committed Jul 26, 2024
1 parent faeafdc commit 01ab6a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
run: cmake --preset default -B ${{ github.workspace }}/build-8 -DCMAKE_CXX_COMPILER=$(which g++-8) -DASIO_GRPC_ENABLE_CMAKE_INSTALL_TEST=off -DVCPKG_INSTALLED_DIR=${{ runner.workspace }}/vcpkg_installed -DVCPKG_TARGET_TRIPLET=${{ env.TRIPLET }} -DASIO_GRPC_ENABLE_IO_URING_EXAMPLES=off -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold ${{ env.CMAKE_ARGS }}

- name: GCC 8 Build
run: cmake --build ${{ github.workspace }}/build-8 --config Release --parallel $(nproc) --verbose
run: cmake --build ${{ github.workspace }}/build-8 --config Release --parallel $(nproc)

- name: GCC 8 Test
run: ctest ${{ env.CTEST_ARGS }} --test-dir ${{ github.workspace }}/build-8 -C Release
Expand Down
3 changes: 1 addition & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
{
"name": "default",
"configurePreset": "default",
"configuration": "Debug",
"verbose": true
"configuration": "Debug"
}
],
"testPresets": [
Expand Down
3 changes: 2 additions & 1 deletion test/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ function(asio_grpc_add_test_main _asio_grpc_name _asio_grpc_cxx_standard)
${_asio_grpc_name}
PUBLIC doctest::doctest GTest::gmock asio-grpc-compile-options${_asio_grpc_cxx_standard}
asio-grpc-test-protos${_asio_grpc_cxx_standard} asio-grpc-coverage-options
PRIVATE Boost::headers Boost::filesystem)
PRIVATE Boost::headers Boost::filesystem $<$<PLATFORM_ID:Linux>:rt> # for Boost.Interprocess
)
endfunction()

set_source_files_properties("utils/main.cpp" PROPERTIES SKIP_UNITY_BUILD_INCLUSION on)
Expand Down

0 comments on commit 01ab6a6

Please sign in to comment.