Skip to content

Commit cc2ff14

Browse files
author
Ziad Mostafa
committed
iox-#1368 Add format example
Signed-off-by: Ziad Mostafa <[email protected]>
1 parent 3b9d1fa commit cc2ff14

File tree

1 file changed

+76
-77
lines changed

1 file changed

+76
-77
lines changed

iceoryx_hoofs/CMakeLists.txt

Lines changed: 76 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# cmake-format: off
12
# Copyright (c) 2019 - 2021 by Robert Bosch GmbH. All rights reserved.
23
# Copyright (c) 2020 - 2022 by Apex.AI Inc. All rights reserved.
34
#
@@ -14,6 +15,7 @@
1415
# limitations under the License.
1516
#
1617
# SPDX-License-Identifier: Apache-2.0
18+
# cmake-format: on
1719

1820
cmake_minimum_required(VERSION 3.16)
1921

@@ -36,90 +38,90 @@ endif()
3638

3739
set(PREFIX iceoryx/v${CMAKE_PROJECT_VERSION})
3840

39-
#
41+
# cmake-format: off
4042
########## build iceoryx hoofs lib ##########
41-
#
43+
# cmake-format: on
44+
4245
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-
${PROJECT_SOURCE_DIR}/time/include
58-
${PROJECT_SOURCE_DIR}/posix/time/include
59-
${PROJECT_SOURCE_DIR}/buffer/include
60-
${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include
61-
INSTALL_INTERFACE include/${PREFIX}
62-
EXPORT_INCLUDE_DIRS include/
63-
legacy/include/
64-
memory/include/
65-
container/include/
66-
vocabulary/include/
67-
utility/include/
68-
primitives/include/
69-
design/include/
70-
time/include/
71-
posix/time/include/
72-
buffer/include/
73-
FILES
74-
source/concurrent/loffli.cpp
75-
posix/time/source/adaptive_wait.cpp
76-
posix/time/source/deadline_timer.cpp
77-
source/cxx/filesystem.cpp
78-
source/cxx/requires.cpp
79-
source/cxx/type_traits.cpp
80-
source/cxx/unique_id.cpp
81-
source/error_handling/error_handler.cpp
82-
source/error_handling/error_handling.cpp
83-
source/log/building_blocks/console_logger.cpp
84-
source/log/building_blocks/logger.cpp
85-
source/posix_wrapper/access_control.cpp
86-
source/posix_wrapper/file_lock.cpp
87-
source/posix_wrapper/mutex.cpp
88-
source/posix_wrapper/named_semaphore.cpp
89-
source/posix_wrapper/posix_access_rights.cpp
90-
source/posix_wrapper/scheduler.cpp
91-
source/posix_wrapper/semaphore_interface.cpp
92-
source/posix_wrapper/shared_memory_object.cpp
93-
source/posix_wrapper/shared_memory_object/memory_map.cpp
94-
source/posix_wrapper/shared_memory_object/shared_memory.cpp
95-
source/posix_wrapper/signal_handler.cpp
96-
source/posix_wrapper/system_configuration.cpp
97-
source/posix_wrapper/thread.cpp
98-
source/posix_wrapper/types.cpp
99-
source/posix_wrapper/unnamed_semaphore.cpp
100-
source/posix_wrapper/unix_domain_socket.cpp
101-
source/memory/relative_pointer_data.cpp
102-
source/units/duration.cpp
103-
memory/source/bump_allocator.cpp
104-
memory/source/memory.cpp
105-
design/source/functional_interface.cpp
46+
TARGET iceoryx_hoofs
47+
NAMESPACE iceoryx_hoofs
48+
PROJECT_PREFIX ${PREFIX}
49+
PUBLIC_LIBS iceoryx_platform::iceoryx_platform
50+
PRIVATE_LIBS ${ICEORYX_SANITIZER_FLAGS}
51+
PRIVATE_LIBS_LINUX acl atomic ${CODE_COVERAGE_LIBS}
52+
BUILD_INTERFACE
53+
${PROJECT_SOURCE_DIR}/include
54+
${PROJECT_SOURCE_DIR}/legacy/include
55+
${PROJECT_SOURCE_DIR}/memory/include
56+
${PROJECT_SOURCE_DIR}/container/include
57+
${PROJECT_SOURCE_DIR}/vocabulary/include
58+
${PROJECT_SOURCE_DIR}/utility/include
59+
${PROJECT_SOURCE_DIR}/primitives/include
60+
${PROJECT_SOURCE_DIR}/design/include
61+
${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include
62+
INSTALL_INTERFACE include/${PREFIX}
63+
EXPORT_INCLUDE_DIRS
64+
include/
65+
legacy/include/
66+
memory/include/
67+
container/include/
68+
vocabulary/include/
69+
utility/include/
70+
primitives/include/
71+
design/include/
72+
FILES source/concurrent/loffli.cpp
73+
source/cxx/adaptive_wait.cpp
74+
source/cxx/deadline_timer.cpp
75+
source/cxx/filesystem.cpp
76+
source/cxx/requires.cpp
77+
source/cxx/type_traits.cpp
78+
source/cxx/unique_id.cpp
79+
source/error_handling/error_handler.cpp
80+
source/error_handling/error_handling.cpp
81+
source/log/building_blocks/console_logger.cpp
82+
source/log/building_blocks/logger.cpp
83+
source/posix_wrapper/access_control.cpp
84+
source/posix_wrapper/file_lock.cpp
85+
source/posix_wrapper/mutex.cpp
86+
source/posix_wrapper/named_semaphore.cpp
87+
source/posix_wrapper/posix_access_rights.cpp
88+
source/posix_wrapper/scheduler.cpp
89+
source/posix_wrapper/semaphore_interface.cpp
90+
source/posix_wrapper/shared_memory_object.cpp
91+
source/posix_wrapper/shared_memory_object/memory_map.cpp
92+
source/posix_wrapper/shared_memory_object/shared_memory.cpp
93+
source/posix_wrapper/signal_handler.cpp
94+
source/posix_wrapper/system_configuration.cpp
95+
source/posix_wrapper/thread.cpp
96+
source/posix_wrapper/types.cpp
97+
source/posix_wrapper/unnamed_semaphore.cpp
98+
source/posix_wrapper/unix_domain_socket.cpp
99+
source/memory/relative_pointer_data.cpp
100+
source/units/duration.cpp
101+
memory/source/bump_allocator.cpp
102+
memory/source/memory.cpp
103+
design/source/functional_interface.cpp
106104
)
107105

108-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/iceoryx_hoofs_deployment.hpp.in"
109-
"${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include/iceoryx_hoofs/iceoryx_hoofs_deployment.hpp" @ONLY)
106+
configure_file(
107+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/iceoryx_hoofs_deployment.hpp.in"
108+
"${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include/iceoryx_hoofs/iceoryx_hoofs_deployment.hpp"
109+
@ONLY
110+
)
110111

