Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
cc4ab38f
Commit
cc4ab38f
authored
Oct 29, 2017
by
Marian Triebe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OpenSSL header/library version mismatch check
closes #616
parent
051e46ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
CMakeLists.txt
CMakeLists.txt
+29
-2
No files found.
CMakeLists.txt
View file @
cc4ab38f
cmake_minimum_required
(
VERSION 2.8.4
)
cmake_minimum_required
(
VERSION 2.8.4
)
project
(
caf C CXX
)
project
(
caf C CXX
)
include
(
CheckCSourceCompiles
)
include
(
CheckCSourceRuns
)
# be nice to vim users
# be nice to vim users
set
(
CMAKE_EXPORT_COMPILE_COMMANDS 1
)
set
(
CMAKE_EXPORT_COMPILE_COMMANDS 1
)
...
@@ -531,8 +534,32 @@ add_optional_caf_lib(io)
...
@@ -531,8 +534,32 @@ add_optional_caf_lib(io)
if
(
NOT CAF_NO_OPENSSL
)
if
(
NOT CAF_NO_OPENSSL
)
find_package
(
OpenSSL
)
find_package
(
OpenSSL
)
if
(
OPENSSL_FOUND
)
if
(
OPENSSL_FOUND
)
# Check OpenSSL version >= 1.0.1
if
(
OPENSSL_VERSION VERSION_LESS 1.0.1
)
message
(
STATUS
"Disable OpenSSL. Required >= 1.0.1 due to TLSv2 support."
)
set
(
CAF_NO_OPENSSL yes
)
else
()
# Check if openssl headers and library versions match
set
(
CMAKE_REQUIRED_LIBRARIES
${
OPENSSL_LIBRARIES
}
)
set
(
CMAKE_REQUIRED_INCLUDES
${
OPENSSL_INCLUDE_DIR
}
)
check_c_source_runs
(
"
#include <openssl/opensslv.h>
#include <openssl/crypto.h>
int main() {
if (SSLeay() == OPENSSL_VERSION_NUMBER) {
return 0;
}
return -1;
}
"
OPENSSL_CORRECT_VERSION_NUMBER
)
if
(
NOT OPENSSL_CORRECT_VERSION_NUMBER
)
message
(
FATAL_ERROR
"OpenSSL library version does not match headers"
)
endif
()
include_directories
(
BEFORE
${
OPENSSL_INCLUDE_DIR
}
)
include_directories
(
BEFORE
${
OPENSSL_INCLUDE_DIR
}
)
add_optional_caf_lib
(
openssl
)
add_optional_caf_lib
(
openssl
)
endif
()
else
(
OPENSSL_FOUND
)
else
(
OPENSSL_FOUND
)
set
(
CAF_NO_OPENSSL yes
)
set
(
CAF_NO_OPENSSL yes
)
endif
(
OPENSSL_FOUND
)
endif
(
OPENSSL_FOUND
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment