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:
stgatilov
2016-05-29 18:12:57 +06:00
committed by Thomas Krijnen
parent a298903fdd
commit b5c4eb3b6f
22 changed files with 1784 additions and 1718 deletions
+10 -7
View File
@@ -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)