Add quotes around CMAKE_MATCH_1 to avoid CMake failure in case it is empty.
@@ -236,13 +236,13 @@ function(conan_get_compiler CONAN_INFO_COMPILER CONAN_INFO_COMPILER_VERSION)
string(REGEX MATCH "compiler=([-A-Za-z0-9_ ]+)" _MATCHED ${CONANINFO})
if(DEFINED CMAKE_MATCH_1)
- string(STRIP ${CMAKE_MATCH_1} _CONAN_INFO_COMPILER)
+ string(STRIP "${CMAKE_MATCH_1}" _CONAN_INFO_COMPILER)
set(${CONAN_INFO_COMPILER} ${_CONAN_INFO_COMPILER} PARENT_SCOPE)
endif()
string(REGEX MATCH "compiler.version=([-A-Za-z0-9_.]+)" _MATCHED ${CONANINFO})
if(DEFINED CMAKE_MATCH_1)
- string(STRIP ${CMAKE_MATCH_1} _CONAN_INFO_COMPILER_VERSION)
+ string(STRIP "${CMAKE_MATCH_1}" _CONAN_INFO_COMPILER_VERSION)
set(${CONAN_INFO_COMPILER_VERSION} ${_CONAN_INFO_COMPILER_VERSION} PARENT_SCOPE)
endif()
endfunction()
