conan-io / cmake-conan

CMake wrapper for conan C and C++ package manager
MIT License
831 stars 252 forks source link

conan_config_install() fails with optional argumens #238

Open Sirdavos opened 4 years ago

Sirdavos commented 4 years ago

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.

czoido commented 4 years ago

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.