mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 22:16:41 +00:00
IfcParse dynamic linking, IFCPARSE_NO_REGEX, fixes for three memory leaks (#76)
* CMake: moved setting link directories before all the projects. * Added IfcParse_Export header for declaring export macro. * Added IFCPARSE_STATIC_DEFINE macro to all projects. * Added include for export macro to swig file. * Added IfcParse_EXPORT macro for all classes in headers generated by express parser. * Allow removing boost.regex dependency by defining macro IFCPARSE_NO_REGEX. * Fixed bug in deletion of ICU converter. * Added export macro to most of the classes across headers * Fixed memory leak: delete nested IfcAbstractEntity in EntityArgument. * Fixed memory leak in destructor of IfcWritableEntity (args values).
This commit is contained in:
committed by
Thomas Krijnen
parent
a298903fdd
commit
b5c4eb3b6f
+10
-7
@@ -408,6 +408,13 @@ if(NOT Boost_VERSION LESS 105800)
|
||||
add_definitions(-DBOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE)
|
||||
endif()
|
||||
|
||||
LINK_DIRECTORIES(${LINK_DIRECTORIES} ${IfcOpenShell_BINARY_DIR} ${OCC_LIBRARY_DIR} ${OPENCOLLADA_LIBRARY_DIR}
|
||||
${ICU_LIBRARY_DIR} ${Boost_LIBRARY_DIRS}
|
||||
)
|
||||
if(NOT WIN32)
|
||||
LINK_DIRECTORIES(${LINK_DIRECTORIES} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64)
|
||||
endif()
|
||||
|
||||
# IfcParse
|
||||
file(GLOB IFCPARSE_H_FILES ../src/ifcparse/*.h)
|
||||
file(GLOB IFCPARSE_CPP_FILES ../src/ifcparse/*.cpp)
|
||||
@@ -422,6 +429,9 @@ endforeach()
|
||||
|
||||
set(IFCPARSE_FILES ${IFCPARSE_CPP_FILES} ${IFCPARSE_H_FILES})
|
||||
|
||||
# add macro for every project: use IfcParse as static lib
|
||||
add_definitions(-DIFCPARSE_STATIC_DEFINE)
|
||||
|
||||
ADD_LIBRARY(IfcParse STATIC ${IFCPARSE_FILES})
|
||||
|
||||
IF(UNICODE_SUPPORT)
|
||||
@@ -445,13 +455,6 @@ ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES(IfcGeom IfcParse)
|
||||
|
||||
LINK_DIRECTORIES(${LINK_DIRECTORIES} ${IfcOpenShell_BINARY_DIR} ${OCC_LIBRARY_DIR} ${OPENCOLLADA_LIBRARY_DIR}
|
||||
${ICU_LIBRARY_DIR} ${Boost_LIBRARY_DIRS}
|
||||
)
|
||||
if(NOT WIN32)
|
||||
LINK_DIRECTORIES(${LINK_DIRECTORIES} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64)
|
||||
endif()
|
||||
|
||||
# IfcConvert
|
||||
if (IFCCONVERT_DOUBLE_PRECISION)
|
||||
add_definitions(-DIFCCONVERT_DOUBLE_PRECISION)
|
||||
|
||||
Reference in New Issue
Block a user