forked from mirror/openmw-tes3mp
Fix for MSVC warnings
This commit is contained in:
parent
3cd717cd47
commit
35ced14e45
3 changed files with 15 additions and 2 deletions
|
@ -639,6 +639,9 @@ if (WIN32)
|
||||||
4251 # class 'XXXX' needs to have dll-interface to be used by clients of class 'YYYY'
|
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'
|
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
|
# OpenMW specific warnings
|
||||||
4099 # Type mismatch, declared class or struct is defined with other type
|
4099 # Type mismatch, declared class or struct is defined with other type
|
||||||
4100 # Unreferenced formal parameter (-Wunused-parameter)
|
4100 # Unreferenced formal parameter (-Wunused-parameter)
|
||||||
|
@ -682,7 +685,9 @@ if (WIN32)
|
||||||
set_target_properties(esmtool PROPERTIES COMPILE_FLAGS ${WARNINGS})
|
set_target_properties(esmtool PROPERTIES COMPILE_FLAGS ${WARNINGS})
|
||||||
endif (BUILD_ESMTOOL)
|
endif (BUILD_ESMTOOL)
|
||||||
if (BUILD_OPENCS)
|
if (BUILD_OPENCS)
|
||||||
set_target_properties(opencs PROPERTIES COMPILE_FLAGS ${WARNINGS})
|
# QT triggers an informational warning that the object layout may differ when compiled with /vd2
|
||||||
|
set(OPENCS_WARNINGS "${WARNINGS} /wd4435")
|
||||||
|
set_target_properties(opencs PROPERTIES COMPILE_FLAGS ${OPENCS_WARNINGS})
|
||||||
endif (BUILD_OPENCS)
|
endif (BUILD_OPENCS)
|
||||||
if (BUILD_MWINIIMPORTER)
|
if (BUILD_MWINIIMPORTER)
|
||||||
set_target_properties(mwiniimport PROPERTIES COMPILE_FLAGS ${WARNINGS})
|
set_target_properties(mwiniimport PROPERTIES COMPILE_FLAGS ${WARNINGS})
|
||||||
|
|
|
@ -311,7 +311,7 @@ namespace Compiler
|
||||||
extensions->generateInstructionCode (keyword, mCode, mLiterals,
|
extensions->generateInstructionCode (keyword, mCode, mLiterals,
|
||||||
mExplicit, optionals);
|
mExplicit, optionals);
|
||||||
}
|
}
|
||||||
catch (const SourceException& exception)
|
catch (const SourceException&)
|
||||||
{
|
{
|
||||||
// Ignore argument exceptions for positioncell.
|
// Ignore argument exceptions for positioncell.
|
||||||
/// \todo add option to disable this
|
/// \todo add option to disable this
|
||||||
|
|
|
@ -15,6 +15,14 @@ add_library(${MYGUI_RESOURCE_PLUGIN_LIBRARY}
|
||||||
${MYGUI_RESOURCE_PLUGIN_SOURCES}
|
${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 "")
|
set_target_properties(${MYGUI_RESOURCE_PLUGIN_LIBRARY} PROPERTIES PREFIX "")
|
||||||
|
|
||||||
target_link_libraries(${MYGUI_RESOURCE_PLUGIN_LIBRARY}
|
target_link_libraries(${MYGUI_RESOURCE_PLUGIN_LIBRARY}
|
||||||
|
|
Loading…
Reference in a new issue