Skip to content

Commit 44100ff

Browse files
committed
Fixes compilation issues due to private copy constructors using older versions of gcc
Added additional default library and include directories to cmake build file Fixes a compilation error in the python wrapper
1 parent ee9c00a commit 44100ff

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

cmake/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ELSE()
1111
MESSAGE(STATUS "Looking for opencascade include files in: ${OCC_INCLUDE_DIR}")
1212
ENDIF()
1313

14-
FIND_FILE(gp_Pnt_hxx "gp_Pnt.hxx" ${OCC_INCLUDE_DIR})
14+
FIND_FILE(gp_Pnt_hxx "gp_Pnt.hxx" ${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc)
1515
IF(gp_Pnt_hxx)
1616
MESSAGE(STATUS "Header files found")
1717
ELSE()
@@ -29,7 +29,7 @@ ELSE()
2929
MESSAGE(STATUS "Looking for opencascade library files in: ${OCC_LIBRARY_DIR}")
3030
ENDIF()
3131

32-
FIND_LIBRARY(libTKernel "TKernel" ${OCC_LIBRARY_DIR})
32+
FIND_LIBRARY(libTKernel "TKernel" ${OCC_LIBRARY_DIR} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64)
3333
IF(libTKernel)
3434
MESSAGE(STATUS "Library files found")
3535
ELSE()
@@ -61,9 +61,9 @@ CHECK_ADD_OCE_OCC_DEF(iostream.h)
6161
IF(NOT CMAKE_BUILD_TYPE)
6262
SET(CMAKE_BUILD_TYPE "Release")
6363
ENDIF(NOT CMAKE_BUILD_TYPE)
64-
ADD_DEFINITIONS(-fPIC)
64+
ADD_DEFINITIONS(-fPIC -Wno-non-virtual-dtor)
6565

66-
INCLUDE_DIRECTORIES(${OCC_INCLUDE_DIR})
66+
INCLUDE_DIRECTORIES(${OCC_INCLUDE_DIR} /usr/inc /usr/local/inc)
6767
ADD_LIBRARY(IfcParse STATIC
6868
../src/ifcparse/Ifc2x3.cpp
6969
../src/ifcparse/IfcUtil.cpp
@@ -83,7 +83,7 @@ ADD_LIBRARY(IfcGeom STATIC
8383

8484
TARGET_LINK_LIBRARIES(IfcGeom IfcParse)
8585

86-
LINK_DIRECTORIES (${IfcOpenShell_BINARY_DIR} /usr/lib)
86+
LINK_DIRECTORIES (${IfcOpenShell_BINARY_DIR} /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64)
8787
ADD_EXECUTABLE(IfcObj ../src/ifcobj/IfcObj.cpp)
8888
TARGET_LINK_LIBRARIES (IfcObj IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet)
8989

src/ifcgeom/IfcGeomFunctions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ bool IfcGeom::convert_wire_to_face(const TopoDS_Wire& wire, TopoDS_Face& face) {
104104
if ( er == BRepBuilderAPI_NotPlanar ) {
105105
ShapeFix_ShapeTolerance FTol;
106106
FTol.SetTolerance(wire, 0.01, TopAbs_WIRE);
107-
mf = BRepBuilderAPI_MakeFace(wire, false);
107+
mf.~BRepBuilderAPI_MakeFace();
108+
new (&mf) BRepBuilderAPI_MakeFace(wire);
108109
er = mf.Error();
109110
}
110111
if ( er != BRepBuilderAPI_FaceDone ) return false;

src/ifcgeom/IfcGeomObjects.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ extern bool IfcGeomObjects::Next() {
257257
extern const IfcGeomObjects::IfcGeomObject* IfcGeomObjects::Get() {
258258
return currentGeomObj;
259259
}
260+
extern bool IfcGeomObjects::Init(const char* fn, bool world_coords) {
261+
return IfcGeomObjects::Init(fn, world_coords, 0, 0);
262+
}
260263
extern bool IfcGeomObjects::Init(const char* fn, bool world_coords, std::ostream* log1, std::ostream* log2) {
261264
if ( log1 || log2 ) Ifc::SetOutput(log1,log2);
262265
use_world_coords = world_coords;

src/ifcgeom/IfcGeomObjects.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ namespace IfcGeomObjects {
9797
IfcGeomObject( const std::string& n, const std::string& t, gp_Trsf trsf, IfcMesh* m );
9898
};
9999

100+
extern bool Init(const char* fn, bool world_coords = false);
100101
extern bool Init(const char* fn, bool world_coords = false, std::ostream* log1= 0, std::ostream* log2= 0);
101102
extern bool Init(std::istream& f, int len, bool world_coords = false, std::ostream* log1= 0, std::ostream* log2= 0);
102103
extern const IfcGeomObject* Get();

src/ifcwrap/Interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ namespace IfcGeomObjects {
3636

3737
extern bool Next();
3838
extern const IfcGeomObject* Get();
39-
extern bool Init(char* fn, bool world_coords = false);
39+
extern bool Init(const char* fn, bool world_coords = false);
4040
extern int Progress();
4141
};

0 commit comments

Comments
 (0)