Skip to content

Commit 001866c

Browse files
author
Ziad Mostafa
committed
iox-#1368 Add an example after format
Signed-off-by: Ziad Mostafa <[email protected]>
1 parent 33377f7 commit 001866c

File tree

1 file changed

+93
-85
lines changed

1 file changed

+93
-85
lines changed

iceoryx_hoofs/CMakeLists.txt

Lines changed: 93 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Copyright (c) 2019 - 2021 by Robert Bosch GmbH. All rights reserved.
2-
# Copyright (c) 2020 - 2022 by Apex.AI Inc. All rights reserved.
1+
# Copyright (c) 2019 - 2021 by Robert Bosch GmbH. All rights reserved. Copyright
2+
# (c) 2020 - 2022 by Apex.AI Inc. All rights reserved.
33
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
# use this file except in compliance with the License. You may obtain a copy of
6+
# the License at
77
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
99
#
1010
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
11+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
# License for the specific language governing permissions and limitations under
14+
# the License.
1515
#
1616
# SPDX-License-Identifier: Apache-2.0
1717

@@ -26,94 +26,106 @@ find_package(iceoryx_platform REQUIRED)
2626
include(IceoryxPackageHelper)
2727
include(IceoryxPlatformSettings)
2828

29-
include(cmake/IceoryxHoofsDeployment.cmake)
30-
3129
include("${CMAKE_CURRENT_LIST_DIR}/cmake/IceoryxPlatform.cmake")
3230

31+
include(cmake/IceoryxHoofsDeployment.cmake)
32+
3333
if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME MATCHES Darwin)
3434
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)
3535
endif()
3636

3737
set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION})
3838

