Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed MSVC linker crash. #350

Merged
merged 1 commit into from
Nov 8, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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