summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/config.cmake.dist1
-rw-r--r--modules/worldengine/lib-collision/src/Management/MMapManager.cpp4
-rw-r--r--src/cmake/showoptions.cmake7
3 files changed, 11 insertions, 1 deletions
diff --git a/conf/config.cmake.dist b/conf/config.cmake.dist
index d76098095d..6b98015e00 100644
--- a/conf/config.cmake.dist
+++ b/conf/config.cmake.dist
@@ -10,3 +10,4 @@ option(WITH_MESHEXTRACTOR "Build meshextractor (alpha)"
option(WITHOUT_GIT "Disable the GIT testing routines" 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_EXTRA_LOGS "Disable extra log functions that can be CPU intensive" 1)
diff --git a/modules/worldengine/lib-collision/src/Management/MMapManager.cpp b/modules/worldengine/lib-collision/src/Management/MMapManager.cpp
index 722a8321ff..a4a50ce3e0 100644
--- a/modules/worldengine/lib-collision/src/Management/MMapManager.cpp
+++ b/modules/worldengine/lib-collision/src/Management/MMapManager.cpp
@@ -34,7 +34,9 @@ namespace MMAP
FILE* file = fopen(fileName, "rb");
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;
return false;
}
diff --git a/src/cmake/showoptions.cmake b/src/cmake/showoptions.cmake
index 5199d7b14f..827b6c15ec 100644
--- a/src/cmake/showoptions.cmake
+++ b/src/cmake/showoptions.cmake
@@ -121,5 +121,12 @@ else()
message("* Disable vmap DisableMgr checks : No (default)")
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("")