diff --git a/CMakeLists.txt b/CMakeLists.txt index f86368e33d..2165fa07ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -651,6 +651,9 @@ if (WIN32) 4251 # class 'XXXX' needs to have dll-interface to be used by clients of class 'YYYY' 4275 # non dll-interface struct 'XXXX' used as base for dll-interface class 'YYYY' + # caused by boost + 4191 # 'type cast' : unsafe conversion (1.56, thread_primitives.hpp, normally off) + # OpenMW specific warnings 4099 # Type mismatch, declared class or struct is defined with other type 4100 # Unreferenced formal parameter (-Wunused-parameter) @@ -694,7 +697,9 @@ if (WIN32) set_target_properties(esmtool PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}") endif (BUILD_ESMTOOL) if (BUILD_OPENCS) - set_target_properties(opencs PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}") + # QT triggers an informational warning that the object layout may differ when compiled with /vd2 + set(OPENCS_WARNINGS "${WARNINGS} ${MT_BUILD} /wd4435") + set_target_properties(opencs PROPERTIES COMPILE_FLAGS ${OPENCS_WARNINGS}) endif (BUILD_OPENCS) if (BUILD_MWINIIMPORTER) set_target_properties(mwiniimport PROPERTIES COMPILE_FLAGS "${WARNINGS} ${MT_BUILD}") diff --git a/components/compiler/lineparser.cpp b/components/compiler/lineparser.cpp index c5e236f147..7d554f2ec9 100644 --- a/components/compiler/lineparser.cpp +++ b/components/compiler/lineparser.cpp @@ -311,7 +311,7 @@ namespace Compiler extensions->generateInstructionCode (keyword, mCode, mLiterals, mExplicit, optionals); } - catch (const SourceException& exception) + catch (const SourceException&) { // Ignore argument exceptions for positioncell. /// \todo add option to disable this diff --git a/plugins/mygui_resource_plugin/CMakeLists.txt b/plugins/mygui_resource_plugin/CMakeLists.txt index 7288fd4b67..72965c9178 100644 --- a/plugins/mygui_resource_plugin/CMakeLists.txt +++ b/plugins/mygui_resource_plugin/CMakeLists.txt @@ -15,6 +15,14 @@ add_library(${MYGUI_RESOURCE_PLUGIN_LIBRARY} ${MYGUI_RESOURCE_PLUGIN_SOURCES} ) +if(WIN32) + if(MSVC) + # from top-level CMakelists.txt: + # 4305 - Truncating value (double to float, for example) + set_target_properties(${MYGUI_RESOURCE_PLUGIN_LIBRARY} PROPERTIES COMPILE_FLAGS "/wd4305") + endif(MSVC) +endif(WIN32) + set_target_properties(${MYGUI_RESOURCE_PLUGIN_LIBRARY} PROPERTIES PREFIX "") target_link_libraries(${MYGUI_RESOURCE_PLUGIN_LIBRARY}