Skip to content

Commit d3c6bd0

Browse files
authored
Merge pull request ifcquery#123 from lamorlette-cintoo/bugfix/linux-compilation-fpic
Linux compilation -fPIC
2 parents 777c39f + 47fac5f commit d3c6bd0

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

CMakeLists.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ OPTION(BUILD_VIEWER_APPLICATION "Build the viewer example application" ON)
2020
OPTION(BUILD_STATIC_LIBRARY "Build static library" ON)
2121

2222
IF(NOT WIN32)
23-
IF("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
24-
IF(CMAKE_COMPILER_IS_GNUCXX)
25-
SET_PROPERTY(DIRECTORY APPEND PROPERTY
26-
COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG>
27-
)
28-
ENDIF()
29-
ENDIF()
23+
IF("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
24+
IF(CMAKE_COMPILER_IS_GNUCXX)
25+
SET_PROPERTY(DIRECTORY APPEND PROPERTY
26+
COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG>
27+
)
28+
ENDIF()
29+
ENDIF()
30+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
3031
ELSE(NOT WIN32)
3132
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
3233
ENDIF(NOT WIN32)

IfcPlusPlus/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ IF(Boost_FOUND)
6767
ENDIF()
6868

6969
set_target_properties(IfcPlusPlus PROPERTIES DEBUG_POSTFIX "d")
70-
set_target_properties(IfcPlusPlus PROPERTIES LINK_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
70+
71+
IF(WIN32)
72+
set_target_properties(IfcPlusPlus PROPERTIES LINK_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
73+
ENDIF()
74+
7175

7276
INSTALL(
7377
DIRECTORY src/ifcpp

external/Carve/src/include/carve/mesh_simplify.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,7 @@ class MeshSimplifier {
14321432
meshset->meshes.erase(
14331433
std::remove_if(
14341434
meshset->meshes.begin(), meshset->meshes.end(),
1435-
std::bind2nd(std::equal_to<mesh_t*>(), (mesh_t*)nullptr)),
1435+
std::bind(std::equal_to<mesh_t*>(), std::placeholders::_1, (mesh_t*)nullptr)),
14361436
meshset->meshes.end());
14371437
return n_removed;
14381438
}

0 commit comments

Comments
 (0)