norlab-ulaval / libpointmatcher

An Iterative Closest Point (ICP) library for 2D and 3D mapping in Robotics
BSD 3-Clause "New" or "Revised" License
1.61k stars 544 forks source link

Compilation on windows #493

Closed oesi82 closed 1 year ago

oesi82 commented 2 years ago

When building and installing the lib on windows the release and debug libs are installed in the same folder with the same name, i.e., pointmatcher.lib. Thus it is not possible to have debug and release lib at the same time. Commonly, a 'd' is used as a suffix to differ the debug from release build. I would be happy if you add _set(CMAKE_DEBUGPOSTFIX "d") to the CMakeLists.txt.

In the debug build (with msvc 2022) there is an error: SamplingSurfaceNormal.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj Adding _adddefinitions(/bigobj) for msvc builds resolves the error.

pomerlef commented 2 years ago

@oesi82 , thanks for reporting. We don't have a build system on Windows on our side. It would be great if you could propose a PR and we could validate if the patch doesn't affect other OS build.