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
f0be589e
Commit
f0be589e
authored
Apr 13, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Streamline CMake option names
parent
f91d7868
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
CMakeLists.txt
CMakeLists.txt
+22
-21
No files found.
CMakeLists.txt
View file @
f0be589e
...
...
@@ -10,36 +10,37 @@ include(GenerateExportHeader) # Auto-generates dllexport macros
# -- general options -----------------------------------------------------------
option
(
BUILD_SHARED_LIBS
"
S
hared library targets"
ON
)
option
(
CMAKE_EXPORT_COMPILE_COMMANDS
"JSON compile commands database"
ON
)
option
(
BUILD_SHARED_LIBS
"
Build s
hared library targets"
ON
)
option
(
CMAKE_EXPORT_COMPILE_COMMANDS
"
Write
JSON compile commands database"
ON
)
option
(
THREADS_PREFER_PTHREAD_FLAG
"Prefer -pthread flag if available "
ON
)
# -- CAF options that are off by default ----------------------------------------
option
(
CAF_
BUILD
_CURL_EXAMPLES
"Build examples with libcurl"
OFF
)
option
(
CAF_
BUILD
_PROTOBUF_EXAMPLES
"Build examples with Google Protobuf"
OFF
)
option
(
CAF_
BUILD
_QT5_EXAMPLES
"Build examples with the Qt5 framework"
OFF
)
option
(
CAF_
ENABLE
_CURL_EXAMPLES
"Build examples with libcurl"
OFF
)
option
(
CAF_
ENABLE
_PROTOBUF_EXAMPLES
"Build examples with Google Protobuf"
OFF
)
option
(
CAF_
ENABLE
_QT5_EXAMPLES
"Build examples with the Qt5 framework"
OFF
)
option
(
CAF_ENABLE_RUNTIME_CHECKS
"Build CAF with extra runtime assertions"
OFF
)
option
(
CAF_ENABLE_UTILITY_TARGETS
"Include targets like consistency-check"
OFF
)
option
(
CAF_ENABLE_ACTOR_PROFILER
"Enable experimental profiler API"
OFF
)
# -- CAF options that are on by default ----------------------------------------
option
(
CAF_
BUILD
_EXAMPLES
"Build small programs showcasing CAF features"
ON
)
option
(
CAF_
BUILD
_IO_MODULE
"Build networking I/O module"
ON
)
option
(
CAF_
BUILD
_TESTING
"Build unit test suites"
ON
)
option
(
CAF_
BUILD
_TOOLS
"Build utility programs such as caf-run"
ON
)
option
(
CAF_
BUILD
_WITH_EXCEPTIONS
"Build CAF with support for exceptions"
ON
)
option
(
CAF_
ENABLE
_EXAMPLES
"Build small programs showcasing CAF features"
ON
)
option
(
CAF_
ENABLE
_IO_MODULE
"Build networking I/O module"
ON
)
option
(
CAF_
ENABLE
_TESTING
"Build unit test suites"
ON
)
option
(
CAF_
ENABLE
_TOOLS
"Build utility programs such as caf-run"
ON
)
option
(
CAF_
ENABLE
_WITH_EXCEPTIONS
"Build CAF with support for exceptions"
ON
)
# -- CAF options that depend on others -----------------------------------------
cmake_dependent_option
(
CAF_
BUILD_OPENSSL_MODULE
"CAF networking I/O
module"
ON
"CAF_
BUILD
_IO_MODULE"
OFF
)
cmake_dependent_option
(
CAF_
ENABLE_OPENSSL_MODULE
"Build OpenSSL
module"
ON
"CAF_
ENABLE
_IO_MODULE"
OFF
)
# -- CAF options with non-boolean values ---------------------------------------
set
(
CAF_LOG_LEVEL
"QUIET"
CACHE STRING
"
Max.
log verbosity of CAF components"
)
set
(
CAF_LOG_LEVEL
"QUIET"
CACHE STRING
"
Set
log verbosity of CAF components"
)
set
(
CAF_SANITIZERS
""
CACHE STRING
"
C
omma separated sanitizers, e.g., 'address,undefined'"
)
"
c
omma separated sanitizers, e.g., 'address,undefined'"
)
set
(
CAF_INSTALL_CMAKEDIR
"
${
CMAKE_INSTALL_PREFIX
}
/
${
CMAKE_INSTALL_LIBDIR
}
/cmake/CAF"
CACHE STRING
"Path for installing CMake files, enables 'find_package(CAF)'"
)
...
...
@@ -56,7 +57,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# -- sanity checking -----------------------------------------------------------
if
(
CAF_
BUILD_OPENSSL_MODULE AND NOT CAF_BUILD
_IO_MODULE
)
if
(
CAF_
ENABLE_OPENSSL_MODULE AND NOT CAF_ENABLE
_IO_MODULE
)
message
(
FATAL_ERROR
"Invalid options: cannot build OpenSSL without I/O"
)
endif
()
...
...
@@ -69,7 +70,7 @@ endif()
if
(
MSVC
)
# disable 4275 and 4251 (warnings regarding C++ classes at ABI boundaries)
add_compile_options
(
caf-project INTERFACE
/wd4275 /wd4251
)
add_compile_options
(
/wd4275 /wd4251
)
if
(
CAF_SANITIZERS
)
message
(
FATAL_ERROR
"sanitizer builds are currently not supported on MSVC"
)
endif
()
...
...
@@ -93,7 +94,7 @@ endif()
# -- unit testing setup / caf_add_test_suites function ------------------------
if
(
CAF_
BUILD
_TESTING
)
if
(
CAF_
ENABLE
_TESTING
)
enable_testing
()
function
(
caf_add_test_suites target
)
foreach
(
suiteName
${
ARGN
}
)
...
...
@@ -250,19 +251,19 @@ add_custom_command(TARGET uninstall
add_subdirectory
(
libcaf_core
)
if
(
CAF_
BUILD
_IO_MODULE
)
if
(
CAF_
ENABLE
_IO_MODULE
)
add_subdirectory
(
libcaf_io
)
endif
()
if
(
CAF_
BUILD
_OPENSSL_MODULE
)
if
(
CAF_
ENABLE
_OPENSSL_MODULE
)
add_subdirectory
(
libcaf_openssl
)
endif
()
if
(
CAF_
BUILD
_EXAMPLES
)
if
(
CAF_
ENABLE
_EXAMPLES
)
add_subdirectory
(
examples
)
endif
()
if
(
CAF_
BUILD
_TOOLS
)
if
(
CAF_
ENABLE
_TOOLS
)
add_subdirectory
(
tools
)
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