Skip to content

Commit 3e2d042

Browse files
committed
Add option for Windows debug library postfix in CMake configuration
1 parent a7bb7dc commit 3e2d042

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ set(UMF_INSTALL_RPATH
8989
"Set the runtime search path to the directory with dependencies (e.g. hwloc)"
9090
)
9191

92+
umf_option(UMF_USE_DEBUG_POSTFIX "Add a 'd' postfix to Windows debug libraries" OFF)
9293
umf_option(UMF_DEVELOPER_MODE "Enable additional developer checks" OFF)
9394
umf_option(
9495
UMF_FORMAT_CODE_STYLE

cmake/helpers.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ function(add_umf_library)
391391
${UMF_CMAKE_SOURCE_DIR}/src/coarse)
392392
add_umf_target_compile_options(${ARG_NAME})
393393
add_umf_target_link_options(${ARG_NAME})
394+
395+
if(WINDOWS AND UMF_USE_DEBUG_POSTFIX)
396+
set_target_properties(${ARG_NAME} PROPERTIES DEBUG_POSTFIX d)
397+
endif()
394398
endfunction()
395399

396400
# Add sanitizer ${flag}, if it is supported, for both C and C++ compiler

0 commit comments

Comments
 (0)