From 44c8da91ef658f015e0f9ce2110221eb1ccfe9dc Mon Sep 17 00:00:00 2001 From: czoido Date: Tue, 26 May 2020 08:51:31 +0200 Subject: [PATCH 1/5] add quotes to execute process command --- conan.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conan.cmake b/conan.cmake index 6425a9fd..4655c6f2 100644 --- a/conan.cmake +++ b/conan.cmake @@ -606,5 +606,5 @@ macro(conan_config_install) 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_CONFIG_INSTALL_ARGS} ${CONAN_ITEM}) endmacro() From 2368af7c9f543d6f0d204cc74a188e78e8d455b8 Mon Sep 17 00:00:00 2001 From: czoido Date: Tue, 26 May 2020 09:44:25 +0200 Subject: [PATCH 2/5] add verify to test --- tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.py b/tests.py index 3ca38433..37a8c775 100644 --- a/tests.py +++ b/tests.py @@ -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)) From d7e6cb84bf7fd3194ae7afeac4d14e92e89c5c05 Mon Sep 17 00:00:00 2001 From: czoido Date: Tue, 26 May 2020 09:45:08 +0200 Subject: [PATCH 3/5] strip command and add equals --- conan.cmake | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/conan.cmake b/conan.cmake index 4655c6f2..8ffc3369 100644 --- a/conan.cmake +++ b/conan.cmake @@ -586,25 +586,23 @@ 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) 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() From c974c5988b74716ca76b889e4e18a9f1d3561a4d Mon Sep 17 00:00:00 2001 From: czoido Date: Tue, 26 May 2020 09:47:26 +0200 Subject: [PATCH 4/5] put message back --- conan.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/conan.cmake b/conan.cmake index 8ffc3369..e7586491 100644 --- a/conan.cmake +++ b/conan.cmake @@ -604,5 +604,6 @@ macro(conan_config_install) if(DEFINED 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_ITEM} ${CONAN_CONFIG_INSTALL_ARGS}) endmacro() From fc22177e43292d63e1add00c8cda16ff023e1ab4 Mon Sep 17 00:00:00 2001 From: czoido Date: Tue, 26 May 2020 10:21:31 +0200 Subject: [PATCH 5/5] remove quotes --- conan.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conan.cmake b/conan.cmake index e7586491..40e60878 100644 --- a/conan.cmake +++ b/conan.cmake @@ -605,5 +605,5 @@ macro(conan_config_install) 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_ITEM} ${CONAN_CONFIG_INSTALL_ARGS}) + execute_process(COMMAND ${CONAN_CMD} config install ${CONAN_ITEM} ${CONAN_CONFIG_INSTALL_ARGS}) endmacro()