Allow the user to use a conan profile
ddalcino opened this issue · comments
Sometimes it can be challenging to convince Conan to use the settings that you want it to. Conan allows users to use a profile to provide fine grain control over what settings Conan uses. See Conan instructions for using Emscripten for a common use case for Conan profiles.
Currently, project_options
forces the user to use conan_cmake_autodetect()
to determine settings automatically. A Conan profile, if desired, should replace this step, and allow the user to choose all of these settings explicitly.
What I would like: I think that a user should be allowed to pass a Conan profile as an argument to the project_options
function. When that variable is not empty, project_options
should skip conan_cmake_autodetect()
, and call conan_cmake_install()
with the argument PROFILE ${PATH_TO_CONAN_PROFILE}
.
Just a suggestion. Can we make it work in dynamic_project_options too, like the way CONAN_OPTIONS work? It can be called CONAN_SETTINGS like you did.