111112
install(
112-
FILES ${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include/${PROJECT_NAME}/iceoryx_hoofs_deployment.hpp
113+
FILES
114+
${CMAKE_BINARY_DIR}/generated/iceoryx_hoofs/include/${PROJECT_NAME}/iceoryx_hoofs_deployment.hpp
113115
DESTINATION include/${PREFIX}/${PROJECT_NAME}/
114116
COMPONENT dev
115117
)
116118

117-
#
119+
# cmake-format: off
118120
########## hoofs testing ##########
119-
#
121+
# cmake-format: on
120122

121-
# Finding gtest and adding the subdirectories is split to support the use case of
122-
# building the testing lib without the tests by providing gtest externally
123+
# Finding gtest and adding the subdirectories is split to support the use case
124+
# of building the testing lib without the tests by providing gtest externally
123125
if(NOT GTest_FOUND AND BUILD_TEST)
124126
find_package(GTest CONFIG REQUIRED)
125127
endif()
@@ -132,9 +134,6 @@ if(GTest_FOUND)
132134
endif()
133135
endif()
134136

135-
install(
136-
FILES
137-
cmake/IceoryxPlatform.cmake
138-
cmake/IceoryxVersion.cmake
139-
DESTINATION ${DESTINATION_CONFIGDIR}
137+
install(FILES cmake/IceoryxPlatform.cmake cmake/IceoryxVersion.cmake
138+
DESTINATION ${DESTINATION_CONFIGDIR}
140139
)

0 commit comments

Comments
 (0)