mirror of
https://github.com/cpm-cmake/CPM.cmake.git
synced 2026-02-05 22:35:49 +08:00
Improved regex match in cpm_package_name_from_git_uri (#206)
This commit is contained in:
committed by
GitHub
parent
4cbf443363
commit
4aadac1972
@@ -136,8 +136,7 @@ include(CMakeParseArguments)
|
||||
|
||||
# Infer package name from git repository uri (path or url)
|
||||
function(cpm_package_name_from_git_uri URI RESULT)
|
||||
string(REGEX MATCH "([^/:]+)/?.git/?$" cpmGitUriMatch "${URI}")
|
||||
if(DEFINED cpmGitUriMatch)
|
||||
if("${URI}" MATCHES "([^/:]+)/?.git/?$")
|
||||
set(${RESULT}
|
||||
${CMAKE_MATCH_1}
|
||||
PARENT_SCOPE
|
||||
|
||||
Reference in New Issue
Block a user