Skip to content

Commit 8e073fd

Browse files
[CMake] Minor fixes
1 parent 720c8a2 commit 8e073fd

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

CMakeLists.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ option(
5252
UMF_LINK_HWLOC_STATICALLY
5353
"Link UMF with HWLOC library statically (supported for Linux, MacOS and Release build on Windows)"
5454
OFF)
55+
option(
56+
UMF_DISABLE_HWLOC
57+
"Disable features that requires hwloc (OS provider, memory targets, topology discovery)"
58+
OFF)
5559
option(UMF_FORMAT_CODE_STYLE
5660
"Add clang, cmake, and black -format-check and -format-apply targets"
5761
OFF)
@@ -63,10 +67,6 @@ option(UMF_USE_TSAN "Enable ThreadSanitizer checks" OFF)
6367
option(UMF_USE_MSAN "Enable MemorySanitizer checks" OFF)
6468
option(UMF_USE_VALGRIND "Enable Valgrind instrumentation" OFF)
6569
option(UMF_USE_GCOV "Enable gcov support" OFF)
66-
option(
67-
UMF_DISABLE_HWLOC
68-
"Disable features that requires hwloc (OS provider, memory targets, topology discovery)"
69-
OFF)
7070

7171
# set UMF_PROXY_LIB_BASED_ON_POOL to one of: SCALABLE or JEMALLOC
7272
set(KNOWN_PROXY_LIB_POOLS SCALABLE JEMALLOC)
@@ -289,8 +289,7 @@ if(UMF_BUILD_FUZZTESTS
289289
add_link_options("-fsanitize=fuzzer-no-link")
290290
endif()
291291

292-
# A header only library to specify include directories in transitive
293-
# dependencies.
292+
# A header-only lib to specify include directories in transitive dependencies
294293
add_library(umf_headers INTERFACE)
295294

296295
# Alias target to support FetchContent.
@@ -343,7 +342,6 @@ if(UMF_BUILD_LIBUMF_POOL_JEMALLOC)
343342
)
344343
endif()
345344

346-
# set UMF_PROXY_LIB_ENABLED
347345
if(WINDOWS)
348346
# TODO: enable the proxy library in the Debug build on Windows
349347
#
@@ -362,6 +360,7 @@ if(WINDOWS)
362360
)
363361
endif()
364362
endif()
363+
# set UMF_PROXY_LIB_ENABLED
365364
if(UMF_PROXY_LIB_BASED_ON_POOL STREQUAL SCALABLE)
366365
if(UMF_POOL_SCALABLE_ENABLED)
367366
set(UMF_PROXY_LIB_ENABLED ON)
@@ -391,10 +390,12 @@ else()
391390
)
392391
endif()
393392

393+
# set optional symbols for map/def files
394+
#
395+
# TODO: ref. #649
394396
set(UMF_OPTIONAL_SYMBOLS_LINUX "")
395397
set(UMF_OPTIONAL_SYMBOLS_WINDOWS "")
396398

397-
# Conditional configuration for Level Zero provider
398399
if(UMF_BUILD_LEVEL_ZERO_PROVIDER)
399400
add_optional_symbol(umfLevelZeroMemoryProviderOps)
400401
endif()
@@ -551,12 +552,12 @@ if(UMF_FORMAT_CODE_STYLE)
551552

552553
add_custom_target(
553554
black-format-check
554-
COMMAND ${BLACK} --check --verbose ${CMAKE_SOURCE_DIR}
555+
COMMAND ${BLACK} --check --verbose ${UMF_CMAKE_SOURCE_DIR}
555556
COMMENT "Check Python files formatting using black formatter")
556557

557558
add_custom_target(
558559
black-format-apply
559-
COMMAND ${BLACK} ${CMAKE_SOURCE_DIR}
560+
COMMAND ${BLACK} ${UMF_CMAKE_SOURCE_DIR}
560561
COMMENT "Format Python files using black formatter")
561562
endif()
562563

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ else()
128128
message(STATUS "UMF_OPTIONAL_SYMBOLS: ${UMF_OPTIONAL_SYMBOLS_LINUX}")
129129
endif()
130130

131-
# Configure the DEF file based on whether Level Zero provider is built
131+
# Configure map/def files with optional symbols
132132
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libumf.def.in"
133133
"${CMAKE_CURRENT_BINARY_DIR}/libumf.def" @ONLY)
134134

0 commit comments

Comments
 (0)