Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revise CMake scripts some more for MSVC
These changes allow for LDC to be built with only a handful of warnings using VS 2015, without the need for any explicit CMake compiler flags. We make it through warning level 3 by disabling a dozen specific warnings. I've tested the Debug and RelWithDebInfo CMake build types. For reference, here are the default CMake 3.3 variables for the Ninja generator and MSVC 2015: -- CMAKE_C_FLAGS: /DWIN32 /D_WINDOWS /W3 -- CMAKE_C_FLAGS_DEBUG: /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 -- CMAKE_C_FLAGS_MINSIZEREL: /MD /O1 /Ob1 /D NDEBUG -- CMAKE_C_FLAGS_RELEASE: /MD /O2 /Ob2 /D NDEBUG -- CMAKE_C_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /D NDEBUG -- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR /EHsc -- CMAKE_CXX_FLAGS_DEBUG: /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 -- CMAKE_CXX_FLAGS_MINSIZEREL: /MD /O1 /Ob1 /D NDEBUG -- CMAKE_CXX_FLAGS_RELEASE: /MD /O2 /Ob2 /D NDEBUG -- CMAKE_CXX_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /D NDEBUG
- Loading branch information
Showing
4 changed files
with
43 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters