introduce test building cmake arg

This commit is contained in:
itsmattkc 2024-11-04 20:36:29 -08:00
parent 00739b85b1
commit 99d5d2c8ef
3 changed files with 3 additions and 2 deletions

View file

@ -12,6 +12,7 @@ set(CMAKE_C_STANDARD 23)
OPTION(VANILLA_BUILD_DESKTOP "Build Qt app for Linux desktop" ON)
OPTION(VANILLA_BUILD_RPI "Build SDL2 app for Raspberry Pi" OFF)
OPTION(VANILLA_BUILD_TESTS "Build unit tests for Vanilla" OFF)
add_subdirectory(lib)
if (NOT ANDROID)

View file

@ -21,9 +21,9 @@ endif()
install(TARGETS vanilla)
if (0)
if (VANILLA_BUILD_TESTS)
add_executable(bittest
bittest.c
tests/bittest.c
)
target_link_libraries(bittest PRIVATE vanilla m)