summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-10 09:09:54 -0400
committerCMake Topic Stage <kwrobot@kitware.com>2016-06-10 09:09:54 -0400
commitb29f1514d012fb3036fd4579ccfb4004c20d8771 (patch)
tree7487e202aec54667c672cf8fbf54d578f1b585d9 /Modules
parent5d078868f00ff8dd514c7c35542aaf2eb0b5ef5f (diff)
parente937b4c3879e1ee0770b465c0cdcbb6a960ba892 (diff)
downloadcmake-b29f1514d012fb3036fd4579ccfb4004c20d8771.tar.gz
Merge topic 'FindOpenSSL-BoringSSL'
e937b4c3 FindOpenSSL: Do not assume that the version regex finds something
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindOpenSSL.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 8dbaf11ded..6393f2edcf 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -328,11 +328,11 @@ function(from_hex HEX DEC)
set(${DEC} ${_res} PARENT_SCOPE)
endfunction()
-if (OPENSSL_INCLUDE_DIR)
- if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
- file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
- REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
+if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
+ file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
+ if(openssl_version_str)
# The version number is encoded as 0xMNNFFPPS: major minor fix patch status
# The status gives if this is a developer or prerelease and is ignored here.
# Major, minor, and fix directly translate into the version numbers shown in