summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-08 12:25:59 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-08 12:25:59 (GMT)
commit5a745cfbe0f4ebbf11c7ec38ea287842a7b2c164 (patch)
tree0ed6e20d0dea36c7362ea870510402e7b55472cb /Modules
parent37955f87d64c22c8119d387956aac8372cb3e38a (diff)
parent796b447373ea8b085a8e41903dacdf9cc27f171a (diff)
downloadCMake-5a745cfbe0f4ebbf11c7ec38ea287842a7b2c164.zip
CMake-5a745cfbe0f4ebbf11c7ec38ea287842a7b2c164.tar.gz
CMake-5a745cfbe0f4ebbf11c7ec38ea287842a7b2c164.tar.bz2
Merge branch 'FindOpenSSL-3.0' into release-3.17
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 45b641d..ad1018f 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -419,11 +419,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 ()