Remove unnecessary CMake modules and fixup os/CMakeLists.txt

Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
This commit is contained in:
Jeroen Koekkoek 2018-12-20 16:26:15 +01:00
parent 1990007614
commit e25656a4c5
39 changed files with 406 additions and 210 deletions

View file

@ -9,10 +9,11 @@
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#
find_package(Abstraction REQUIRED)
add_executable(ddsls ddsls.c)
target_link_libraries(ddsls ddsc OSAPI)
if(WIN32)
target_compile_definitions(ddsls PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
install(
TARGETS ddsls

View file

@ -9,14 +9,10 @@
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#
find_package(Abstraction REQUIRED)
add_executable(pubsub pubsub.c common.c testtype.c porting.c)
target_link_libraries(pubsub ddsc OSAPI)
# TODO: improve test inclusion.
if((BUILD_TESTING) AND ((NOT DEFINED MSVC_VERSION) OR (MSVC_VERSION GREATER "1800")))
add_subdirectory(tests)
if(WIN32)
target_compile_definitions(pubsub PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
install(

0
src/tools/pubsub/common.c Executable file → Normal file
View file

0
src/tools/pubsub/common.h Executable file → Normal file
View file

0
src/tools/pubsub/porting.c Executable file → Normal file
View file

0
src/tools/pubsub/porting.h Executable file → Normal file
View file

0
src/tools/pubsub/pubsub.c Executable file → Normal file
View file

View file

@ -1,15 +0,0 @@
#
# Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
# v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#
include(CUnit)
add_cunit_executable(CUnit_tools_pubsub ../common.c ../testtype.c ../porting.c basic.c)
target_link_libraries(CUnit_tools_pubsub util CycloneDDS::ddsc)

View file

@ -1,25 +0,0 @@
/*
* Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
* v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
#include "CUnit/Test.h"
#define MAIN test_main
#include "../pubsub.c"
CU_Test(tools_pubsub, main) {
char *argv[] = {"pubsub", "-T", "pubsubTestTopic", "-K", "KS", "-w1:1", "-D", "1", "-q", "t:d=t,r=r", "pubsub_partition"};
int argc = sizeof(argv) / sizeof(char*);
int result = MAIN(argc, argv);
if (result != 0)
printf("exitcode was %d\n", result);
CU_ASSERT_EQUAL_FATAL(result, 0);
}

0
src/tools/pubsub/testtype.c Executable file → Normal file
View file

0
src/tools/pubsub/testtype.h Executable file → Normal file
View file

0
src/tools/pubsub/tglib.h Executable file → Normal file
View file