How to enable /INCREMENTAL:YES for release builds with cmake on Windows
问题 I need to use the linker flag /INCREMENTAL:YES when building some libraries with Visual Studio, but cmake seems to insist on using /INCREMENTAL:NO with release builds, and I can't figure out how to fix it. Some of the stuff that I've tried is set(CMAKE_EXE_LINKER_FLAGS "/INCREMENTAL:YES") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/INCREMENTAL:YES") set(CMAKE_EXE_LINKER_FLAGS_INIT "/INCREMENTAL:YES") set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:YES") set(CMAKE_CXX_FLAGS_RELEASE "