Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
97cf0d51
Commit
97cf0d51
authored
Jan 10, 2021
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix exporting and installing of incubator libs
parent
8b28db8d
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
261 additions
and
255 deletions
+261
-255
CMakeLists.txt
CMakeLists.txt
+172
-54
cmake/CAFIncubatorConfig.cmake.in
cmake/CAFIncubatorConfig.cmake.in
+0
-0
examples/CMakeLists.txt
examples/CMakeLists.txt
+1
-0
libcaf_bb/CMakeLists.txt
libcaf_bb/CMakeLists.txt
+18
-45
libcaf_net/CMakeLists.txt
libcaf_net/CMakeLists.txt
+68
-156
libcaf_net/caf/detail/rfc6455.hpp
libcaf_net/caf/detail/rfc6455.hpp
+1
-0
libcaf_net/caf/net/fwd.hpp
libcaf_net/caf/net/fwd.hpp
+1
-0
No files found.
CMakeLists.txt
View file @
97cf0d51
This diff is collapsed.
Click to expand it.
cmake/CAFConfig.cmake.in
→
cmake/CAF
Incubator
Config.cmake.in
View file @
97cf0d51
File moved
examples/CMakeLists.txt
View file @
97cf0d51
...
...
@@ -2,6 +2,7 @@ add_custom_target(all_examples)
function
(
add_example folder name
)
add_executable
(
${
name
}
${
folder
}
/
${
name
}
.cpp
${
ARGN
}
)
set_property
(
TARGET
${
name
}
PROPERTY CXX_STANDARD 17
)
install
(
FILES
${
folder
}
/
${
name
}
.cpp DESTINATION
${
CMAKE_INSTALL_DATADIR
}
/caf/examples/
${
folder
}
)
add_dependencies
(
${
name
}
all_examples
)
endfunction
()
...
...
libcaf_bb/CMakeLists.txt
View file @
97cf0d51
...
...
@@ -2,48 +2,21 @@
file
(
GLOB_RECURSE CAF_BB_HEADERS
"caf/*.hpp"
)
# -- list cpp files for caf::bb ------------------------------------------------
add_library
(
libcaf_bb INTERFACE
)
target_link_libraries
(
libcaf_bb INTERFACE CAF::core
)
# -- install library and header files ------------------------------------------
# install(FILES "${CMAKE_BINARY_DIR}/caf/detail/bb_export.hpp"
# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/caf/detail")
install
(
TARGETS libcaf_bb
EXPORT CAFTargets
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
COMPONENT bb
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
COMPONENT bb
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
COMPONENT bb
)
install
(
DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/caf"
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
COMPONENT bb
FILES_MATCHING PATTERN
"*.hpp"
)
# -- build unit tests ----------------------------------------------------------
if
(
NOT CAF_INC_ENABLE_TESTING
)
return
()
endif
()
add_executable
(
caf-bb-test test/bb-test.cpp
)
caf_incubator_set_default_properties
(
caf-bb-test
)
target_include_directories
(
caf-bb-test PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/test"
)
target_compile_definitions
(
caf-bb-test PRIVATE libcaf_bb_EXPORTS
)
target_link_libraries
(
caf-bb-test PRIVATE CAF::core CAF::test
)
caf_incubator_add_test_suites
(
caf-bb-test
# -- add targets ---------------------------------------------------------------
caf_incubator_add_component
(
bb
DEPENDENCIES
INTERFACE
CAF::core
HEADERS
${
CAF_BB_HEADERS
}
TEST_SOURCES
test/bb-test.cpp
TEST_SUITES
container_source
stream_reader
tokenized_integer_reader
)
tokenized_integer_reader
)
# CAF::bb is header-only, so it won't pull in the dependencies for the tests.
target_link_libraries
(
caf-bb-test PRIVATE CAF::core CAF::internal
)
libcaf_net/CMakeLists.txt
View file @
97cf0d51
...
...
@@ -2,44 +2,24 @@
file
(
GLOB_RECURSE CAF_NET_HEADERS
"caf/*.hpp"
)
# -- add consistency checks for enum to_string implementations -----------------
caf_incubator_add_enum_consistency_check
(
"caf/net/basp/connection_state.hpp"
"src/basp/connection_state_strings.cpp"
)
caf_incubator_add_enum_consistency_check
(
"caf/net/basp/ec.hpp"
"src/basp/ec_strings.cpp"
)
caf_incubator_add_enum_consistency_check
(
"caf/net/basp/message_type.hpp"
"src/basp/message_type_strings.cpp"
)
caf_incubator_add_enum_consistency_check
(
"caf/net/operation.hpp"
"src/basp/operation_strings.cpp"
)
# -- utility function for setting default properties ---------------------------
function
(
caf_net_set_default_properties
)
foreach
(
target
${
ARGN
}
)
caf_incubator_set_default_properties
(
${
target
}
)
# Make sure we find our headers plus the the generated export header.
target_include_directories
(
${
target
}
PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
"
${
CMAKE_BINARY_DIR
}
"
)
target_compile_definitions
(
${
target
}
PRIVATE libcaf_net_EXPORTS
)
# Pull in public dependencies.
target_link_libraries
(
${
target
}
PUBLIC CAF::core
)
if
(
MSVC
)
target_link_libraries
(
${
target
}
PUBLIC ws2_32 iphlpapi
)
endif
()
endforeach
()
endfunction
()
# -- add library targets -------------------------------------------------------
add_library
(
libcaf_net_obj OBJECT
${
CAF_NET_HEADERS
}
#src/actor_proxy_impl.cpp
#src/basp/application.cpp
#src/endpoint_manager.cpp
#src/net/backend/tcp.cpp
#src/net/backend/test.cpp
#src/net/endpoint_manager_queue.cpp
# -- add targets ---------------------------------------------------------------
caf_incubator_add_component
(
net
DEPENDENCIES
PUBLIC
CAF::core
$<$<CXX_COMPILER_ID:MSVC>:ws2_32>
PRIVATE
CAF::internal
ENUM_CONSISTENCY_CHECKS
net.basp.connection_state
net.basp.ec
net.basp.message_type
net.operation
HEADERS
${
CAF_NET_HEADERS
}
SOURCES
src/basp/connection_state_strings.cpp
src/basp/ec_strings.cpp
src/basp/message_type_strings.cpp
...
...
@@ -68,80 +48,17 @@ add_library(libcaf_net_obj OBJECT ${CAF_NET_HEADERS}
src/tcp_stream_socket.cpp
src/udp_datagram_socket.cpp
src/worker.cpp
)
add_library
(
libcaf_net
"
${
PROJECT_SOURCE_DIR
}
/cmake/dummy.cpp"
$<TARGET_OBJECTS:libcaf_net_obj>
)
generate_export_header
(
libcaf_net
EXPORT_MACRO_NAME CAF_NET_EXPORT
EXPORT_FILE_NAME
"
${
CMAKE_BINARY_DIR
}
/caf/detail/net_export.hpp"
)
set_property
(
TARGET libcaf_net_obj PROPERTY POSITION_INDEPENDENT_CODE ON
)
caf_net_set_default_properties
(
libcaf_net_obj libcaf_net
)
target_include_directories
(
libcaf_net INTERFACE
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
>
$<BUILD_INTERFACE:
${
CMAKE_BINARY_DIR
}
>
)
add_library
(
CAF::net ALIAS libcaf_net
)
set_target_properties
(
libcaf_net PROPERTIES
EXPORT_NAME net
SOVERSION
${
CAF_VERSION
}
VERSION
${
CAF_LIB_VERSION
}
OUTPUT_NAME caf_net
)
# -- install library and header files ------------------------------------------
install
(
FILES
"
${
CMAKE_BINARY_DIR
}
/caf/detail/net_export.hpp"
DESTINATION
"
${
CMAKE_INSTALL_INCLUDEDIR
}
/caf/detail"
)
install
(
TARGETS libcaf_net
EXPORT CAFTargets
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
COMPONENT net
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
COMPONENT net
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
COMPONENT net
)
install
(
DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/caf"
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
COMPONENT net
FILES_MATCHING PATTERN
"*.hpp"
)
# -- build unit tests ----------------------------------------------------------
if
(
NOT CAF_INC_ENABLE_TESTING
)
return
()
endif
()
add_executable
(
caf-net-test
TEST_SOURCES
test/net-test.cpp
$<TARGET_OBJECTS:libcaf_net_obj>
)
caf_net_set_default_properties
(
caf-net-test
)
target_include_directories
(
caf-net-test PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/test"
)
target_link_libraries
(
caf-net-test PRIVATE CAF::test
)
caf_incubator_add_test_suites
(
caf-net-test
TEST_SUITES
accept_socket
#application
convert_ip_endpoint
datagram_socket
detail.rfc6455
#datagram_transport
#doorman
#endpoint_manager
header
ip
multiplexer
net.actor_shell
#net.backend.tcp
#net.basp.message_queue
#net.basp.ping_pong
#net.basp.worker
net.length_prefix_framing
net.typed_actor_shell
net.web_socket_server
...
...
@@ -149,12 +66,7 @@ caf_incubator_add_test_suites(caf-net-test
pipe_socket
socket
socket_guard
#stream_application
stream_socket
stream_transport
#string_application
tcp_sockets
#transport_worker
#transport_worker_dispatcher
udp_datagram_socket
)
udp_datagram_socket
)
libcaf_net/caf/detail/rfc6455.hpp
View file @
97cf0d51
...
...
@@ -6,6 +6,7 @@
#include "caf/byte.hpp"
#include "caf/detail/net_export.hpp"
#include "caf/fwd.hpp"
#include <cstdint>
#include <vector>
...
...
libcaf_net/caf/net/fwd.hpp
View file @
97cf0d51
...
...
@@ -7,6 +7,7 @@
#include <memory>
#include "caf/intrusive_ptr.hpp"
#include "caf/type_id.hpp"
namespace
caf
::
net
{
...
...
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