cmake-conan icon indicating copy to clipboard operation
cmake-conan copied to clipboard

conan_config_install() fails with optional argumens

Open Sirdavos opened this issue 5 years ago • 1 comments

conan_config_install(ITEM /locate/to/file.zip VERIFY_SSL False) Once above command is called in cmake, below error is generated. usage: conan config [-h] {get,home,install,rm,set} ... conan config: error: unrecognized arguments ERROR: Exiting with code: 2

I found the issue is related with conan.cmake In macro(conan_config_install) .. if(DEFINED CONAN_VERIFY_SSL) set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --verify-ssl=${CONAN_VERIFY_SSL}") endif()

I removed white space before --verify-ssl and the issue is solved.

Sirdavos avatar May 24 '20 17:05 Sirdavos

Hi @Sirdavos, Thanks a lot for reporting the issue, looks like the arguments have to be stripped before passing to execute_process. I'll open a PR to fix the issue.

czoido avatar May 26 '20 06:05 czoido