-
Notifications
You must be signed in to change notification settings - Fork 7
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
CMAKE_INSTALL_PREFIX in toolchain breaks compilation #17
Comments
@cottsay I think you're the best person to answer this. |
I'm not convinced that setting
The primary reason is staging. Build and install are separate phases, and |
IMO setting
You are hacking around this feature by playing with install prefix. There is probably a way to do it properly by adjusting external project steps and adding install dependencies, see https://stackoverflow.com/questions/37838786/how-to-not-make-install-step-when-building-external-project-with-cmake and https://cmake.org/cmake/help/latest/module/ExternalProject.html, but I would generally advise against using external project at all -- it is unreliable in many ways including the necessity to fetch sources during builds. |
I am setting CMAKE_INSTALL_PREFIX in a cmake toolchain for certain technical reason. In this case toolchain overrides command line parameters, so
https://github.com/ament/google_benchmark_vendor/blob/main/CMakeLists.txt#L66 has no effect and the installation logic below https://github.com/ament/google_benchmark_vendor/blob/main/CMakeLists.txt#L74 fails.
Is there a reason for installing external project to a temporary directory? It looks like an unnecessary step --CMAKE_INSTALL_PREFIX can be passed directly to the external project without extra install command. This would work just fine in my environment as well.
The text was updated successfully, but these errors were encountered: