Skip to content

Commit

Permalink
chore: Add cmake flag to disable unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Mar 25, 2024
1 parent 0ec4978 commit aae4b16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ endif()
option(BUILD_MISC_TESTS "Build additional tests" OFF)
option(BUILD_FUN_UTILS "Build additional just for fun utilities" OFF)

option(UNITTEST "Enable unit tests (disable if you don't have a working gmock or gtest)" ON)

option(AUTOTEST "Enable autotests (mainly for CI)" OFF)
if(AUTOTEST)
option(NON_HERMETIC_TESTS "Whether to build and run tests that depend on an internet connection" OFF)
Expand Down Expand Up @@ -534,7 +536,7 @@ endfunction()

# The actual unit tests follow.
#
if(TARGET GTest::gtest AND TARGET GTest::gmock)
if(UNITTEST AND TARGET GTest::gtest AND TARGET GTest::gmock)
unit_test(toxav ring_buffer)
unit_test(toxav rtp)
unit_test(toxcore DHT)
Expand Down

0 comments on commit aae4b16

Please sign in to comment.