PointCloudLibrary / PointCloudLibrary/pcl

Simulate downstream user for Windows CI and vcpkg problems

Open
#3,289 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind: proposal module: ci needs: code review
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Currently, when I install pcl through vcpkg, it successfully installed but it's the old 1.9.1 release. My problem is when I link to it with a simple example like the below

CMakeLists.txt

cmake_minimum_required(VERSION 3.1)

project(Example)

set(PROJECT_SRCS ${PROJECT_SOURCE_DIR}/mycpp.cpp)

find_package( PCL REQUIRED )

add_executable(${PROJECT_NAME} ${PROJECT_SRCS})

target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES})

mycpp.cpp

int main(){
  return 0;
}

I got error messages like this

CMake Error at C:/dev/vcpkg/installed/x64-windows/share/pcl/PCLConfig.cmake:679 (set_target_properties):
  Property INTERFACE_LINK_LIBRARIES may not contain link-type keyword
  "optimized".  The INTERFACE_LINK_LIBRARIES property may contain
  configuration-sensitive generator-expressions which may be used to specify
  per-configuration rules.

My first question: is this solved on the latest master?

If yes, can @UnaNancyOwen @claudiofantacci share with me your modified vcpkg pcl portfile that works with the latest pcl master? My attempt at #3202 is not successful. Or is there a way to patch it up so the 1.9.1 pcl in vcpkg is usable?

If we are not sure, may I suggest to add a check into the current Windows CI? Currently, it only checks the basic builds and unit tests. I think it will be amazing to add a few more lines to simulate how the downstream user will link to pcl and see if it's successful.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PCLConfig.cmake failure at line 679 and the current Windows CI setup, then reproduce the downstream example using the vcpkg-installed PCL release described here. Compare the result with the latest master and the attempted vcpkg portfile from #3202. Done means the downstream link succeeds and, if appropriate, the Windows CI check catches this failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.