Skip to content

Commit

Permalink
Merge pull request #4676 from dmitrio95/try-fix-windows-build
Browse files Browse the repository at this point in the history
Try to fix Windows build
  • Loading branch information
anatoly-os committed Feb 15, 2019
2 parents 245e042 + 6ddd12b commit 9e69e33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,18 @@ else (APPLE)
# Set compiler options for VS2017 toolchain.
# Note: /D_CRT_SECURE_NO WARNINGS disables warnings when using "non-secure" library functions like sscanf...
set(CMAKE_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /GR /EHsc /D_UNICODE /DUNICODE /D_CRT_SECURE_NO_WARNINGS /execution-charset:utf-8 /source-charset:utf-8")
set(CMAKE_C_FLAGS "/MP /DWIN32 /D_WINDOWS")
if (USE_SSE)
# If USE_SSE is set, enable use of SSE instructions to compiler.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /arch:SSE")
endif (USE_SSE)
set(CMAKE_CXX_FLAGS_DEBUG "/MT /permissive- /std:c++14 /W4 /Zi /Ob0 /Od /RTC1")
set(CMAKE_CXX_FLAGS_RELEASE "/MT /permissive- /std:c++14 /W4 /O2 /Ob2 /DNDEBUG /DQT_NO_DEBUG /DQT_NO_DEBUG_OUTPUT")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /permissive- /std:c++14 /W4 /Zi /O2 /Ob1 /DNDEBUG /DQT_NO_DEBUG")
set(CMAKE_C_FLAGS_DEBUG "/MT /W4 /Zi /Ob0 /Od /RTC1")
set(CMAKE_C_FLAGS_RELEASE "/MT /W4 /O2 /Ob2 /DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /W4 /Zi /O2 /Ob1 /DNDEBUG")
set(CMAKE_EXE_LINKER_FLAGS "/DYNAMICBASE:NO")
else (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/portmidi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================

set(CMAKE_C_FLAGS "-DNEWBUFFER -DPMNULL")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNEWBUFFER -DPMNULL")

if (APPLE)
file(GLOB_RECURSE INCS "*.h")
Expand Down

0 comments on commit 9e69e33

Please sign in to comment.