Skip to content

Commit 287c9e8

Browse files
Enable FASTLINK for MSVC debug builds on demand
Change-Id: I9aecaacf48fdcc486d5bb3c29b9ceb53c4fea261 Signed-off-by: Dunajski, Bartosz <[email protected]>
1 parent d7ce6ef commit 287c9e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ set(CMAKE_C_FLAGS_RELEASEINTERNAL "${CMAKE_C_FLAGS_RELEASE}")
4646
set(CMAKE_CXX_FLAGS_RELEASEINTERNAL "${CMAKE_CXX_FLAGS_RELEASE}")
4747
set(CMAKE_SHARED_LINKER_FLAGS_RELEASEINTERNAL "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
4848
set(CMAKE_EXE_LINKER_FLAGS_RELEASEINTERNAL "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
49+
if(MSVC AND ENABLE_VS_FASTLINK)
50+
string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /debug:FASTLINK")
51+
string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " /debug:FASTLINK")
52+
string(APPEND CMAKE_STATIC_LINKER_FLAGS_DEBUG " /debug:FASTLINK")
53+
string(APPEND CMAKE_MODULE_LINKER_FLAGS_DEBUG " /debug:FASTLINK")
54+
endif()
4955

5056
string(TOLOWER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_lower)
5157
if("${BUILD_TYPE_lower}" STREQUAL "releaseinternal")

0 commit comments

Comments
 (0)