Skip to content

Commit

Permalink
Merge pull request #4 from NordSecurity/runner_threading
Browse files Browse the repository at this point in the history
Explicitly include threading libraries for tests
  • Loading branch information
Lipt0nas authored Nov 27, 2023
2 parents c7ec652 + 9c22f70 commit 21941b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cpp-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set(CMAKE_CXX_STANDARD 20)
include(CTest)
enable_testing()

find_package(Threads REQUIRED)

set(BINDINGS_BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../target/debug)
set(BINDINGS_SRC_DIR ${BINDINGS_BUILD_DIR}/bindings)

Expand All @@ -13,7 +15,7 @@ add_executable(${TEST_NAME}-test tests/${TEST_NAME}/main.cpp ${BINDINGS_SRC_DIR}

target_include_directories(${TEST_NAME}-test PRIVATE ${BINDINGS_SRC_DIR} tests/include)
target_link_directories(${TEST_NAME}-test PRIVATE ${BINDINGS_BUILD_DIR})
target_link_libraries(${TEST_NAME}-test uniffi_bindgen_cpp_fixtures)
target_link_libraries(${TEST_NAME}-test uniffi_bindgen_cpp_fixtures Threads::Threads)

add_test(NAME ${TEST_NAME}-test COMMAND ${TEST_NAME}-test)

Expand Down

0 comments on commit 21941b7

Please sign in to comment.