File tree 4 files changed +19
-4
lines changed
4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ set(UR_CONFORMANCE_TARGET_TRIPLES "" CACHE STRING
59
59
set (UR_CONFORMANCE_AMD_ARCH "" CACHE STRING "AMD device target ID to build CTS binaries for" )
60
60
option (UR_CONFORMANCE_ENABLE_MATCH_FILES "Enable CTS match files" ON )
61
61
option (UR_CONFORMANCE_TEST_LOADER "Also test the loader in the conformance tests" OFF )
62
+ option (UR_USE_DEBUG_POSTFIX "Enable debug postfix 'd' for libraries" OFF )
62
63
set (UR_ADAPTER_LEVEL_ZERO_SOURCE_DIR "" CACHE PATH
63
64
"Path to external 'level_zero' adapter source dir" )
64
65
set (UR_ADAPTER_OPENCL_SOURCE_DIR "" CACHE PATH
Original file line number Diff line number Diff line change @@ -205,7 +205,9 @@ function(add_ur_library name)
205
205
target_link_options (${name} PRIVATE
206
206
$<$<STREQUAL :$<TARGET_LINKER_FILE_NAME:${name} >,link.exe>:LINKER:/DEPENDENTLOADFLAG:0x2000>
207
207
)
208
- set_target_properties (${name} PROPERTIES DEBUG_POSTFIX d)
208
+ endif ()
209
+ if (UR_USE_DEBUG_POSTFIX )
210
+ set_target_properties (${name} PROPERTIES OUTPUT_NAME ${name} d)
209
211
endif ()
210
212
if (UR_EXTERNAL_DEPENDENCIES)
211
213
add_dependencies (${name} ${UR_EXTERNAL_DEPENDENCIES} )
Original file line number Diff line number Diff line change @@ -59,15 +59,23 @@ int ur_duplicate_fd(int pid, int fd_in);
59
59
defined (SANITIZER_THREAD)
60
60
#define SANITIZER_ANY
61
61
#endif
62
+
62
63
// /////////////////////////////////////////////////////////////////////////////
64
+ #if UR_USE_DEBUG_POSTFIX
65
+ #define LIBRARY_NAME (NAME ) NAME " d"
66
+ #else
67
+ #define LIBRARY_NAME (NAME ) NAME
68
+ #endif
69
+
63
70
#if defined(_WIN32)
64
- #define MAKE_LIBRARY_NAME (NAME, VERSION ) NAME " .dll"
71
+ #define MAKE_LIBRARY_NAME (NAME, VERSION ) LIBRARY_NAME( NAME) " .dll"
65
72
#define STATIC_LIBRARY_EXTENSION " .lib"
66
73
#else
67
74
#if defined(__APPLE__)
68
- #define MAKE_LIBRARY_NAME (NAME, VERSION ) " lib" NAME " ." VERSION " .dylib"
75
+ #define MAKE_LIBRARY_NAME (NAME, VERSION ) \
76
+ " lib" LIBRARY_NAME(NAME) " ." VERSION " .dylib"
69
77
#else
70
- #define MAKE_LIBRARY_NAME (NAME, VERSION ) " lib" NAME " .so." VERSION
78
+ #define MAKE_LIBRARY_NAME (NAME, VERSION ) " lib" LIBRARY_NAME( NAME) " .so." VERSION
71
79
#endif
72
80
#define STATIC_LIBRARY_EXTENSION " .a"
73
81
#endif
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ add_ur_library(ur_loader
21
21
)
22
22
install_ur_library(ur_loader)
23
23
24
+ target_compile_definitions (ur_loader PRIVATE
25
+ UR_USE_DEBUG_POSTFIX =$<BOOL :${UR_USE_DEBUG_POSTFIX} >
26
+ )
27
+
24
28
if (MSVC )
25
29
set (TARGET_LIBNAME ur_loader)
26
30
string (TOUPPER ${TARGET_LIBNAME} TARGET_LIBNAME)
You can’t perform that action at this time.
0 commit comments