Merge pull request #2451 from jpark37/disable-incremental-link

CMake: Disable incremental linking on Windows
This commit is contained in:
Jim 2020-03-03 23:30:55 -08:00 committed by GitHub
commit cb970d0cb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,9 +163,11 @@ if(MSVC)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:REF")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:REF")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /OPT:REF")
foreach(t EXE SHARED MODULE)
set(CMAKE_${t}_LINKER_FLAGS "${CMAKE_${t}_LINKER_FLAGS} /OPT:REF")
set(CMAKE_${t}_LINKER_FLAGS_DEBUG "${CMAKE_${t}_LINKER_FLAGS_DEBUG} /INCREMENTAL:NO")
set(CMAKE_${t}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${t}_LINKER_FLAGS_RELWITHDEBINFO} /INCREMENTAL:NO")
endforeach()
else()
if(MINGW)
set(CMAKE_WIDL "widl" CACHE STRING "wine IDL header file generation program")