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
675794d7
Unverified
Commit
675794d7
authored
Nov 26, 2020
by
Dominik Charousset
Committed by
GitHub
Nov 26, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1180
Tidy up CMake setup, propagate flags via targets
parents
44c41ad2
30db620a
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
689 additions
and
694 deletions
+689
-694
CMakeLists.txt
CMakeLists.txt
+226
-124
cmake/build_config.hpp.in
cmake/build_config.hpp.in
+1
-20
examples/CMakeLists.txt
examples/CMakeLists.txt
+49
-49
libcaf_core/CMakeLists.txt
libcaf_core/CMakeLists.txt
+307
-332
libcaf_core/src/invoke_message_result_strings.cpp
libcaf_core/src/invoke_message_result_strings.cpp
+0
-0
libcaf_io/CMakeLists.txt
libcaf_io/CMakeLists.txt
+78
-113
libcaf_openssl/CMakeLists.txt
libcaf_openssl/CMakeLists.txt
+25
-53
tools/CMakeLists.txt
tools/CMakeLists.txt
+3
-3
No files found.
CMakeLists.txt
View file @
675794d7
This diff is collapsed.
Click to expand it.
cmake/build_config.hpp.in
View file @
675794d7
/******************************************************************************
// this header is auto-generated by CMake
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright (C) 2011 - 2016 *
* Dominik Charousset <dominik.charousset (at) haw-hamburg.de> *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#pragma once
#pragma once
#include "caf/detail/log_level.hpp"
#include "caf/detail/log_level.hpp"
// this header is auto-generated by CMake
#define CAF_LOG_LEVEL CAF_LOG_LEVEL_@CAF_LOG_LEVEL@
#define CAF_LOG_LEVEL CAF_LOG_LEVEL_@CAF_LOG_LEVEL@
#cmakedefine CAF_ENABLE_RUNTIME_CHECKS
#cmakedefine CAF_ENABLE_RUNTIME_CHECKS
...
...
examples/CMakeLists.txt
View file @
675794d7
...
@@ -2,13 +2,14 @@ add_custom_target(all_examples)
...
@@ -2,13 +2,14 @@ add_custom_target(all_examples)
function
(
add_example folder name
)
function
(
add_example folder name
)
add_executable
(
${
name
}
${
folder
}
/
${
name
}
.cpp
${
ARGN
}
)
add_executable
(
${
name
}
${
folder
}
/
${
name
}
.cpp
${
ARGN
}
)
install
(
FILES
${
folder
}
/
${
name
}
.cpp DESTINATION
${
CMAKE_INSTALL_DATADIR
}
/caf/examples/
${
folder
}
)
install
(
FILES
${
folder
}
/
${
name
}
.cpp
DESTINATION
${
CMAKE_INSTALL_DATADIR
}
/caf/examples/
${
folder
}
)
add_dependencies
(
${
name
}
all_examples
)
add_dependencies
(
${
name
}
all_examples
)
endfunction
()
endfunction
()
function
(
add_core_example folder name
)
function
(
add_core_example folder name
)
add_example
(
${
folder
}
${
name
}
${
ARGN
}
)
add_example
(
${
folder
}
${
name
}
${
ARGN
}
)
target_link_libraries
(
${
name
}
CAF::core
)
target_link_libraries
(
${
name
}
PRIVATE CAF::internal
CAF::core
)
endfunction
()
endfunction
()
# -- examples for CAF::core ----------------------------------------------------
# -- examples for CAF::core ----------------------------------------------------
...
@@ -43,7 +44,7 @@ add_core_example(custom_type custom_types_3)
...
@@ -43,7 +44,7 @@ add_core_example(custom_type custom_types_3)
# testing DSL
# testing DSL
add_example
(
testing ping_pong
)
add_example
(
testing ping_pong
)
target_link_libraries
(
ping_pong CAF::core CAF::test
)
target_link_libraries
(
ping_pong
PRIVATE CAF::internal
CAF::core CAF::test
)
# -- examples for CAF::io ------------------------------------------------------
# -- examples for CAF::io ------------------------------------------------------
...
@@ -52,7 +53,7 @@ if(TARGET CAF::io)
...
@@ -52,7 +53,7 @@ if(TARGET CAF::io)
function
(
add_io_example folder name
)
function
(
add_io_example folder name
)
add_example
(
${
folder
}
${
name
}
${
ARGN
}
)
add_example
(
${
folder
}
${
name
}
${
ARGN
}
)
target_link_libraries
(
${
name
}
CAF::io CAF::core
)
target_link_libraries
(
${
name
}
PRIVATE CAF::internal CAF::io
)
endfunction
()
endfunction
()
# basic remoting
# basic remoting
...
@@ -65,10 +66,7 @@ if(TARGET CAF::io)
...
@@ -65,10 +66,7 @@ if(TARGET CAF::io)
add_io_example
(
broker simple_broker
)
add_io_example
(
broker simple_broker
)
add_io_example
(
broker simple_http_broker
)
add_io_example
(
broker simple_http_broker
)
endif
()
if
(
CAF_ENABLE_PROTOBUF_EXAMPLES
)
if
(
CAF_ENABLE_PROTOBUF_EXAMPLES
)
find_package
(
Protobuf REQUIRED
)
find_package
(
Protobuf REQUIRED
)
if
(
NOT PROTOBUF_PROTOC_EXECUTABLE
)
if
(
NOT PROTOBUF_PROTOC_EXECUTABLE
)
message
(
FATAL_ERROR
"CMake was unable to set PROTOBUF_PROTOC_EXECUTABLE"
)
message
(
FATAL_ERROR
"CMake was unable to set PROTOBUF_PROTOC_EXECUTABLE"
)
...
@@ -77,11 +75,12 @@ if(CAF_ENABLE_PROTOBUF_EXAMPLES)
...
@@ -77,11 +75,12 @@ if(CAF_ENABLE_PROTOBUF_EXAMPLES)
include_directories
(
${
PROTOBUF_INCLUDE_DIR
}
)
include_directories
(
${
PROTOBUF_INCLUDE_DIR
}
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_executable
(
protobuf_broker broker/protobuf_broker.cpp
${
ProtoSources
}
)
add_executable
(
protobuf_broker broker/protobuf_broker.cpp
${
ProtoSources
}
)
target_link_libraries
(
protobuf_broker
${
PROTOBUF_LIBRARIES
}
CAF::core CAF::io
)
target_link_libraries
(
protobuf_broker
PRIVATE
${
PROTOBUF_LIBRARIES
}
CAF::internal CAF::io
)
add_dependencies
(
protobuf_broker all_examples
)
add_dependencies
(
protobuf_broker all_examples
)
endif
()
endif
()
if
(
CAF_ENABLE_QT5_EXAMPLES
)
if
(
CAF_ENABLE_QT5_EXAMPLES
)
find_package
(
Qt5 COMPONENTS Core Gui Widgets REQUIRED
)
find_package
(
Qt5 COMPONENTS Core Gui Widgets REQUIRED
)
message
(
STATUS
"Found Qt5"
)
message
(
STATUS
"Found Qt5"
)
#include(${QT_USE_FILE})
#include(${QT_USE_FILE})
...
@@ -103,15 +102,16 @@ if(CAF_ENABLE_QT5_EXAMPLES)
...
@@ -103,15 +102,16 @@ if(CAF_ENABLE_QT5_EXAMPLES)
Qt5::Core
Qt5::Core
Qt5::Gui
Qt5::Gui
Qt5::Widgets
Qt5::Widgets
CAF::core
CAF::io
)
CAF::io
)
add_dependencies
(
qt_group_chat all_examples
)
add_dependencies
(
qt_group_chat all_examples
)
endif
()
endif
()
if
(
CAF_ENABLE_CURL_EXAMPLES
)
if
(
CAF_ENABLE_CURL_EXAMPLES
)
find_package
(
CURL REQUIRED
)
find_package
(
CURL REQUIRED
)
add_executable
(
curl_fuse curl/curl_fuse.cpp
)
add_executable
(
curl_fuse curl/curl_fuse.cpp
)
include_directories
(
${
CURL_INCLUDE_DIRS
}
)
include_directories
(
${
CURL_INCLUDE_DIRS
}
)
target_link_libraries
(
curl_fuse
${
CURL_LIBRARY
}
CAF::core
CAF::io
)
target_link_libraries
(
curl_fuse
${
CURL_LIBRARY
}
CAF::io
)
add_dependencies
(
curl_fuse all_examples
)
add_dependencies
(
curl_fuse all_examples
)
endif
()
endif
()
endif
()
libcaf_core/CMakeLists.txt
View file @
675794d7
# --
get header files for creating "proper" XCode projects
---------------------
# --
collect header files ---------------------------------
---------------------
file
(
GLOB_RECURSE CAF_CORE_HEADERS
"caf/*.hpp"
)
file
(
GLOB_RECURSE CAF_CORE_HEADERS
"caf/*.hpp"
)
# -- add consistency checks for enum to_string implementations -----------------
caf_add_enum_consistency_check
(
"caf/sec.hpp"
"src/sec_strings.cpp"
)
caf_add_enum_consistency_check
(
"caf/pec.hpp"
"src/pec_strings.cpp"
)
caf_add_enum_consistency_check
(
"caf/stream_priority.hpp"
"src/stream_priority_strings.cpp"
)
caf_add_enum_consistency_check
(
"caf/exit_reason.hpp"
"src/exit_reason_strings.cpp"
)
caf_add_enum_consistency_check
(
"caf/invoke_message_result.hpp"
"src/invoke_msg_result_strings.cpp"
)
caf_add_enum_consistency_check
(
"caf/message_priority.hpp"
"src/message_priority_strings.cpp"
)
caf_add_enum_consistency_check
(
"caf/intrusive/inbox_result.hpp"
"src/intrusive/inbox_result_strings.cpp"
)
caf_add_enum_consistency_check
(
"caf/intrusive/task_result.hpp"
"src/intrusive/task_result_strings.cpp"
)
# -- dependencies --------------------------------------------------------------
# -- dependencies --------------------------------------------------------------
if
(
NOT TARGET Threads::Threads
)
if
(
NOT TARGET Threads::Threads
)
find_package
(
Threads REQUIRED
)
find_package
(
Threads REQUIRED
)
endif
()
endif
()
# -- utility function for setting default properties ---------------------------
set
(
LIBCAF_CORE_OPTIONAL_DEPENDENCIES
""
)
function
(
caf_core_set_default_properties
)
# Check whether we need to link against libatomic.
foreach
(
target
${
ARGN
}
)
if
(
NOT CMAKE_CROSSCOMPILING
)
# Set global defaults and set EXPORTS flag.
set
(
snippet
"#include <cstdint>
caf_set_default_properties
(
${
target
}
)
#include <atomic>
target_compile_definitions
(
${
target
}
PRIVATE libcaf_core_EXPORTS
)
std::atomic<uint64_t> x;
# Pull in public dependencies.
int main(int, char**) { return static_cast<int>(x.load()); }"
)
caf_target_link_libraries
(
${
target
}
PUBLIC Threads::Threads
)
check_cxx_source_compiles
(
"
${
snippet
}
"
has_64bit_atomic
)
if
(
MSVC
)
if
(
NOT has_64bit_atomic
)
caf_target_link_libraries
(
${
target
}
PUBLIC iphlpapi
)
set
(
required_libs_backup
"
${
CMAKE_REQUIRED_LIBRARIES
}
"
)
list
(
APPEND CMAKE_REQUIRED_LIBRARIES
"atomic"
)
check_cxx_source_compiles
(
"
${
snippet
}
"
has_64bit_atomic_with_libatomic
)
set
(
CMAKE_REQUIRED_LIBRARIES
"
${
required_libs_backup
}
"
)
if
(
NOT has_64bit_atomic_with_libatomic
)
message
(
FATAL_ERROR
"Unable to compile code with std::atomic<uint64_t>"
)
endif
()
list
(
APPEND LIBCAF_CORE_OPTIONAL_DEPENDENCIES atomic
)
endif
()
endif
()
endforeach
()
endif
()
endfunction
()
if
(
MSVC
)
list
(
APPEND LIBCAF_CORE_OPTIONAL_DEPENDENCIES iphlpapi
)
endif
()
# --
add library target
--------------------------------------------------------
# --
generated files ---
--------------------------------------------------------
add_library
(
libcaf_core_obj OBJECT
${
CAF_CORE_HEADERS
}
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/cmake/build_config.hpp.in"
"caf/detail/build_config.hpp"
@ONLY
)
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/caf/detail/build_config.hpp"
DESTINATION
"
${
CMAKE_INSTALL_INCLUDEDIR
}
/caf/detail/"
)
# -- add targets ---------------------------------------------------------------
caf_add_component
(
core
DEPENDENCIES
PUBLIC
Threads::Threads
${
LIBCAF_CORE_OPTIONAL_DEPENDENCIES
}
PRIVATE
CAF::internal
ENUM_CONSISTENCY_CHECKS
exit_reason
intrusive.inbox_result
intrusive.task_result
invoke_message_result
message_priority
pec
sec
stream_priority
HEADERS
${
CAF_CORE_HEADERS
}
SOURCES
src/abstract_actor.cpp
src/abstract_actor.cpp
src/abstract_channel.cpp
src/abstract_channel.cpp
src/abstract_group.cpp
src/abstract_group.cpp
...
@@ -125,7 +146,7 @@ add_library(libcaf_core_obj OBJECT ${CAF_CORE_HEADERS}
...
@@ -125,7 +146,7 @@ add_library(libcaf_core_obj OBJECT ${CAF_CORE_HEADERS}
src/init_global_meta_objects.cpp
src/init_global_meta_objects.cpp
src/intrusive/inbox_result_strings.cpp
src/intrusive/inbox_result_strings.cpp
src/intrusive/task_result_strings.cpp
src/intrusive/task_result_strings.cpp
src/invoke_msg
_result_strings.cpp
src/invoke_message
_result_strings.cpp
src/ipv4_address.cpp
src/ipv4_address.cpp
src/ipv4_endpoint.cpp
src/ipv4_endpoint.cpp
src/ipv4_subnet.cpp
src/ipv4_subnet.cpp
...
@@ -187,55 +208,10 @@ add_library(libcaf_core_obj OBJECT ${CAF_CORE_HEADERS}
...
@@ -187,55 +208,10 @@ add_library(libcaf_core_obj OBJECT ${CAF_CORE_HEADERS}
src/uri.cpp
src/uri.cpp
src/uri_builder.cpp
src/uri_builder.cpp
src/uuid.cpp
src/uuid.cpp
)
TEST_SOURCES
add_library
(
libcaf_core
"
${
PROJECT_SOURCE_DIR
}
/cmake/dummy.cpp"
$<TARGET_OBJECTS:libcaf_core_obj>
)
caf_core_set_default_properties
(
libcaf_core_obj libcaf_core
)
caf_export_and_install_lib
(
core
)
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/caf/detail/build_config.hpp"
DESTINATION
"
${
CMAKE_INSTALL_INCLUDEDIR
}
/caf/detail"
)
# Check whether we need to link against libatomic.
if
(
NOT CMAKE_CROSSCOMPILING
)
set
(
snippet
"#include <cstdint>
#include <atomic>
std::atomic<uint64_t> x;
int main(int, char**) { return static_cast<int>(x.load()); }"
)
check_cxx_source_compiles
(
"
${
snippet
}
"
has_64bit_atomic
)
if
(
NOT has_64bit_atomic
)
set
(
required_libs_backup
"
${
CMAKE_REQUIRED_LIBRARIES
}
"
)
list
(
APPEND CMAKE_REQUIRED_LIBRARIES
"atomic"
)
check_cxx_source_compiles
(
"
${
snippet
}
"
has_64bit_atomic_with_libatomic
)
set
(
CMAKE_REQUIRED_LIBRARIES
"
${
required_libs_backup
}
"
)
if
(
NOT has_64bit_atomic_with_libatomic
)
message
(
FATAL_ERROR
"Unable to compile code with std::atomic<uint64_t>"
)
endif
()
target_link_libraries
(
libcaf_core INTERFACE atomic
)
endif
()
endif
()
# -- build unit tests ----------------------------------------------------------
if
(
NOT CAF_ENABLE_TESTING
)
return
()
endif
()
add_executable
(
caf-core-test
test/core-test.cpp
test/core-test.cpp
test/nasty.cpp
test/nasty.cpp
$<TARGET_OBJECTS:libcaf_core_obj>
)
TEST_SUITES
caf_core_set_default_properties
(
caf-core-test
)
target_include_directories
(
caf-core-test PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/test"
)
target_link_libraries
(
caf-core-test PUBLIC CAF::test
)
caf_add_test_suites
(
caf-core-test
actor_clock
actor_clock
actor_factory
actor_factory
actor_lifetime
actor_lifetime
...
@@ -361,9 +337,8 @@ caf_add_test_suites(caf-core-test
...
@@ -361,9 +337,8 @@ caf_add_test_suites(caf-core-test
unit
unit
uri
uri
uuid
uuid
variant
variant
)
)
if
(
CAF_ENABLE_EXCEPTIONS
)
if
(
CAF_ENABLE_
TESTING AND CAF_ENABLE_
EXCEPTIONS
)
caf_add_test_suites
(
caf-core-test custom_exception_handler
)
caf_add_test_suites
(
caf-core-test custom_exception_handler
)
endif
()
endif
()
libcaf_core/src/invoke_m
sg
_result_strings.cpp
→
libcaf_core/src/invoke_m
essage
_result_strings.cpp
View file @
675794d7
File moved
libcaf_io/CMakeLists.txt
View file @
675794d7
# --
get header files for creating "proper" XCode projects
---------------------
# --
collect header files ---------------------------------
---------------------
file
(
GLOB_RECURSE CAF_IO_HEADERS
"caf/*.hpp"
)
file
(
GLOB_RECURSE CAF_IO_HEADERS
"caf/*.hpp"
)
# -- add consistency checks for enum to_string implementations -----------------
# -- add targets ---------------------------------------------------------------
caf_add_enum_consistency_check
(
"caf/io/basp/message_type.hpp"
caf_add_component
(
"src/io/basp/message_type_strings.cpp"
)
io
DEPENDENCIES
caf_add_enum_consistency_check
(
"caf/io/network/operation.hpp"
PUBLIC
"src/io/network/operation_strings.cpp"
)
CAF::core
$<$<CXX_COMPILER_ID:MSVC>:ws2_32>
# -- utility function for setting default properties ---------------------------
PRIVATE
CAF::internal
function
(
caf_io_set_default_properties
)
ENUM_CONSISTENCY_CHECKS
foreach
(
target
${
ARGN
}
)
io.basp.message_type
# Set global defaults and set EXPORTS flag.
io.network.operation
caf_set_default_properties
(
${
target
}
)
HEADERS
target_compile_definitions
(
${
target
}
PRIVATE libcaf_io_EXPORTS
)
${
CAF_IO_HEADERS
}
# Pull in public dependencies.
SOURCES
caf_target_link_libraries
(
${
target
}
PUBLIC CAF::core
)
if
(
MSVC
)
caf_target_link_libraries
(
${
target
}
PUBLIC ws2_32 iphlpapi
)
endif
()
endforeach
()
endfunction
()
# -- add library target --------------------------------------------------------
add_library
(
libcaf_io_obj OBJECT
${
CAF_IO_HEADERS
}
src/detail/prometheus_broker.cpp
src/detail/prometheus_broker.cpp
src/detail/remote_group_module.cpp
src/detail/remote_group_module.cpp
src/detail/socket_guard.cpp
src/detail/socket_guard.cpp
...
@@ -70,33 +60,9 @@ add_library(libcaf_io_obj OBJECT ${CAF_IO_HEADERS}
...
@@ -70,33 +60,9 @@ add_library(libcaf_io_obj OBJECT ${CAF_IO_HEADERS}
src/io/scribe.cpp
src/io/scribe.cpp
src/policy/tcp.cpp
src/policy/tcp.cpp
src/policy/udp.cpp
src/policy/udp.cpp
)
TEST_SOURCES
add_library
(
libcaf_io
"
${
PROJECT_SOURCE_DIR
}
/cmake/dummy.cpp"
$<TARGET_OBJECTS:libcaf_io_obj>
)
caf_io_set_default_properties
(
libcaf_io_obj libcaf_io
)
caf_export_and_install_lib
(
io
)
# -- build unit tests ----------------------------------------------------------
if
(
NOT CAF_ENABLE_TESTING
)
return
()
endif
()
add_executable
(
caf-io-test
test/io-test.cpp
test/io-test.cpp
$<TARGET_OBJECTS:libcaf_io_obj>
)
TEST_SUITES
caf_io_set_default_properties
(
caf-io-test
)
target_include_directories
(
caf-io-test PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/test"
)
target_link_libraries
(
caf-io-test PRIVATE CAF::test
)
caf_add_test_suites
(
caf-io-test
detail.prometheus_broker
detail.prometheus_broker
io.basp.message_queue
io.basp.message_queue
io.basp_broker
io.basp_broker
...
@@ -110,9 +76,8 @@ caf_add_test_suites(caf-io-test
...
@@ -110,9 +76,8 @@ caf_add_test_suites(caf-io-test
io.remote_group
io.remote_group
io.remote_spawn
io.remote_spawn
io.unpublish
io.unpublish
io.worker
io.worker
)
)
if
(
NOT WIN32
)
if
(
CAF_ENABLE_TESTING AND UNIX
)
caf_add_test_suites
(
caf-io-test io.middleman
)
caf_add_test_suites
(
caf-io-test io.middleman
)
endif
()
endif
()
libcaf_openssl/CMakeLists.txt
View file @
675794d7
# --
get header files for creating "proper" XCode projects
---------------------
# --
collect header files ---------------------------------
---------------------
file
(
GLOB_RECURSE CAF_OPENSSL_HEADERS
"caf/*.hpp"
)
file
(
GLOB_RECURSE CAF_OPENSSL_HEADERS
"caf/*.hpp"
)
...
@@ -8,55 +8,27 @@ if(NOT TARGET OpenSSL::SSL OR NOT TARGET OpenSSL::Crypto)
...
@@ -8,55 +8,27 @@ if(NOT TARGET OpenSSL::SSL OR NOT TARGET OpenSSL::Crypto)
find_package
(
OpenSSL REQUIRED
)
find_package
(
OpenSSL REQUIRED
)
endif
()
endif
()
# -- utility function for setting default properties ---------------------------
# -- add targets ---------------------------------------------------------------
function
(
caf_openssl_set_default_properties
)
caf_add_component
(
foreach
(
target
${
ARGN
}
)
openssl
# Set global defaults and set EXPORTS flag.
DEPENDENCIES
caf_set_default_properties
(
${
target
}
)
PUBLIC
target_compile_definitions
(
${
target
}
PRIVATE libcaf_openssl_EXPORTS
)
CAF::io
# Pull in public dependencies.
OpenSSL::SSL
caf_target_link_libraries
(
${
target
}
PUBLIC
OpenSSL::Crypto
CAF::core CAF::io OpenSSL::SSL OpenSSL::Crypto
)
PRIVATE
endforeach
()
CAF::internal
endfunction
()
HEADERS
${
CAF_OPENSSL_HEADERS
}
# -- add library target --------------------------------------------------------
SOURCES
add_library
(
libcaf_openssl_obj OBJECT
${
CAF_OPENSSL_HEADERS
}
src/openssl/manager.cpp
src/openssl/manager.cpp
src/openssl/middleman_actor.cpp
src/openssl/middleman_actor.cpp
src/openssl/publish.cpp
src/openssl/publish.cpp
src/openssl/remote_actor.cpp
src/openssl/remote_actor.cpp
src/openssl/session.cpp
src/openssl/session.cpp
)
TEST_SOURCES
add_library
(
libcaf_openssl
"
${
PROJECT_SOURCE_DIR
}
/cmake/dummy.cpp"
$<TARGET_OBJECTS:libcaf_openssl_obj>
)
caf_openssl_set_default_properties
(
libcaf_openssl_obj libcaf_openssl
)
caf_export_and_install_lib
(
openssl
)
# -- build unit tests ----------------------------------------------------------
if
(
NOT CAF_ENABLE_TESTING
)
return
()
endif
()
add_executable
(
caf-openssl-test
test/openssl-test.cpp
test/openssl-test.cpp
${
CAF_OPENSSL_TEST_SOURCES
}
TEST_SUITES
$<TARGET_OBJECTS:libcaf_openssl_obj>
)
caf_openssl_set_default_properties
(
caf-openssl-test
)
target_include_directories
(
caf-openssl-test PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/test"
)
target_link_libraries
(
caf-openssl-test PRIVATE CAF::test
)
caf_add_test_suites
(
caf-openssl-test
openssl.authentication
openssl.authentication
openssl.remote_actor
openssl.remote_actor
)
)
tools/CMakeLists.txt
View file @
675794d7
...
@@ -7,13 +7,13 @@ macro(add name)
...
@@ -7,13 +7,13 @@ macro(add name)
endmacro
()
endmacro
()
add
(
caf-vec
)
add
(
caf-vec
)
target_link_libraries
(
caf-vec PRIVATE CAF::core
)
target_link_libraries
(
caf-vec PRIVATE CAF::
internal CAF::
core
)
if
(
TARGET CAF::io
)
if
(
TARGET CAF::io
)
if
(
WIN32
)
if
(
WIN32
)
message
(
STATUS
"
s
kip caf-run (not supported on Windows)"
)
message
(
STATUS
"
S
kip caf-run (not supported on Windows)"
)
else
()
else
()
add
(
caf-run
)
add
(
caf-run
)
target_link_libraries
(
caf-run PRIVATE CAF::i
o CAF::core
)
target_link_libraries
(
caf-run PRIVATE CAF::i
nternal CAF::io
)
endif
()
endif
()
endif
()
endif
()
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