summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Herrmann <fherrmann@de.adit-jv.com>2020-05-25 15:30:41 +0200
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2020-07-06 10:04:07 +0900
commitb100074e1fe1c80f57fe295b7f05d6186e279004 (patch)
tree5c227c5a982f5c41c21c7d792d288134a1cb0e94 /CMakeLists.txt
parent03a35d3d7d7730c881e5ac20a2087c0ab8914d47 (diff)
downloadDLT-daemon-b100074e1fe1c80f57fe295b7f05d6186e279004.tar.gz
execute unittests with cmake
now you can do make test after make :) === Sample build and test: $ cmake -Bbuild -H. \ -DDLT_IPC=UNIX_SOCKET \ -DWITH_DLT_ADAPTOR=ON \ -DWITH_DLT_UNIT_TESTS=ON \ -DWITH_DLT_CXX11_EXT=ON \ -DWITH_DLT_MONITOR=OFF \ -DWITH_DLT_USE_IPv6=OFF $ cd build $ make $ make test Running tests... Test project /home/fherrmann/git/dlt-daemon/build Start 1: gtest_dlt_common 1/5 Test #1: gtest_dlt_common ................. Passed 0.02 sec Start 2: gtest_dlt_user 2/5 Test #2: gtest_dlt_user ................... Passed 1.01 sec Start 3: gtest_dlt_daemon_common 3/5 Test #3: gtest_dlt_daemon_common .......... Passed 0.01 sec Start 4: dlt_env_ll_unit_test 4/5 Test #4: dlt_env_ll_unit_test ............. Passed 0.04 sec Start 5: gtest_dlt_daemon_event_handler 5/5 Test #5: gtest_dlt_daemon_event_handler ... Passed 1.01 sec 100% tests passed, 0 tests failed out of 5 Total Test time (real) = 2.09 sec === Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 4 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9c40cf..9d4f2ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,20 +13,15 @@
# For further information see http://www.genivi.org/.
#######
-cmake_minimum_required(VERSION 2.8.5)
-project(automotive-dlt)
+cmake_minimum_required(VERSION 3.3)
+project(automotive-dlt VERSION 2.18.4)
mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
include(GNUInstallDirs)
# Set version parameters
-set(DLT_MAJOR_VERSION 2)
-set(DLT_MINOR_VERSION 18)
-set(DLT_PATCH_LEVEL 4)
-set(DLT_VERSION ${DLT_MAJOR_VERSION}.${DLT_MINOR_VERSION}.${DLT_PATCH_LEVEL})
set(DLT_VERSION_STATE STABLE)
-set(DLT_REVISION "")
execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE DLT_REVISION
@@ -227,8 +222,9 @@ add_subdirectory(doc)
add_subdirectory(src)
add_subdirectory(include/dlt)
add_subdirectory(testscripts)
-if(WITH_DLT_UNIT_TESTS)
+if (WITH_DLT_UNIT_TESTS)
add_subdirectory( gtest-1.7.0 )
+ enable_testing()
add_subdirectory(tests)
endif()