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

Question about handling of CMAKE_PREFIX_PATH #1161

Open
mvieth opened this issue Jan 2, 2022 · 0 comments
Open

Question about handling of CMAKE_PREFIX_PATH #1161

mvieth opened this issue Jan 2, 2022 · 0 comments

Comments

@mvieth
Copy link

mvieth commented Jan 2, 2022

Hi, I have a question about the handling of CMAKE_PREFIX_PATH:

catkin/cmake/all.cmake

Lines 42 to 55 in a31d889

# use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
# or CMAKE_PREFIX_PATH from the environment
if(NOT DEFINED CMAKE_PREFIX_PATH)
if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
if(NOT WIN32)
string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
else()
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
endif()
endif()
endif()
message(STATUS "Using CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
# store original CMAKE_PREFIX_PATH
set(CMAKE_PREFIX_PATH_AS_IS ${CMAKE_PREFIX_PATH})

At the beginning, it is tested whether CMAKE_PREFIX_PATH is not defined. We discovered a problem in perception_pcl (ros-perception/perception_pcl#351) where CMAKE_PREFIX_PATH is defined, but empty. For details, please see there. This problem is fixed now in perception_pcl (at least for ROS 1), but it could potentially appear similarly for other ROS packages, so I wanted to notify you of this behaviour and ask, why it was written this way

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

No branches or pull requests

1 participant