CMake: include CTest to get BUILD_ENABLE

This commit is contained in:
nick black 2020-01-27 03:32:08 -05:00
parent 809caad8c0
commit eae259f3bc
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -372,6 +372,9 @@ target_compile_definitions(notcurses-view
endif()
# Testing
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest)
endif()
file(GLOB TESTSRCS CONFIGURE_DEPENDS tests/*.cpp)
add_executable(notcurses-tester ${TESTSRCS})
target_include_directories(notcurses-tester