Supress a lot of compiler noise in hopes of finding real errors. Right now, a plugin free DFHack can be built with VS2015

develop
Michael Casadevall 2016-06-28 08:34:11 -05:00
parent c3188b1d6c
commit d49032ef73
2 changed files with 21 additions and 2 deletions

@ -56,6 +56,15 @@ endif()
if(MSVC) if(MSVC)
# disable C4819 code-page warning # disable C4819 code-page warning
add_definitions( "/wd4819" ) add_definitions( "/wd4819" )
# Disable use of POSIX name warnings
add_definitions ( "/D_CRT_NONSTDC_NO_WARNINGS")
# supress C4503 - VC++ dislikes if a name is too long. If you get
# weird and mysterious linking errors, you can disable this, but you'll have to
# deal with a LOT of compiler noise over it
# see https://msdn.microsoft.com/en-us/library/074af4b6.aspx
add_definitions( "/wd4503")
endif() endif()
IF(CMAKE_CROSSCOMPILING) IF(CMAKE_CROSSCOMPILING)

@ -38,8 +38,18 @@ namespace DFHack
* our wrapper for the C++ exception. used to differentiate * our wrapper for the C++ exception. used to differentiate
* the whole array of DFHack exceptions from the rest * the whole array of DFHack exceptions from the rest
*/ */
class DFHACK_EXPORT All : public std::exception{}; #ifdef _MSC_VER
#pragma push
/**
* C4275 is - The warning officially is non dll-interface class 'std::exception' used as base for
* dll-interface class
*
* Basically, its saying that you might have an ABI problem if you mismatch compilers. We don't
* care since we build all of DFhack at once against whatever Toady is using
*/
#pragma warning(disable: 4275)
class DFHACK_EXPORT All : public std::exception{};
#endif
class DFHACK_EXPORT NullPointer : public All { class DFHACK_EXPORT NullPointer : public All {
const char *varname_; const char *varname_;
public: public: