summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-06-06 12:16:09 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-06-06 12:18:04 +0200
commit2963eba9a09ce56af0ee9b13b7b7cec2dca75ef2 (patch)
treee27075538c6dc1483cd97d13fa55894018caec92
parente75adb16d19b36c45ebd6911f6dbd810d564f803 (diff)
downloadsocket_wrapper-2963eba9a09ce56af0ee9b13b7b7cec2dca75ef2.tar.gz
socket_wrapper-2963eba9a09ce56af0ee9b13b7b7cec2dca75ef2.tar.xz
socket_wrapper-2963eba9a09ce56af0ee9b13b7b7cec2dca75ef2.zip
cmake: Rename options to UNIT_TESTING.
-rw-r--r--CMakeLists.txt4
-rw-r--r--DefineOptions.cmake2
-rw-r--r--tests/CMakeLists.txt2
3 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e89ac84..fbde205 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,8 +50,8 @@ configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# check subdirectories
add_subdirectory(src)
-if (WITH_TESTING)
+if (UNIT_TESTING)
find_package(CMocka REQUIRED)
include(AddCMockaTest)
add_subdirectory(tests)
-endif (WITH_TESTING)
+endif (UNIT_TESTING)
diff --git a/DefineOptions.cmake b/DefineOptions.cmake
index aca40a5..6030e79 100644
--- a/DefineOptions.cmake
+++ b/DefineOptions.cmake
@@ -1 +1 @@
-option(WITH_TESTING "Build with unit tests" OFF)
+option(UNIT_TESTING "Build with unit tests" OFF)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 545e2aa..dc845b9 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -10,4 +10,6 @@ add_cmocka_test(testsuite testsuite.c ${CMOCKA_LIBRARY})
set_tests_properties(
testsuite
PROPERTIES
+ ENVIRONMENT SOCKET_WRAPPER_DIR=${CMAKE_CURRENT_BINARY_DIR}
+ ENVIRONMENT SOCKET_WRAPPER_DEFAULT_IFACE=11
ENVIRONMENT LD_PRELOAD=${CMAKE_BINARY_DIR}/src/libsocket_wrapper.so)