3939
#
40-
########## build iceoryx hoofs lib ##########
40+
# ######### build iceoryx hoofs lib ##########
4141
#
4242
iox_add_library(
43-
TARGET iceoryx_hoofs
44-
NAMESPACE iceoryx_hoofs
45-
PROJECT_PREFIX ${PREFIX}
46-
PUBLIC_LIBS iceoryx_platform::iceoryx_platform
47-
PRIVATE_LIBS ${ICEORYX_SANITIZER_FLAGS}
48-
PRIVATE_LIBS_LINUX acl atomic ${CODE_COVERAGE_LIBS}
49-
BUILD_INTERFACE ${PROJECT_SOURCE_DIR}/include
50-
${PROJECT_SOURCE_DIR}/legacy/include
51-
${PROJECT_SOURCE_DIR}/memory/include
52-
${PROJECT_SOURCE_DIR}/container/include
53-
${PROJECT_SOURCE_DIR}/vocabulary/include
54-
${PROJECT_SOURCE_DIR}/utility/include
55-
${PROJECT_SOURCE_DIR}/primitives/include
56-
${PROJECT_SOURCE_DIR}/design/include
57-
${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include
58-
INSTALL_INTERFACE include/${PREFIX}
59-
EXPORT_INCLUDE_DIRS include/
60-
legacy/include/
61-
memory/include/
62-
container/include/
63-
vocabulary/include/
64-
utility/include/
65-
primitives/include/
66-
design/include/
43+
TARGET
44+
iceoryx_hoofs
45+
NAMESPACE
46+
iceoryx_hoofs
47+
PROJECT_PREFIX
48+
${PREFIX}
49+
PUBLIC_LIBS
50+
iceoryx_platform::iceoryx_platform
51+
PRIVATE_LIBS
52+
${ICEORYX_SANITIZER_FLAGS}
53+
PRIVATE_LIBS_LINUX
54+
acl
55+
atomic
56+
${CODE_COVERAGE_LIBS}
57+
BUILD_INTERFACE
58+
${PROJECT_SOURCE_DIR}/include
59+
${PROJECT_SOURCE_DIR}/legacy/include
60+
${PROJECT_SOURCE_DIR}/memory/include
61+
${PROJECT_SOURCE_DIR}/container/include
62+
${PROJECT_SOURCE_DIR}/vocabulary/include
63+
${PROJECT_SOURCE_DIR}/utility/include
64+
${PROJECT_SOURCE_DIR}/primitives/include
65+
${PROJECT_SOURCE_DIR}/design/include
66+
${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include
67+
INSTALL_INTERFACE
68+
include/${PREFIX}
69+
EXPORT_INCLUDE_DIRS
70+
include/
71+
legacy/include/
72+
memory/include/
73+
container/include/
74+
vocabulary/include/
75+
utility/include/
76+
primitives/include/
77+
design/include/
6778
FILES
68-
source/concurrent/loffli.cpp
69-
source/cxx/adaptive_wait.cpp
70-
source/cxx/deadline_timer.cpp
71-
source/cxx/filesystem.cpp
72-
source/cxx/requires.cpp
73-
source/cxx/type_traits.cpp
74-
source/cxx/unique_id.cpp
75-
source/error_handling/error_handler.cpp
76-
source/error_handling/error_handling.cpp
77-
source/log/building_blocks/console_logger.cpp
78-
source/log/building_blocks/logger.cpp
79-
source/posix_wrapper/access_control.cpp
80-
source/posix_wrapper/file_lock.cpp
81-
source/posix_wrapper/mutex.cpp
82-
source/posix_wrapper/named_semaphore.cpp
83-
source/posix_wrapper/posix_access_rights.cpp
84-
source/posix_wrapper/scheduler.cpp
85-
source/posix_wrapper/semaphore_interface.cpp
86-
source/posix_wrapper/shared_memory_object.cpp
87-
source/posix_wrapper/shared_memory_object/memory_map.cpp
88-
source/posix_wrapper/shared_memory_object/shared_memory.cpp
89-
source/posix_wrapper/signal_handler.cpp
90-
source/posix_wrapper/system_configuration.cpp
91-
source/posix_wrapper/thread.cpp
92-
source/posix_wrapper/types.cpp
93-
source/posix_wrapper/unnamed_semaphore.cpp
94-
source/posix_wrapper/unix_domain_socket.cpp
95-
source/memory/relative_pointer_data.cpp
96-
source/units/duration.cpp
97-
memory/source/bump_allocator.cpp
98-
memory/source/memory.cpp
99-
design/source/functional_interface.cpp
100-
)
101-
102-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/iceoryx_hoofs_deployment.hpp.in"
103-
"${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include/iceoryx_hoofs/iceoryx_hoofs_deployment.hpp" @ONLY)
79+
source/concurrent/loffli.cpp
80+
source/cxx/adaptive_wait.cpp
81+
source/cxx/deadline_timer.cpp
82+
source/cxx/filesystem.cpp
83+
source/cxx/requires.cpp
84+
source/cxx/type_traits.cpp
85+
source/cxx/unique_id.cpp
86+
source/error_handling/error_handler.cpp
87+
source/error_handling/error_handling.cpp
88+
source/log/building_blocks/console_logger.cpp
89+
source/log/building_blocks/logger.cpp
90+
source/posix_wrapper/access_control.cpp
91+
source/posix_wrapper/file_lock.cpp
92+
source/posix_wrapper/mutex.cpp
93+
source/posix_wrapper/named_semaphore.cpp
94+
source/posix_wrapper/posix_access_rights.cpp
95+
source/posix_wrapper/scheduler.cpp
96+
source/posix_wrapper/semaphore_interface.cpp
97+
source/posix_wrapper/shared_memory_object.cpp
98+
source/posix_wrapper/shared_memory_object/memory_map.cpp
99+
source/posix_wrapper/shared_memory_object/shared_memory.cpp
100+
source/posix_wrapper/signal_handler.cpp
101+
source/posix_wrapper/system_configuration.cpp
102+
source/posix_wrapper/thread.cpp
103+
source/posix_wrapper/types.cpp
104+
source/posix_wrapper/unnamed_semaphore.cpp
105+
source/posix_wrapper/unix_domain_socket.cpp
106+
source/memory/relative_pointer_data.cpp
107+
source/units/duration.cpp
108+
memory/source/bump_allocator.cpp
109+
memory/source/memory.cpp
110+
design/source/functional_interface.cpp)
111+
112+
configure_file(
113+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/iceoryx_hoofs_deployment.hpp.in"
114+
"${CMAKE_BINARY_DIR}/generated/
115+
iceoryx_hoofs/include/iceoryx_hoofs/iceoryx_hoofs_deployment.hpp" @ONLY)
104116

105117
install(
106-
FILES ${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include/${PROJECT_NAME}/iceoryx_hoofs_deployment.hpp
118+
FILES ${CMAKE_BINARY_DIR}/generated/
119+
iceoryx_hoofs/include/${PROJECT_NAME}/iceoryx_hoofs_deployment.hpp
107120
DESTINATION include/${PREFIX}/${PROJECT_NAME}/
108-
COMPONENT dev
109-
)
121+
COMPONENT dev)
110122

111123
#
112-
########## hoofs testing ##########
124+
# ######### hoofs testing ##########
113125
#
114126

115-
# Finding gtest and adding the subdirectories is split to support the use case of
116-
# building the testing lib without the tests by providing gtest externally
127+
# Finding gtest and adding the subdirectories is split to support the use case
128+
# of building the testing lib without the tests by providing gtest externally
117129
if(NOT GTest_FOUND AND BUILD_TEST)
118130
find_package(GTest CONFIG REQUIRED)
119131
endif()
@@ -126,9 +138,5 @@ if(GTest_FOUND)
126138
endif()
127139
endif()
128140

129-
install(
130-
FILES
131-
cmake/IceoryxPlatform.cmake
132-
cmake/IceoryxVersion.cmake
133-
DESTINATION ${DESTINATION_CONFIGDIR}
134-
)
141+
install(FILES cmake/IceoryxPlatform.cmake cmake/IceoryxVersion.cmake
142+
DESTINATION ${DESTINATION_CONFIGDIR})

0 commit comments

Comments
 (0)