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

Add BUILD_REQUIRES and {PROFILE,SETTINGS,OPTIONS}_{BUILD,HOST} #298

Closed
puetzk opened this issue Dec 7, 2020 · 1 comment
Closed

Add BUILD_REQUIRES and {PROFILE,SETTINGS,OPTIONS}_{BUILD,HOST} #298

puetzk opened this issue Dec 7, 2020 · 1 comment

Comments

@puetzk
Copy link
Contributor

puetzk commented Dec 7, 2020

This was previously rejected in #67 (comment), but the rationale there is no longer true. conanfile.txt does support [build_requires] since conan 1.1.0, and they are not interchangeable when cross-compiling.

We have a number of consumers that use conan_cmake_run(REQUIRES ...) because they have a lot of CMake build options that affect which requirements to pull in. While it would be possible to define a conanfile.py with corresponding options, this is rather awkward compared to just being able to put conditional logic in the CMakeLists.txt deciding what they want. It would be nice if cmake-conan had at least the bare minimum to put packages in [build_requires], and to pass --{profile,options,settings}:{host,build}

TODO: how should this interact with PROFILE_AUTO? Most such should presumably go to SETTINGS_HOST, but maybe some of the CMAKE_HOST_* variables could help to fill in SETTINGS_BUILD (note mismatch of terminology - CMake calls the system CMake is running on CMAKE_HOST_*, which is what conan calls "build"

@puetzk
Copy link
Contributor Author

puetzk commented Mar 6, 2021

The requested options seem to have been added in #250 and #310, thanks!

@puetzk puetzk closed this as completed Mar 6, 2021
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