Skip to content

Commit

Permalink
Ensure dependencies are met for windows build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
greenliquidlight committed Nov 18, 2023
1 parent ef5b8a2 commit c7083ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.20)

# fetch google test to use for testing
include(FetchContent)

FetchContent_Declare(
Expand All @@ -10,10 +11,16 @@ FetchContent_Declare(

FetchContent_MakeAvailable(googletest)

# Add test executables
add_executable(self_test self_test.cpp)
add_executable(C_Callback_test test_C_Callback.cpp)

# Link against google test and the C_Callback library
target_link_libraries(self_test gtest_main)
target_link_libraries(C_Callback_test gtest_main C_Callback)

# Ensure that C_Callback is built before the tests
add_dependencies(C_Callback_test C_Callback)

add_test(NAME self_test COMMAND self_test)
add_test(NAME C_Callback_test COMMAND C_Callback_test)

0 comments on commit c7083ae

Please sign in to comment.