aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-11-14 17:55:00 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-11-14 17:55:00 +0100
commit6d5b2d6baf43d849163bec2f197c7c496e7c43fd (patch)
treed6e2da235cc158202d7b85b84107ce622d57202d /tests/CMakeLists.txt
parent6aa24a27e11e8a992d50a9e84e7a8bf70fe096a1 (diff)
downloadsocket_wrapper-6d5b2d6baf43d849163bec2f197c7c496e7c43fd.tar.gz
socket_wrapper-6d5b2d6baf43d849163bec2f197c7c496e7c43fd.tar.xz
socket_wrapper-6d5b2d6baf43d849163bec2f197c7c496e7c43fd.zip
cmake: Fix running tests on OSX.
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e5abd2c..ab55d07 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -7,11 +7,19 @@ include_directories(
)
add_cmocka_test(testsuite testsuite.c ${CMOCKA_LIBRARY} ${SWRAP_REQUIRED_LIBRARIES})
+if (OSX)
+set_property(
+ TEST
+ testsuite
+ PROPERTY
+ ENVIRONMENT DYLD_FORCE_FLAT_NAMESPACE=1;DYLD_INSERT_LIBRARIES=${CMAKE_BINARY_DIR}/src/libsocket_wrapper.dylib)
+else ()
set_property(
TEST
testsuite
PROPERTY
ENVIRONMENT LD_PRELOAD=${CMAKE_BINARY_DIR}/src/libsocket_wrapper.so)
+endif()
set_property(
TEST
testsuite