Skip to content

WIP: Modernize CMake #2967

Draft
Ram-Z wants to merge 4 commits intoPointCloudLibrary:masterfrom
Ram-Z:modernize_cmake
Draft

WIP: Modernize CMake #2967
Ram-Z wants to merge 4 commits intoPointCloudLibrary:masterfrom
Ram-Z:modernize_cmake

Conversation

@Ram-Z
Copy link
Copy Markdown

@Ram-Z Ram-Z commented Apr 4, 2019

I had an issue with the link interface of various pcl targets, which would include ALL VTK libraries, which would result in any targets using say pcl_visualization to also link against libvtkIONetCDF.so.1 which is not required by it. The relevant changes are here.

However, this got a bit out of hand and I started modifying all pcl targets to provide their include and link libraries in their target interface. The more interesting changes are in pcl_targets.cmake.

Is this a change you would be interested in? I don't want to spend more time on this otherwise.

What minimum version of CMake do you want to support? It's currently set to 3.1, this was buildt using 3.14 and may use some newer features.

This builds all default libraries, tools were disabled for now.

-- The following subsystems will be built:
--   common
--   kdtree
--   octree
--   search
--   sample_consensus
--   filters
--   2d
--   geometry
--   io
--   features
--   ml
--   segmentation
--   visualization
--   surface
--   registration
--   keypoints
--   tracking
--   recognition
--   stereo
--   outofcore
--   people
-- The following subsystems will not be built:
--   apps: No reason
--   examples: Code examples are disabled by default.
--   simulation: Disabled by default.
--   global_tests: No reason
--   tools: Disabled manually.

@taketwo
Copy link
Copy Markdown
Member

taketwo commented Apr 4, 2019

We are certainly interested in modernizing our CMake scripts and welcome contributions in that direction.

What you decided to do is a great undertaking. We will need to be very careful though:

  • our CI pipelines neither test CMake scripts explicitly, nor package the library;
  • there are numerous corner cases and platform-dependent conditions in the scripts.

We will need extensive manual testing to make sure we don't break anything on any platform. I would prefer if we split this modernization over a series of as small as possible PRs which are easy to review and test.

What minimum version of CMake do you want to support?

Currently we require 3.1, however we may raise this to 3.5 if needed. Our current baseline environment is Ubuntu 16.04 (which has 3.5) and we'd prefer to not require anything higher than that unless absolutely needed.

@Ram-Z Ram-Z force-pushed the modernize_cmake branch from 5f55d8a to 352fc9d Compare April 9, 2019 14:50
@Ram-Z
Copy link
Copy Markdown
Author

Ram-Z commented Apr 9, 2019

Thanks for your reply, sorry it took so long to get back to you.

So far there was only one feature I used that required CMake>=3.5, which I have now reverted. I also managed to build the tools.

I would prefer if we split this modernization over a series of as small as possible PRs which are easy to review and test.

I'm not entirely sure how this can be split up. I'm open to suggestions.

@SergioRAgostinho
Copy link
Copy Markdown
Member

SergioRAgostinho commented Apr 9, 2019

Let's go progressively. My first suggestion would be to go first for component specification for vtk in CMakeLists.txt. It's a very small change which might have unforeseen consequences. I also see you
added the comment

#TODO this may not be sufficient if OpenGL2 is available

I believe that to be the case in the majority of platforms these days.

I say we try that first and let it run through the CI, because right now you have no feedback whatsoever of what is building on osx and windows. It's a simple step but a necessary one.

Edit: This is just a proposal to kickstart the discussion with a meaningful suggestion.

@stale
Copy link
Copy Markdown

stale bot commented Jun 10, 2019

This pull request has been automatically marked as stale because it hasn't had
any activity in the past 60 days. Commenting or adding a new commit to the
pull request will revert this.

Come back whenever you have time. We look forward to your contribution.

@stale stale bot added the status: stale label Jun 10, 2019
@stale
Copy link
Copy Markdown

stale bot commented Feb 21, 2020

This pull request has been automatically marked as stale because it hasn't had
any activity in the past 60 days. Commenting or adding a new commit to the
pull request will revert this.

Come back whenever you have time. We look forward to your contribution.

@kunaltyagi kunaltyagi removed the stale label Feb 27, 2020
@stale stale bot removed the status: stale label Feb 27, 2020
@taketwo taketwo added needs: more work Specify why not closed/merged yet status: stale labels Feb 29, 2020
@stale stale bot removed the status: stale label Feb 29, 2020
@stale
Copy link
Copy Markdown

stale bot commented May 19, 2020

Marking this as stale due to 30 days of inactivity. Commenting or adding a new commit to the pull request will revert this.

@stale stale bot added the status: stale label May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: cmake needs: more work Specify why not closed/merged yet status: stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants