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
137e31b7
Commit
137e31b7
authored
Sep 04, 2012
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMake tweaks to reduce verbosity of CMake files
parent
781f013d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
55 deletions
+23
-55
CMakeLists.txt
CMakeLists.txt
+4
-0
benchmarks/CMakeLists.txt
benchmarks/CMakeLists.txt
+12
-25
examples/CMakeLists.txt
examples/CMakeLists.txt
+2
-8
unit_testing/CMakeLists.txt
unit_testing/CMakeLists.txt
+5
-22
No files found.
CMakeLists.txt
View file @
137e31b7
...
@@ -233,6 +233,10 @@ add_subdirectory(unit_testing)
...
@@ -233,6 +233,10 @@ add_subdirectory(unit_testing)
add_subdirectory
(
examples
)
add_subdirectory
(
examples
)
add_subdirectory
(
benchmarks
)
add_subdirectory
(
benchmarks
)
add_dependencies
(
all_examples libcppa
)
add_dependencies
(
all_unit_tests libcppa
)
add_dependencies
(
all_benchmarks libcppa
)
# set optional flags
# set optional flags
string
(
TOUPPER
${
CMAKE_BUILD_TYPE
}
build_type
)
string
(
TOUPPER
${
CMAKE_BUILD_TYPE
}
build_type
)
set
(
CONTEXT_SWITCHING true
)
set
(
CONTEXT_SWITCHING true
)
...
...
benchmarks/CMakeLists.txt
View file @
137e31b7
cmake_minimum_required
(
VERSION 2.6
)
cmake_minimum_required
(
VERSION 2.6
)
project
(
cppa_benchmarks CXX
)
project
(
cppa_benchmarks CXX
)
# Set up environment paths to cmake modules and libcppa
add_custom_target
(
all_benchmarks
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
)
include_directories
(
.
)
add_executable
(
actor_creation cppa/actor_creation.cpp
)
macro
(
add_benchmark name
)
add_executable
(
mailbox_performance cppa/mailbox_performance
.cpp
)
add_executable
(
${
name
}
cppa/
${
name
}
.cpp
)
add_executable
(
mixed_case cppa/mixed_case.cpp
)
target_link_libraries
(
${
name
}
${
CMAKE_DL_LIBS
}
${
CPPA_LIBRARY
}
${
PTHREAD_LIBRARIES
}
)
add_executable
(
distributed cppa/distributed.cpp
)
add_dependencies
(
${
name
}
all_benchmarks
)
add_executable
(
matching cppa/matching.cpp
)
endmacro
(
)
# search for libs
add_benchmark
(
actor_creation
)
if
(
NOT cppa_LIBRARY
)
add_benchmark
(
mailbox_performance
)
find_package
(
Libcppa REQUIRED
)
add_benchmark
(
mixed_case
)
endif
(
NOT cppa_LIBRARY
)
add_benchmark
(
distributed
)
add_benchmark
(
matching
)
find_package
(
Boost REQUIRED
)
find_package
(
PTHREAD REQUIRED
)
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
include_directories
(
.
${
cppa_INCLUDE
}
${
Boost_INCLUDE_DIRS
}
${
PTHREAD_INCLUDE_DIR
}
)
set
(
benchmark_LIBS
${
CMAKE_DL_LIBS
}
${
CPPA_LIBRARY
}
${
Boost_THREAD_LIBRARY
}
${
PTHREAD_LIBRARIES
}
)
target_link_libraries
(
actor_creation
${
benchmark_LIBS
}
)
target_link_libraries
(
mailbox_performance
${
benchmark_LIBS
}
)
target_link_libraries
(
mixed_case
${
benchmark_LIBS
}
)
target_link_libraries
(
distributed
${
benchmark_LIBS
}
)
target_link_libraries
(
matching
${
benchmark_LIBS
}
)
examples/CMakeLists.txt
View file @
137e31b7
cmake_minimum_required
(
VERSION 2.6
)
cmake_minimum_required
(
VERSION 2.6
)
project
(
cppa_examples CXX
)
project
(
cppa_examples CXX
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11 -Wextra -Wall -pedantic"
)
add_custom_target
(
all_examples
)
# Set up environment paths to cmake modules and libcppa
set
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
)
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
include_directories
(
.
${
CPPA_INCLUDE
}
${
Boost_INCLUDE_DIRS
}
${
PTHREAD_INCLUDE_DIR
}
)
macro
(
add_example name
)
macro
(
add_example name
)
add_executable
(
${
name
}
${
name
}
.cpp
${
ARGN
}
)
add_executable
(
${
name
}
${
name
}
.cpp
${
ARGN
}
)
target_link_libraries
(
${
name
}
${
CMAKE_DL_LIBS
}
${
CPPA_LIBRARY
}
${
PTHREAD_LIBRARIES
}
)
target_link_libraries
(
${
name
}
${
CMAKE_DL_LIBS
}
${
CPPA_LIBRARY
}
${
PTHREAD_LIBRARIES
}
)
add_dependencies
(
${
name
}
libcppa
)
add_dependencies
(
${
name
}
all_examples
)
endmacro
()
endmacro
()
add_example
(
announce_example_1
)
add_example
(
announce_example_1
)
...
...
unit_testing/CMakeLists.txt
View file @
137e31b7
cmake_minimum_required
(
VERSION 2.6
)
cmake_minimum_required
(
VERSION 2.6
)
project
(
cppa_unit_tests CXX
)
project
(
cppa_unit_tests CXX
)
add_custom_target
(
all_unit_tests
)
# set up environment paths to cmake modules and libcppa
set
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
)
# search for libs
if
(
NOT cppa_LIBRARY
)
find_package
(
Libcppa REQUIRED
)
endif
(
NOT cppa_LIBRARY
)
#find_package(Boost COMPONENTS thread REQUIRED)
find_package
(
Boost REQUIRED
)
find_package
(
PTHREAD REQUIRED
)
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
include_directories
(
.
${
cppa_INCLUDE
}
${
Boost_INCLUDE_DIRS
}
${
PTHREAD_INCLUDE_DIR
}
)
set
(
EXAMPLE_LIBS
${
CMAKE_DL_LIBS
}
${
CPPA_LIBRARY
}
${
PTHREAD_LIBRARIES
}
)
macro
(
add_unit_test name
)
macro
(
add_unit_test name
)
add_executable
(
test__
${
name
}
test__
${
name
}
.cpp
${
ARGN
}
)
add_executable
(
test__
${
name
}
test__
${
name
}
.cpp
${
ARGN
}
)
target_link_libraries
(
test__
${
name
}
${
EXAMPLE_LIBS
}
${
CMAKE_THREAD_LIBS_INIT
}
)
target_link_libraries
(
test__
${
name
}
${
CMAKE_DL_LIBS
}
${
CPPA_LIBRARY
}
${
PTHREAD_LIBRARIES
}
)
add_test
(
${
name
}
${
EXECUTABLE_OUTPUT_PATH
}
/test__
${
name
}
)
add_test
(
${
name
}
${
EXECUTABLE_OUTPUT_PATH
}
/test__
${
name
}
)
add_dependencies
(
test__
${
name
}
libcppa
)
add_dependencies
(
test__
${
name
}
all_unit_tests
)
endmacro
()
endmacro
()
add_unit_test
(
ripemd_160
)
add_unit_test
(
ripemd_160
)
...
...
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