From 7fd66c77e6da50b94a0b8fcb6d52e849c536254e Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Mon, 9 Jul 2018 23:04:45 +0300 Subject: [PATCH] Update CMake lists for Windows Don't use the debug console on Release-mode builds Disable spammy 4297 and 5032 warnings that are not specific to OpenMW --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15ca3efb3..f42014951 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -610,10 +610,10 @@ if (WIN32) endif() if (BUILD_OPENMW) - # Release builds use the debug console - set_target_properties(openmw PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:CONSOLE") - set_target_properties(openmw PROPERTIES COMPILE_DEFINITIONS_RELEASE "_CONSOLE") - set_target_properties(openmw PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:CONSOLE") + # Release builds don't use the debug console + set_target_properties(openmw PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") + set_target_properties(openmw PROPERTIES COMPILE_DEFINITIONS_RELEASE "_WINDOWS") + set_target_properties(openmw PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS") endif() # Play a bit with the warning levels @@ -642,9 +642,11 @@ if (WIN32) # caused by boost 4191 # 'type cast' : unsafe conversion (1.56, thread_primitives.hpp, normally off) + 5032 # detected #pragma warning(push) with no corresponding #pragma warning(pop) # caused by MyGUI 4275 # non dll-interface class 'std::exception' used as base for dll-interface class 'MyGUI::Exception' + 4297 # function assumed not to throw an exception but does # OpenMW specific warnings 4099 # Type mismatch, declared class or struct is defined with other type