From: <man...@us...> - 2015-01-29 10:53:33
|
Revision: 4735 http://sourceforge.net/p/modplug/code/4735 Author: manxorist Date: 2015-01-29 10:53:27 +0000 (Thu, 29 Jan 2015) Log Message: ----------- [Mod] libopenmpt: Enable asserts only in debug, checked or test suite builds. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/common/BuildSettings.h Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2015-01-29 10:35:45 UTC (rev 4734) +++ trunk/OpenMPT/Makefile 2015-01-29 10:53:27 UTC (rev 4735) @@ -236,6 +236,7 @@ ARFLAGS += ifeq ($(DEBUG),1) +CPPFLAGS += -DMPT_BUILD_DEBUG CXXFLAGS += -g CFLAGS += -g else @@ -263,6 +264,7 @@ ARFLAGS += ifeq ($(DEBUG),1) +CPPFLAGS += -DMPT_BUILD_DEBUG CXXFLAGS += -O0 -g CFLAGS += -O0 -g else Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2015-01-29 10:35:45 UTC (rev 4734) +++ trunk/OpenMPT/common/BuildSettings.h 2015-01-29 10:53:27 UTC (rev 4735) @@ -155,12 +155,20 @@ #include "config.h" #endif // HAVE_CONFIG_H +#if (defined(_DEBUG) || defined(DEBUG)) && !defined(MPT_BUILD_DEBUG) +#define MPT_BUILD_DEBUG +#endif + #if defined(LIBOPENMPT_BUILD_TEST) #define ENABLE_TESTS #else #define MODPLUG_NO_FILESAVE #endif -//#define NO_ASSERTS +#if defined(MPT_BUILD_CHECKED) || defined(ENABLE_TESTS) +// enable asserts +#else +#define NO_ASSERTS +#endif //#define NO_LOGGING #define MPT_FILEREADER_STD_ISTREAM //#define MPT_EXTERNAL_SAMPLES This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |