aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-10-07 16:50:22 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2017-10-07 16:50:22 +0200
commitfa871ecba4333ffe9a96b0a662b9d77089cf69b7 (patch)
tree50184e30a8565ffc8ba9b023d961120388c57473 /CMakeLists.txt
parent544f69c3e8cd744db0b8f20aade475159fef1d5e (diff)
parentb4f6ee9ad0c4da26fe2003de68905c0365893778 (diff)
downloadlibnitrokey-3.0.tar.gz
libnitrokey-3.0.tar.bz2
Merge branch '71-failing_tests'v3.0
Closes #71
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 10 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d28425a..c868fae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,11 +127,18 @@ install (FILES ${LIB_INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libnitrok
install (TARGETS ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
install (TARGETS ${LIBNAME}-log DESTINATION ${CMAKE_INSTALL_LIBDIR})
-IF (COMPILE_TESTS)
- include_directories(unittest/Catch/include)
- add_library(catch STATIC unittest/catch_main.cpp )
+include_directories(unittest/Catch/include)
+add_library(catch STATIC unittest/catch_main.cpp )
+add_executable (test_offline unittest/test_offline.cc)
+target_link_libraries (test_offline ${EXTRA_LIBS} ${LIBNAME}-log catch)
+#run with 'make test' or 'ctest'
+include (CTest)
+add_test (runs test_offline)
+IF (COMPILE_TESTS)
+ #needs connected PRO device for success
+ #warning: it may delete data on the device
add_executable (test_C_API unittest/test_C_API.cpp)
target_link_libraries (test_C_API ${EXTRA_LIBS} ${LIBNAME}-log catch)
@@ -150,11 +157,6 @@ IF (COMPILE_TESTS)
add_executable (test_issues unittest/test_issues.cc)
target_link_libraries (test_issues ${EXTRA_LIBS} ${LIBNAME}-log catch)
- #run with 'make test' or 'ctest'
- #needs connected PRO device for success
- #warning: it may delete data on the device
- include (CTest)
- add_test (runs test_C_API)
ENDIF()