mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
Preprocessor option for logging functions (#567)
* Update showoptions.cmake * Update config.cmake.dist * Example of preprocessor usage Other work must continue for PR https://github.com/azerothcore/azerothcore-wotlk/pull/519
This commit is contained in:
@@ -10,3 +10,4 @@ option(WITH_MESHEXTRACTOR "Build meshextractor (alpha)"
|
|||||||
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
|
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
|
||||||
option(DISABLE_EXTRAS "Set to 1 to disable extra features optimizing performances" 0)
|
option(DISABLE_EXTRAS "Set to 1 to disable extra features optimizing performances" 0)
|
||||||
option(DISABLE_VMAP_CHECKS "Remove DisableMgr Checks on vmap" 0)
|
option(DISABLE_VMAP_CHECKS "Remove DisableMgr Checks on vmap" 0)
|
||||||
|
option(DISABLE_EXTRA_LOGS "Disable extra log functions that can be CPU intensive" 1)
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ namespace MMAP
|
|||||||
FILE* file = fopen(fileName, "rb");
|
FILE* file = fopen(fileName, "rb");
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
;//sLog->outDebug(LOG_FILTER_MAPS, "MMAP:loadMapData: Error: Could not open mmap file '%s'", fileName);
|
#if defined(DISABLE_EXTRAS) || defined(DISABLE_EXTRA_LOGS)
|
||||||
|
sLog->outDebug(LOG_FILTER_MAPS, "MMAP:loadMapData: Error: Could not open mmap file '%s'", fileName);
|
||||||
|
#endif
|
||||||
delete [] fileName;
|
delete [] fileName;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,5 +121,12 @@ else()
|
|||||||
message("* Disable vmap DisableMgr checks : No (default)")
|
message("* Disable vmap DisableMgr checks : No (default)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( DISABLE_EXTRA_LOGS )
|
||||||
|
message("* Disable extra logging functions : Yes (default)")
|
||||||
|
add_definitions(-DDISABLE_EXTRA_LOGS)
|
||||||
|
else()
|
||||||
|
message("* Disable extra logging functions : No")
|
||||||
|
endif()
|
||||||
|
|
||||||
message("")
|
message("")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user