2018-04-10 17:03:59 +02:00
|
|
|
#
|
|
|
|
# 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 (GenerateExportHeader)
|
|
|
|
|
|
|
|
PREPEND(srcs_util "${CMAKE_CURRENT_SOURCE_DIR}/src" ut_avl.c ut_crc.c ut_expand_envvars.c ut_fibheap.c ut_handleserver.c ut_hopscotch.c ut_thread_pool.c ut_xmlparser.c)
|
2018-12-20 16:26:15 +01:00
|
|
|
|
2019-01-18 14:10:19 +01:00
|
|
|
add_library(util ${srcs_util})
|
2019-01-18 14:16:16 +01:00
|
|
|
set_property(TARGET util PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
2018-12-20 16:26:15 +01:00
|
|
|
|
2019-01-18 14:10:19 +01:00
|
|
|
generate_export_header(
|
|
|
|
util
|
|
|
|
BASE_NAME
|
|
|
|
dds
|
|
|
|
EXPORT_FILE_NAME
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/include/dds/export.h")
|
|
|
|
|
|
|
|
# util must NOT link with ddsrt to avoid duplicate symbols in ddsc!
|
|
|
|
# ddsrt include directories are required though.
|
2018-12-20 16:26:15 +01:00
|
|
|
target_include_directories(
|
2019-01-18 14:10:19 +01:00
|
|
|
util
|
|
|
|
PUBLIC
|
|
|
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
|
|
|
PRIVATE
|
|
|
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
|
|
|
|
"$<BUILD_INTERFACE:$<TARGET_PROPERTY:ddsrt,INTERFACE_INCLUDE_DIRECTORIES>>")
|
2018-04-10 17:03:59 +02:00
|
|
|
|
|
|
|
# TODO: improve test inclusion.
|
|
|
|
if((BUILD_TESTING) AND ((NOT DEFINED MSVC_VERSION) OR (MSVC_VERSION GREATER "1800")))
|
|
|
|
add_subdirectory(tests)
|
|
|
|
endif()
|