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
710de811
Commit
710de811
authored
Sep 24, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CMake scaffold example applications
parent
fb6e8bef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
CMakeLists.txt
CMakeLists.txt
+5
-0
examples/CMakeLists.txt
examples/CMakeLists.txt
+16
-0
No files found.
CMakeLists.txt
View file @
710de811
...
...
@@ -28,6 +28,7 @@ option(CAF_INC_ENABLE_STANDALONE_BUILD
option
(
CAF_INC_ENABLE_TESTING
"Build unit test suites"
ON
)
option
(
CAF_INC_ENABLE_NET_MODULE
"Build networking module"
ON
)
option
(
CAF_INC_ENABLE_BB_MODULE
"Build building blocks module"
ON
)
option
(
CAF_INC_ENABLE_EXAMPLES
"Build small programs"
ON
)
# -- incubator options with non-boolean values ---------------------------------
...
...
@@ -205,3 +206,7 @@ endif()
if
(
CAF_INC_ENABLE_NET_MODULE
)
add_subdirectory
(
libcaf_bb
)
endif
()
if
(
CAF_INC_ENABLE_EXAMPLES
)
add_subdirectory
(
examples
)
endif
()
examples/CMakeLists.txt
0 → 100644
View file @
710de811
add_custom_target
(
all_examples
)
function
(
add_example folder name
)
add_executable
(
${
name
}
${
folder
}
/
${
name
}
.cpp
${
ARGN
}
)
install
(
FILES
${
folder
}
/
${
name
}
.cpp DESTINATION
${
CMAKE_INSTALL_DATADIR
}
/caf/examples/
${
folder
}
)
add_dependencies
(
${
name
}
all_examples
)
endfunction
()
# -- examples for CAF::net -----------------------------------------------------
if
(
TARGET CAF::net
)
function
(
add_net_example name
)
add_example
(
"net"
${
name
}
${
ARGN
}
)
target_link_libraries
(
${
name
}
CAF::net CAF::core
)
endfunction
()
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