Skip to content

Commit 467351c

Browse files
authored
Merge pull request #1772 from pbalcer/windows-linker-flag
add DEPENDENTLOADFLAG linker flag on Windows
2 parents 167ddf9 + a472f45 commit 467351c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/helpers.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ function(add_ur_library name)
131131
add_library(${name} ${ARGN})
132132
add_ur_target_compile_options(${name})
133133
add_ur_target_link_options(${name})
134+
if(MSVC)
135+
target_link_options(${name} PRIVATE
136+
$<$<STREQUAL:$<TARGET_LINKER_FILE_NAME:${name}>,link.exe>:/DEPENDENTLOADFLAG:0x2000>
137+
)
138+
endif()
134139
endfunction()
135140

136141
include(FetchContent)

0 commit comments

Comments
 (0)