Skip to content

Commit 32904b9

Browse files
bratpiorkaszadam
authored andcommitted
prepare cmake files for formatting
1 parent 9902a78 commit 32904b9

File tree

8 files changed

+51
-29
lines changed

8 files changed

+51
-29
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ if(USE_TSAN)
110110
add_sanitizer_flag(thread)
111111
endif()
112112
if(USE_MSAN)
113-
message(WARNING "MemorySanitizer requires instrumented libraries to prevent reporting false-positives")
113+
message(WARNING "MemorySanitizer requires instrumented libraries to "
114+
"prevent reporting false-positives")
114115
add_sanitizer_flag(memory)
115116
endif()
116117

benchmark/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ if (UMF_BUILD_BENCHMARKS_MT)
1111
endif()
1212

1313
function(add_umf_benchmark)
14-
# NAME - a name of the benchmark
15-
# SRCS - source files
16-
# LIBS - libraries to be linked with
17-
# LIBDIRS - directories of libraries to be linked with
14+
# Parameters:
15+
#
16+
# * NAME - a name of the benchmark
17+
# * SRCS - source files
18+
# * LIBS - libraries to be linked with
19+
# * LIBDIRS - directories of libraries to be linked with
1820
set(oneValueArgs NAME)
1921
set(multiValueArgs SRCS LIBS LIBDIRS)
2022
cmake_parse_arguments(ARG "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

cmake/FindJEMALLOC.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ if(JEMALLOC_HEADER)
1616
get_filename_component(JEMALLOC_INCLUDE_DIR ${JEMALLOC_INCLUDE_DIR_TBB} DIRECTORY)
1717
set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
1818
else()
19-
set(MSG_NOT_FOUND "<jemalloc/jemalloc.h> header NOT found (set CMAKE_PREFIX_PATH to point the location)")
19+
set(MSG_NOT_FOUND "<jemalloc/jemalloc.h> header NOT found "
20+
"(set CMAKE_PREFIX_PATH to point the location)")
2021
if(JEMALLOC_FIND_REQUIRED)
2122
message(FATAL_ERROR ${MSG_NOT_FOUND})
2223
else()

cmake/FindTBB.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ if(TBB_HEADER)
1616
get_filename_component(TBB_INCLUDE_DIR ${TBB_INCLUDE_DIR_TBB} DIRECTORY)
1717
set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
1818
else()
19-
set(MSG_NOT_FOUND "<tbb/scalable_allocator.h> header NOT found (set CMAKE_PREFIX_PATH to point the location)")
19+
set(MSG_NOT_FOUND "<tbb/scalable_allocator.h> header NOT found (set "
20+
"CMAKE_PREFIX_PATH to point the location)"
21+
)
2022
if(TBB_FIND_REQUIRED)
2123
message(FATAL_ERROR ${MSG_NOT_FOUND})
2224
else()
@@ -39,7 +41,8 @@ if(TBB_LIBRARY)
3941
message(STATUS " TBB_DLL_DIRS = ${TBB_DLL_DIRS}")
4042
endif()
4143
else()
42-
set(MSG_NOT_FOUND "tbb NOT found (set CMAKE_PREFIX_PATH to point the location)")
44+
set(MSG_NOT_FOUND "tbb NOT found (set CMAKE_PREFIX_PATH to point the "
45+
"location)")
4346
if(TBB_FIND_REQUIRED)
4447
message(FATAL_ERROR ${MSG_NOT_FOUND})
4548
else()

cmake/helpers.cmake

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ function(add_umf_target_exec_options name)
7777
endfunction()
7878

7979
function(add_umf_executable)
80-
# NAME - a name of the executable
81-
# SRCS - source files
82-
# LIBS - libraries to be linked with
80+
# Parameters:
81+
#
82+
# * NAME - a name of the executable
83+
# * SRCS - source files
84+
# * LIBS - libraries to be linked with
8385
set(oneValueArgs NAME)
8486
set(multiValueArgs SRCS LIBS)
8587
cmake_parse_arguments(ARG "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@@ -92,13 +94,16 @@ function(add_umf_executable)
9294
endfunction()
9395

9496
function(add_umf_library)
95-
# NAME - a name of the library
96-
# TYPE - type of the library (shared or static)
97-
# if shared library, LINUX_MAP_FILE and WINDOWS_DEF_FILE must also be specified
98-
# SRCS - source files
99-
# LIBS - libraries to be linked with
100-
# LINUX_MAP_FILE - path to linux linker map (.map) file
101-
# WINDOWS_DEF_FILE - path to windows module-definition (DEF) file
97+
# Parameters:
98+
#
99+
# * NAME - a name of the library
100+
# * TYPE - type of the library (shared or static)
101+
# if shared library, LINUX_MAP_FILE and WINDOWS_DEF_FILE must also
102+
# be specified
103+
# * SRCS - source files
104+
# * LIBS - libraries to be linked with
105+
# * LINUX_MAP_FILE - path to linux linker map (.map) file
106+
# * WINDOWS_DEF_FILE - path to windows module-definition (DEF) file
102107

103108
set(oneValueArgs NAME TYPE LINUX_MAP_FILE WINDOWS_DEF_FILE)
104109
set(multiValueArgs SRCS LIBS)
@@ -109,7 +114,8 @@ function(add_umf_library)
109114
string(TOUPPER "${ARG_TYPE}" ARG_TYPE)
110115
if(ARG_TYPE STREQUAL "SHARED")
111116
if(NOT ARG_LINUX_MAP_FILE OR NOT ARG_WINDOWS_DEF_FILE)
112-
message(FATAL_ERROR "LINUX_MAP_FILE or WINDOWS_DEF_FILE not specified")
117+
message(FATAL_ERROR "LINUX_MAP_FILE or WINDOWS_DEF_FILE "
118+
"not specified")
113119
endif()
114120

115121
if (WINDOWS)
@@ -155,12 +161,14 @@ macro(add_sanitizer_flag flag)
155161
# Check C and CXX compilers for a given sanitizer flag.
156162
check_c_compiler_flag("${SANITIZER_FLAG}" "C_${check_name}")
157163
if (NOT C_${check_name})
158-
message(FATAL_ERROR "sanitizer '${flag}' is not supported by the C compiler)")
164+
message(FATAL_ERROR "sanitizer '${flag}' is not supported "
165+
"by the C compiler)")
159166
endif()
160167
if (CMAKE_CXX_COMPILE_FEATURES)
161168
check_cxx_compiler_flag("${SANITIZER_FLAG}" "CXX_${check_name}")
162169
if (NOT CXX_${check_name})
163-
message(FATAL_ERROR "sanitizer '${flag}' is not supported by the CXX compiler)")
170+
message(FATAL_ERROR "sanitizer '${flag}' is not supported by the "
171+
"CXX compiler)")
164172
endif()
165173
endif()
166174

@@ -170,12 +178,14 @@ macro(add_sanitizer_flag flag)
170178
if (SANITIZER_ARGS)
171179
check_c_compiler_flag("${SANITIZER_ARGS}" "C_HAS_SAN_ARGS")
172180
if (NOT C_HAS_SAN_ARGS)
173-
message(FATAL_ERROR "sanitizer argument '${SANITIZER_ARGS}' is not supported by the C compiler)")
181+
message(FATAL_ERROR "sanitizer argument '${SANITIZER_ARGS}' is "
182+
"not supported by the C compiler)")
174183
endif()
175184
if (CMAKE_CXX_COMPILE_FEATURES)
176185
check_cxx_compiler_flag("${SANITIZER_ARGS}" "CXX_HAS_SAN_ARGS")
177186
if (NOT CXX_HAS_SAN_ARGS)
178-
message(FATAL_ERROR "sanitizer argument '${SANITIZER_ARGS}' is not supported by the CXX compiler)")
187+
message(FATAL_ERROR "sanitizer argument '${SANITIZER_ARGS}' "
188+
"is not supported by the CXX compiler)")
179189
endif()
180190
endif()
181191

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ set(UMF_SOURCES_WINDOWS
6565
libumf_windows.c
6666
)
6767

68-
# Compile definitions for UMF library
68+
# Compile definitions for UMF library.
69+
#
6970
# TODO: Cleanup the compile definitions across all the CMake files
7071
set(UMF_PUBLIC_COMPILE_DEFINITIONS "")
7172

src/pool/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ if(UMF_BUILD_LIBUMF_POOL_JEMALLOC)
4747
EXPORT ${PROJECT_NAME}-targets
4848
)
4949
else()
50-
message(FATAL_ERROR "libumf_pool_jemalloc is supported on Linux and Windows only")
50+
message(FATAL_ERROR "libumf_pool_jemalloc is supported on Linux and "
51+
"Windows only")
5152
endif()
5253
endif()
5354

@@ -71,6 +72,7 @@ if(UMF_BUILD_LIBUMF_POOL_SCALABLE)
7172
EXPORT ${PROJECT_NAME}-targets
7273
)
7374
else()
74-
message(FATAL_ERROR "libumf_pool_scalable is supported on Linux and Windows only")
75+
message(FATAL_ERROR "libumf_pool_scalable is supported on Linux and "
76+
"Windows only")
7577
endif()
7678
endif()

test/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ enable_testing()
2121
set(UMF_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR})
2222

2323
function(add_umf_test)
24-
# NAME - a name of the test
25-
# SRCS - source files
26-
# LIBS - libraries to be linked with
24+
# Parameters:
25+
#
26+
# * NAME - a name of the test
27+
# * SRCS - source files
28+
# * LIBS - libraries to be linked with
2729
set(oneValueArgs NAME)
2830
set(multiValueArgs SRCS LIBS)
2931
cmake_parse_arguments(ARG "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

0 commit comments

Comments
 (0)