diff options
Diffstat (limited to 'Modules/FindPerl.cmake')
-rw-r--r-- | Modules/FindPerl.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake index 3fd5d8e..70284b6 100644 --- a/Modules/FindPerl.cmake +++ b/Modules/FindPerl.cmake @@ -70,9 +70,9 @@ if(PERL_EXECUTABLE) OUTPUT_STRIP_TRAILING_WHITESPACE ) if(NOT PERL_VERSION_RESULT_VARIABLE AND PERL_VERSION_OUTPUT_VARIABLE MATCHES "This is perl.*[ \\(]v([0-9\\._]+)[ \\)]") - string(REGEX REPLACE ".*This is perl.*[ \\(]v([0-9\\._]+)[ \\)].*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE}) + set(PERL_VERSION_STRING "${CMAKE_MATCH_1}") elseif(NOT PERL_VERSION_RESULT_VARIABLE AND PERL_VERSION_OUTPUT_VARIABLE MATCHES "This is perl, version ([0-9\\._]+) +") - string(REGEX REPLACE ".*This is perl, version ([0-9\\._]+) +.*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE}) + set(PERL_VERSION_STRING "${CMAKE_MATCH_1}") endif() endif() endif() |