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

replaced add_definitions calls within PCLConfig.cmake.in with appending PCL_DEFINITIONS #1478

Merged
merged 1 commit into from
Aug 22, 2016

Conversation

Algomorph
Copy link
Contributor

PCLConfig previously used two strategies for providing compile definitions to the CMake targets dependent on pcl. Mostly, the defines were added to the PCL_DEFINITIONS variable, which then could be used in the dependency's cmake. In two instances, add_definitions was used directly.

The latter strategy causes errors in compilation of projects having some targets that use PCL and some that don't, while, for instance, using CUDA / nvcc. In the nvcc case, the error caused by extra compile flags is "nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified"

Discussion:
It is unclear to me why compile definitions are necessary at all in this case. The file pcl_config.h.in is configured at the time of CMake generation for pcl, and it probably should have all the flags set correctly at that time instead of relying on -DDISABLE_<?> flags and such. Files that rely on these definitions should include the pcl_config.h header. This way, users don't need to use PCL_DEFINTIONS explicitly at all.

@SergioRAgostinho SergioRAgostinho added the needs: code review Specify why not closed/merged yet label Jul 14, 2016
@SergioRAgostinho SergioRAgostinho added this to the pcl-1.8.1 milestone Jul 14, 2016
@SergioRAgostinho
Copy link
Member

@nizar-sallem Can you have a look at this?

@taketwo
Copy link
Member

taketwo commented Aug 22, 2016

+1 for the changes in this pull request.
Also, completely agree with the point made in discussion section. We may add removal of PCL_DEFINITIONS for the 1.9.0 list.

@SergioRAgostinho SergioRAgostinho merged commit 5d19050 into PointCloudLibrary:master Aug 22, 2016
@taketwo taketwo removed the needs: code review Specify why not closed/merged yet label Aug 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants