conan_add_remote() requires conan_check()
See original GitHub issueconan
exe is run inconsistently across conan.cmake
. conan_cmake_install()
uses conan
from system PATH by default:
https://github.com/conan-io/cmake-conan/blob/c0258fce782597a6ef64050e2e67846598d27536/conan.cmake#L268 https://github.com/conan-io/cmake-conan/blob/c0258fce782597a6ef64050e2e67846598d27536/conan.cmake#L285-L289 https://github.com/conan-io/cmake-conan/blob/c0258fce782597a6ef64050e2e67846598d27536/conan.cmake#L334-L336
but conan_add_remote()
requires conan_check()
to find it first:
https://github.com/conan-io/cmake-conan/blob/c0258fce782597a6ef64050e2e67846598d27536/conan.cmake#L437 https://github.com/conan-io/cmake-conan/blob/c0258fce782597a6ef64050e2e67846598d27536/conan.cmake#L446 https://github.com/conan-io/cmake-conan/blob/c0258fce782597a6ef64050e2e67846598d27536/conan.cmake#L464 https://github.com/conan-io/cmake-conan/blob/c0258fce782597a6ef64050e2e67846598d27536/conan.cmake#L478-L479 Without conan_check()
variable CONAN_CMD
does not exist and cmake function execute_process()
(and thus macro conan_add_remote()
) silently fails. No error message is shown, cmake continues execution.
I think that
- We somehow should check if
execute_process()
has been succeeded. On my system (python 3.7 windows x64) if I addRESULT_VARIABLE res
toexecute_process()
parameters, it returnsThe system cannot find the file specified
inres
on failure. But I don’t know how to get numeric exit code fromexecute_process()
to test if it’s non-zero. Any idea? - All functions have to use
${CONAN_CMD}
by default that probably should be set byfind_program(CONAN_CMD conan)
at the very beginning.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
@db4 https://github.com/bincrafters/conan-mongo-cxx-driver/tree/testing/3.3.0
This has been mostly resolved by https://github.com/conan-io/cmake-conan/pull/146 (thanks @rddesmond ), so I am closing this. If there is some further detail that you still are interested in, like additional arguments, please open a new issue for it. Thanks!