From f23ce2260ebe522f5556809956d4284292a7614a Mon Sep 17 00:00:00 2001 From: armatusmiles <akurotych@gmail.com> Date: Sun, 15 Jul 2018 20:54:31 +0300 Subject: [PATCH] Add enable_testing() to CMake --- .travis.yml | 4 ++-- CMakeLists.txt | 4 +++- README.md | 4 ++-- test/CMakeLists.txt | 5 +++++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2dc9f85..c7001a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,8 @@ script: - mkdir build - cd build - cmake ../ - - make libdap-test - - ./test/libdap-test + - make + - make test addons: apt: diff --git a/CMakeLists.txt b/CMakeLists.txt index 6690137..06c50a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,8 @@ add_definitions ("-D_GNU_SOURCE") set(CMAKE_C_FLAGS "-std=c11 -Wall -Wextra") +enable_testing() + add_subdirectory(core) add_subdirectory(crypto) -add_subdirectory(test EXCLUDE_FROM_ALL) +add_subdirectory(test) diff --git a/README.md b/README.md index ea6f628..5f0611d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Deus Applications Prototypes: core library mkdir build cd build cmake ../ -make libdap-test -./test/libdap-test +make +make test ``` diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 415379a..e3c756d 100755 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,3 +20,8 @@ add_executable(${PROJECT_NAME} ${TEST_FILES} ${SRC} ${HEADERS}) target_link_libraries(${PROJECT_NAME} Qt5::Test) target_link_libraries(${PROJECT_NAME} dap_core) target_link_libraries(${PROJECT_NAME} dap_crypto) + +add_test( + NAME libdap-test + COMMAND libdap-test +) -- GitLab