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

Fix/238 #241

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions conan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -586,25 +586,24 @@ macro(conan_config_install)
endif()

if(DEFINED CONAN_VERIFY_SSL)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --verify-ssl ${CONAN_VERIFY_SSL}")
string(STRIP "${CONAN_CONFIG_INSTALL_ARGS} --verify-ssl=${CONAN_VERIFY_SSL}" CONAN_CONFIG_INSTALL_ARGS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way of concatenating args, using a STRIP is a bit weird. I think I would have concat (using "=", that is correct), and then strip at the end if necessary. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a bit weird, in fact, I have just realized that there was another PR from an user solving this: #215 I'll close this one in favor of that one and add the test there.

endif()

if(DEFINED CONAN_TYPE)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --type ${CONAN_TYPE}")
string(STRIP "${CONAN_CONFIG_INSTALL_ARGS} --type=${CONAN_TYPE}" CONAN_CONFIG_INSTALL_ARGS)
endif()

if(DEFINED CONAN_ARGS)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --args \"${CONAN_ARGS}\"")
string(STRIP "${CONAN_CONFIG_INSTALL_ARGS} --args=\"${CONAN_ARGS}\"" CONAN_CONFIG_INSTALL_ARGS)
endif()

if(DEFINED CONAN_SOURCE)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --source-folder ${CONAN_SOURCE}")
string(STRIP "${CONAN_CONFIG_INSTALL_ARGS} --source-folder=${CONAN_SOURCE}" CONAN_CONFIG_INSTALL_ARGS)
endif()

if(DEFINED CONAN_TARGET)
set(CONAN_CONFIG_INSTALL_ARGS "${CONAN_CONFIG_INSTALL_ARGS} --target-folder ${CONAN_TARGET}")
string(STRIP "${CONAN_CONFIG_INSTALL_ARGS} --target-folder=${CONAN_TARGET}" CONAN_CONFIG_INSTALL_ARGS)
endif()

message(STATUS "Conan: Installing config from ${CONAN_ITEM}")
execute_process(COMMAND ${CONAN_CMD} config install ${CONAN_CONFIG_INSTALL_ARGS} ${CONAN_ITEM})
execute_process(COMMAND ${CONAN_CMD} config install ${CONAN_ITEM} ${CONAN_CONFIG_INSTALL_ARGS})
endmacro()
2 changes: 1 addition & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def test_conan_config_install(self):

set(CONAN_DISABLE_CHECK_COMPILER ON)
include(conan.cmake)
conan_config_install(ITEM \"${PROJECT_SOURCE_DIR}/config/\")
conan_config_install(ITEM \"${PROJECT_SOURCE_DIR}/config/\" VERIFY_SSL False)
""")

save("config/remotes.txt", "%s %s %r" % (remote_name, remote_url, verify_ssl))
Expand Down