Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed build errors resulting from upgrade to VS2019 compilers
  • Loading branch information
harishsk committed Jun 21, 2019
commit fe25bf61e5f9956fed4dd6dd302b79a69d5ba75b
10 changes: 9 additions & 1 deletion src/Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ set(RESOURCES)
include_directories("${CMAKE_BINARY_DIR}/../../")

if(WIN32)
# Clobber and reset the default C and CXX flags because
# CMake uses /ZI (Edit and Continue) for generating pdbs
# which is incompatible with the /guard:cf flag we set below
# for security. So we use the default flags set by CMake
# and reset /ZI with /Zi
set(CMAKE_C_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od /RTC1 /JMC")
set(CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od /RTC1 /JMC")

add_definitions(-DWIN32)
add_definitions(-D_WIN32=1)
add_definitions(-DUNICODE -D_UNICODE)
Expand All @@ -22,7 +30,7 @@ if(WIN32)
add_compile_options($<$<CONFIG:Release>:/MT>)
add_compile_options($<$<CONFIG:RelWithDebInfo>:/MT>)
add_compile_options(/guard:cf)
add_compile_options(/d2Zi+) # make optimized builds debugging easier
add_compile_options(/Zo) # make optimized builds debugging easier. /Zo is the newer documented flag.
add_compile_options(/nologo) # Suppress Startup Banner
add_compile_options(/W3) # set warning level to 3
add_compile_options(/WX) # treat warnings as errors
Expand Down