tester: fix compilation on iOS

parent 8618bb69
......@@ -20,22 +20,28 @@
#
############################################################################
if(ENABLE_STATIC)
set(PROJECT_LIBS bctoolbox-static bctoolbox-tester-static)
else()
set(PROJECT_LIBS bctoolbox bctoolbox-tester)
endif()
if(CUNIT_FOUND)
set(TESTER_SOURCES
bctoolbox_tester.c
bctoolbox_tester.h
containers.cc
)
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
add_executable(bctoolbox_tester_exe ${TESTER_SOURCES})
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(bctoolbox_tester_exe PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
set_target_properties(bctoolbox_tester_exe PROPERTIES OUTPUT_NAME bctoolbox_tester)
target_include_directories(bctoolbox_tester_exe PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(bctoolbox_tester_exe ${BCTOOLBOX_TESTER_LIBRARIES} bctoolbox bctoolbox-tester)
target_link_libraries(bctoolbox_tester_exe ${BCTOOLBOX_TESTER_LIBRARIES} ${PROJECT_LIBS})
set_target_properties(bctoolbox_tester_exe PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
add_test(NAME bctoolbox_tester COMMAND bctoolbox_tester --verbose)
endif()
/*
bctoolbox
bctoolbox
Copyright (C) 2016 Belledonne Communications SARL
This program is free software: you can redistribute it and/or modify
......@@ -68,7 +68,7 @@ int bctoolbox_tester_set_log_file(const char *filename) {
}
#if !defined(ANDROID) && !defined(TARGET_OS_IPHONE) && !(defined(BCTBX_WINDOWS_PHONE) || defined(BCTBX_WINDOWS_UNIVERSAL))
#if !defined(ANDROID) && !(defined(BCTBX_WINDOWS_PHONE) || defined(BCTBX_WINDOWS_UNIVERSAL))
static const char* bctoolbox_helper =
"\t\t\t--verbose\n"
......@@ -78,7 +78,7 @@ static const char* bctoolbox_helper =
int main (int argc, char *argv[]) {
int i;
int ret;
bctoolbox_tester_init(NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment