Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1368 Add an example after format
Browse files Browse the repository at this point in the history
Signed-off-by: Ziad Mostafa <[email protected]>
  • Loading branch information
zmostafa committed Feb 13, 2023
1 parent 33377f7 commit 001866c
Showing 1 changed file with 93 additions and 85 deletions.
178 changes: 93 additions & 85 deletions iceoryx_hoofs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Copyright (c) 2019 - 2021 by Robert Bosch GmbH. All rights reserved.
# Copyright (c) 2020 - 2022 by Apex.AI Inc. All rights reserved.
# Copyright (c) 2019 - 2021 by Robert Bosch GmbH. All rights reserved. Copyright
# (c) 2020 - 2022 by Apex.AI Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -26,94 +26,106 @@ find_package(iceoryx_platform REQUIRED)
include(IceoryxPackageHelper)
include(IceoryxPlatformSettings)

include(cmake/IceoryxHoofsDeployment.cmake)

include("${CMAKE_CURRENT_LIST_DIR}/cmake/IceoryxPlatform.cmake")

include(cmake/IceoryxHoofsDeployment.cmake)

if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin)
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)
endif()

set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION})

#
########## build iceoryx hoofs lib ##########
# ######### build iceoryx hoofs lib ##########
#
iox_add_library(
TARGET iceoryx_hoofs
NAMESPACE iceoryx_hoofs
PROJECT_PREFIX ${PREFIX}
PUBLIC_LIBS iceoryx_platform::iceoryx_platform
PRIVATE_LIBS ${ICEORYX_SANITIZER_FLAGS}
PRIVATE_LIBS_LINUX acl atomic ${CODE_COVERAGE_LIBS}
BUILD_INTERFACE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/legacy/include
${PROJECT_SOURCE_DIR}/memory/include
${PROJECT_SOURCE_DIR}/container/include
${PROJECT_SOURCE_DIR}/vocabulary/include
${PROJECT_SOURCE_DIR}/utility/include
${PROJECT_SOURCE_DIR}/primitives/include
${PROJECT_SOURCE_DIR}/design/include
${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include
INSTALL_INTERFACE include/${PREFIX}
EXPORT_INCLUDE_DIRS include/
legacy/include/
memory/include/
container/include/
vocabulary/include/
utility/include/
primitives/include/
design/include/
TARGET
iceoryx_hoofs
NAMESPACE
iceoryx_hoofs
PROJECT_PREFIX
${PREFIX}
PUBLIC_LIBS
iceoryx_platform::iceoryx_platform
PRIVATE_LIBS
${ICEORYX_SANITIZER_FLAGS}
PRIVATE_LIBS_LINUX
acl
atomic
${CODE_COVERAGE_LIBS}
BUILD_INTERFACE
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/legacy/include
${PROJECT_SOURCE_DIR}/memory/include
${PROJECT_SOURCE_DIR}/container/include
${PROJECT_SOURCE_DIR}/vocabulary/include
${PROJECT_SOURCE_DIR}/utility/include
${PROJECT_SOURCE_DIR}/primitives/include
${PROJECT_SOURCE_DIR}/design/include
${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include
INSTALL_INTERFACE
include/${PREFIX}
EXPORT_INCLUDE_DIRS
include/
legacy/include/
memory/include/
container/include/
vocabulary/include/
utility/include/
primitives/include/
design/include/
FILES
source/concurrent/loffli.cpp
source/cxx/adaptive_wait.cpp
source/cxx/deadline_timer.cpp
source/cxx/filesystem.cpp
source/cxx/requires.cpp
source/cxx/type_traits.cpp
source/cxx/unique_id.cpp
source/error_handling/error_handler.cpp
source/error_handling/error_handling.cpp
source/log/building_blocks/console_logger.cpp
source/log/building_blocks/logger.cpp
source/posix_wrapper/access_control.cpp
source/posix_wrapper/file_lock.cpp
source/posix_wrapper/mutex.cpp
source/posix_wrapper/named_semaphore.cpp
source/posix_wrapper/posix_access_rights.cpp
source/posix_wrapper/scheduler.cpp
source/posix_wrapper/semaphore_interface.cpp
source/posix_wrapper/shared_memory_object.cpp
source/posix_wrapper/shared_memory_object/memory_map.cpp
source/posix_wrapper/shared_memory_object/shared_memory.cpp
source/posix_wrapper/signal_handler.cpp
source/posix_wrapper/system_configuration.cpp
source/posix_wrapper/thread.cpp
source/posix_wrapper/types.cpp
source/posix_wrapper/unnamed_semaphore.cpp
source/posix_wrapper/unix_domain_socket.cpp
source/memory/relative_pointer_data.cpp
source/units/duration.cpp
memory/source/bump_allocator.cpp
memory/source/memory.cpp
design/source/functional_interface.cpp
)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/iceoryx_hoofs_deployment.hpp.in"
"${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include/iceoryx_hoofs/iceoryx_hoofs_deployment.hpp" @ONLY)
source/concurrent/loffli.cpp
source/cxx/adaptive_wait.cpp
source/cxx/deadline_timer.cpp
source/cxx/filesystem.cpp
source/cxx/requires.cpp
source/cxx/type_traits.cpp
source/cxx/unique_id.cpp
source/error_handling/error_handler.cpp
source/error_handling/error_handling.cpp
source/log/building_blocks/console_logger.cpp
source/log/building_blocks/logger.cpp
source/posix_wrapper/access_control.cpp
source/posix_wrapper/file_lock.cpp
source/posix_wrapper/mutex.cpp
source/posix_wrapper/named_semaphore.cpp
source/posix_wrapper/posix_access_rights.cpp
source/posix_wrapper/scheduler.cpp
source/posix_wrapper/semaphore_interface.cpp
source/posix_wrapper/shared_memory_object.cpp
source/posix_wrapper/shared_memory_object/memory_map.cpp
source/posix_wrapper/shared_memory_object/shared_memory.cpp
source/posix_wrapper/signal_handler.cpp
source/posix_wrapper/system_configuration.cpp
source/posix_wrapper/thread.cpp
source/posix_wrapper/types.cpp
source/posix_wrapper/unnamed_semaphore.cpp
source/posix_wrapper/unix_domain_socket.cpp
source/memory/relative_pointer_data.cpp
source/units/duration.cpp
memory/source/bump_allocator.cpp
memory/source/memory.cpp
design/source/functional_interface.cpp)

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/iceoryx_hoofs_deployment.hpp.in"
"${CMAKE_BINARY_DIR}/generated/
iceoryx_hoofs/include/iceoryx_hoofs/iceoryx_hoofs_deployment.hpp" @ONLY)

install(
FILES ${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include/${PROJECT_NAME}/iceoryx_hoofs_deployment.hpp
FILES ${CMAKE_BINARY_DIR}/generated/
iceoryx_hoofs/include/${PROJECT_NAME}/iceoryx_hoofs_deployment.hpp
DESTINATION include/${PREFIX}/${PROJECT_NAME}/
COMPONENT dev
)
COMPONENT dev)

#
########## hoofs testing ##########
# ######### hoofs testing ##########
#

# Finding gtest and adding the subdirectories is split to support the use case of
# building the testing lib without the tests by providing gtest externally
# Finding gtest and adding the subdirectories is split to support the use case
# of building the testing lib without the tests by providing gtest externally
if(NOT GTest_FOUND AND BUILD_TEST)
find_package(GTest CONFIG REQUIRED)
endif()
Expand All @@ -126,9 +138,5 @@ if(GTest_FOUND)
endif()
endif()

install(
FILES
cmake/IceoryxPlatform.cmake
cmake/IceoryxVersion.cmake
DESTINATION ${DESTINATION_CONFIGDIR}
)
install(FILES cmake/IceoryxPlatform.cmake cmake/IceoryxVersion.cmake
DESTINATION ${DESTINATION_CONFIGDIR})

0 comments on commit 001866c

Please sign in to comment.