mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
Add build option for using Visual Leak Detector for debugging memory leaks. Initial report:
- IfcConvert (no arguments): 2 leaks (140 bytes) (from OCE) - IfcConvert (acad2010_objects.ifc): 47 memory leaks (6,158 bytes) - IfcGeomServer: 2 leaks (from OCE) - IfcOpenHouse: 11,952 leaks (1,169,658 bytes)! - IfcParseExamples (acad2010_objects.ifc): 40 memory leaks (4,564 bytes)
This commit is contained in:
@@ -28,6 +28,7 @@ OPTION(ENABLE_BUILD_OPTIMIZATIONS "Enable certain compiler and linker optimizati
|
||||
OPTION(USE_IFC4 "Use IFC 4 instead of IFC 2x3 (full rebuild recommended when switching this)" OFF)
|
||||
OPTION(BUILD_IFCPYTHON "Build IfcPython." ON)
|
||||
OPTION(BUILD_EXAMPLES "Build example applications." ON)
|
||||
OPTION(USE_VLC "Use Visual Leak Detector for debugging memory leaks, MSVC-only." OFF)
|
||||
# TODO QtViewer is deprecated ATM as it uses the 0.4 API
|
||||
# OPTION(BUILD_QTVIEWER "Build IfcOpenShell Qt GUI Viewer (requires Qt 4 framework)." OFF)
|
||||
|
||||
@@ -237,6 +238,9 @@ if(ENABLE_BUILD_OPTIMIZATIONS)
|
||||
endif()
|
||||
|
||||
IF(MSVC)
|
||||
IF(USE_VLC)
|
||||
ADD_DEFINITIONS(-DUSE_VLC)
|
||||
ENDIF()
|
||||
# Enforce Unicode for CRT and Win32 API calls
|
||||
ADD_DEFINITIONS(-D_UNICODE -DUNICODE)
|
||||
# Disable warnings about unsafe C functions; we could use the safe C99 & C11 versions if we have no need for supporting old compilers.
|
||||
|
||||
Reference in New Issue
Block a user