From 2963eba9a09ce56af0ee9b13b7b7cec2dca75ef2 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 6 Jun 2013 12:16:09 +0200 Subject: cmake: Rename options to UNIT_TESTING. --- CMakeLists.txt | 4 ++-- DefineOptions.cmake | 2 +- tests/CMakeLists.txt | 2 ++ 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) -- cgit