Skip to content

Commit 09b3703

Browse files
authored
Make link options portable across compilers on Windows (#1705)
1 parent 704ca61 commit 09b3703

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/compilers/MSVC.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ endif()
3535
set(TBB_LIB_COMPILE_FLAGS -D_CRT_SECURE_NO_WARNINGS /GS)
3636
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /volatile:iso /FS /EHsc)
3737

38-
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT)
38+
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} LINKER:/DEPENDENTLOADFLAG:0x2000 LINKER:/DYNAMICBASE LINKER:/NXCOMPAT)
3939

4040
if (TBB_ARCH EQUAL 32)
41-
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /SAFESEH )
41+
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} LINKER:/SAFESEH )
4242
endif()
4343

4444
# Ignore /WX set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
@@ -85,7 +85,7 @@ endif()
8585

8686
if (TBB_CONTROL_FLOW_GUARD)
8787
set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} /guard:cf)
88-
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /guard:cf)
88+
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} LINKER:/guard:cf)
8989
endif()
9090

9191
if (CMAKE_CXX_COMPILER_ID MATCHES "(Clang|IntelLLVM)")

0 commit comments

Comments
 (0)