Closed themightyoarfish closed 1 year ago
Actually it seems that this isn't even a PCL problem:
$ brew --prefix libomp
/opt/homebrew/opt/libomp
$ cat ../CMakeLists.txt
project(openmp-bug)
list(APPEND CMAKE_PREFIX_PATH /opt/homebrew/opt/libomp/)
find_package(OpenMP REQUIRED)
$ cmake ..
CMake Error at /opt/homebrew/Cellar/cmake/3.24.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.24.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/opt/homebrew/Cellar/cmake/3.24.2/share/cmake/Modules/FindOpenMP.cmake:545 (find_package_handle_standard_args)
CMakeLists.txt:3 (find_package)
So something seems wholly broken on macos cmake.
Describe the error
After
brew install libomp
which installs version 15.0.6, OpenMP is not found during the PCL installTo Reproduce
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix libomp)
Result is
Your Environment (please complete the following information):
If PCL was compiled from source or failure in compiling PCL itself:
Possible Solution
I run into OpenMP issues with different libraries all the time, I am suspecting that cmake just doesn't handle this correctly on recent macOSes, but I'm not sure.