summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-09 12:53:00 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-09 12:53:05 (GMT)
commit5bb24ed550f5a68a9241a01bdcadd4b5ca6bf691 (patch)
tree0d418f06f5f7c0fe54be59c51e16e57cda3bf6a2 /Modules
parentb5d8e9373263732f26587d4624e697ddb1aff8ac (diff)
parent796b447373ea8b085a8e41903dacdf9cc27f171a (diff)
downloadCMake-5bb24ed550f5a68a9241a01bdcadd4b5ca6bf691.zip
CMake-5bb24ed550f5a68a9241a01bdcadd4b5ca6bf691.tar.gz
CMake-5bb24ed550f5a68a9241a01bdcadd4b5ca6bf691.tar.bz2
Merge topic 'FindOpenSSL-3.0' into release-3.18
796b447373 FindOpenSSL: Fix OpenSSL 3.0.0 version extraction Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4860
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindOpenSSL.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 8ddd78e..ee40696 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -444,11 +444,13 @@ if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
# Since OpenSSL 3.0.0, the new version format is MAJOR.MINOR.PATCH and
# a new OPENSSL_VERSION_STR macro contains exactly that
file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" OPENSSL_VERSION_STR
- REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\.([0-9])+\.([0-9])+\".*")
- string(REGEX REPLACE "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+\.[0-9]+\.[0-9]+)\".*$"
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_STR[\t ]+\"([0-9])+\\.([0-9])+\\.([0-9])+\".*")
+ string(REGEX REPLACE "^.*OPENSSL_VERSION_STR[\t ]+\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*$"
"\\1" OPENSSL_VERSION_STR "${OPENSSL_VERSION_STR}")
set(OPENSSL_VERSION "${OPENSSL_VERSION_STR}")
+
+ unset(OPENSSL_VERSION_STR)
endif ()
endif ()