aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-09-10 09:07:06 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-09-10 09:07:06 +0200
commitb52d6f0c36fc9c9211364102f0353213c3b5f44b (patch)
treeef169ad04240ad4bb775b191a0140297a07d7e70 /tests/CMakeLists.txt
parentd589e51db6fce384bb23fa4314269d46833f0d21 (diff)
downloadcmocka-b52d6f0c36fc9c9211364102f0353213c3b5f44b.tar.gz
cmocka-b52d6f0c36fc9c9211364102f0353213c3b5f44b.tar.xz
cmocka-b52d6f0c36fc9c9211364102f0353213c3b5f44b.zip
cmake: Use modern cmake for buildng the tests
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt7
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2833c9f..d89a71e 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,11 +1,5 @@
project(tests C)
-include_directories(
- ${CMAKE_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${cmocka-headers_SOURCE_DIR}
-)
-
set(CMOCKA_TESTS
test_alloc
test_group_setup_assert
@@ -28,6 +22,7 @@ set(CMOCKA_TESTS
foreach(_CMOCKA_TEST ${CMOCKA_TESTS})
add_cmocka_test(${_CMOCKA_TEST} ${_CMOCKA_TEST}.c ${CMOCKA_STATIC_LIBRARY})
+ target_include_directories(${_CMOCKA_TEST} PRIVATE ${cmocka_BINARY_DIR})
target_compile_options(${_CMOCKA_TEST} PRIVATE ${DEFAULT_C_COMPILE_FLAGS})
endforeach()