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

YCM-based superbuild does not work when cross-compiling with a toolchain that sets CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to ONLY #250

Open
traversaro opened this issue Apr 22, 2019 · 1 comment

Comments

@traversaro
Copy link
Member

Some CMake toolchain for cross-compiling set the CMAKE_FIND_ROOT_PATH_MODE_PACKAGE CMake variable to ONLY . For an example of such toolchain, see Emscripten's one at : https://github.com/emscripten-core/emscripten/blob/1.38.30/cmake/Modules/Platform/Emscripten.cmake#L189 .

When this option is used with the ONLY option, the CMAKE_PREFIX_PATH variable, that is used by the superbuild's subproject and by the YCMBootstrap to find the superbuild subprojects already installed, is ignored by find_package calls, and it is only possible to specify directories in which to search by setting the CMAKE_FIND_ROOT_PATH CMake variable. A possible solution is indeed to check in the superbuild if CMAKE_FIND_ROOT_PATH_MODE_PACKAGE is set to ONLY and propagate/set CMAKE_FIND_ROOT_PATH instead of propagating and setting CMAKE_PREFIX_PATH.

cc @diegoferigo

@traversaro
Copy link
Member Author

Related conan issue: conan-io/conan#4967 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants