Skip to content

Commit

Permalink
Merge pull request #350 from kwaegel/msvc_linker_fix
Browse files Browse the repository at this point in the history
Fixed MSVC linker crash.
  • Loading branch information
jspricke committed Nov 8, 2013
2 parents 096011b + 7a145eb commit 9d8eca6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion features/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,14 @@ if(build)
src/usc.cpp
src/range_image_border_extractor.cpp
)


if(MSVC)
# Workaround to aviod hitting the MSVC 4GB linker memory limit when building pcl_features.
# Disable whole program optimization (/GL) and link-time code generation (/LTCG).
string(REPLACE "/GL" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
string(REPLACE "/LTCG" "" CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE})
endif(MSVC)

set(LIB_NAME pcl_${SUBSYS_NAME})
PCL_ADD_LIBRARY(${LIB_NAME} ${SUBSYS_NAME} ${srcs} ${incs} ${impl_incs})
target_link_libraries(${LIB_NAME} pcl_common pcl_search pcl_kdtree pcl_octree pcl_filters)
Expand Down

0 comments on commit 9d8eca6

Please sign in to comment.