1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 14:07:46 +00:00

Correctly applying /ZI for debug

- /ZI is not a link flag
- /ZI is not settable via CMAKE_CXX_FLAGS
- /Zi is default unless add_defitions(/ZI)
This commit is contained in:
ShelbyZ 2017-10-22 09:28:19 -07:00
parent 9065b4ccea
commit 08366ae11c

View file

@ -9,10 +9,15 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
# edit and continue
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# edit and continue
message(STATUS "Enabling Edit and Continue..")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL /ZI")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZI")
add_definitions(/ZI)
# incremental linking
message(STATUS "Enabling Incremental Linking..")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL")
endif()
endif()