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
42f02799
Commit
42f02799
authored
Sep 07, 2018
by
Tobias Mayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make build_config.hpp actually part of the build
This also moves build_config into the libcaf_core target.
parent
376b5411
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
35 deletions
+41
-35
.gitignore
.gitignore
+0
-1
CMakeLists.txt
CMakeLists.txt
+2
-22
libcaf_core/CMakeLists.txt
libcaf_core/CMakeLists.txt
+39
-12
No files found.
.gitignore
View file @
42f02799
...
...
@@ -12,7 +12,6 @@ manual
*.swp
bii/*
.idea/
libcaf_core/caf/detail/build_config.hpp
.ycm_extra_conf.pyc
blog_release_note.md
github_release_note.md
...
...
CMakeLists.txt
View file @
42f02799
cmake_minimum_required
(
VERSION 2.8.
4
)
cmake_minimum_required
(
VERSION 2.8.
12
)
project
(
caf C CXX
)
include
(
CheckCSourceCompiles
)
...
...
@@ -98,7 +98,6 @@ if(CAF_USE_CCACHE)
if
(
CCACHE_PROGRAM
)
message
(
STATUS
"Using ccache command:
${
CCACHE_PROGRAM
}
"
)
set_property
(
GLOBAL PROPERTY RULE_LAUNCH_COMPILE
"
${
CCACHE_PROGRAM
}
"
)
set_property
(
GLOBAL PROPERTY RULE_LAUNCH_LINK
"
${
CCACHE_PROGRAM
}
"
)
else
()
message
(
STATUS
"Unable to find ccache"
)
endif
()
...
...
@@ -365,37 +364,18 @@ if (DEFINED CMAKE_LD_LIBS)
endif
()
################################################################################
#
configure build_config.hpp header
#
#
setup logging
#
################################################################################
if
(
NOT CAF_LOG_LEVEL
)
set
(
CAF_LOG_LEVEL
"-1"
)
endif
()
macro
(
to_int_value name
)
if
(
${
name
}
)
set
(
${
name
}
_INT 1
)
else
()
set
(
${
name
}
_INT -1
)
endif
()
endmacro
()
to_int_value
(
CAF_NO_EXCEPTIONS
)
to_int_value
(
CAF_NO_MEM_MANAGEMENT
)
to_int_value
(
CAF_ENABLE_RUNTIME_CHECKS
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/build_config.hpp.in"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/libcaf_core/caf/detail/build_config.hpp"
IMMEDIATE @ONLY
)
################################################################################
# setup for install target #
################################################################################
# install includes from core
install
(
DIRECTORY libcaf_core/caf/
DESTINATION include/caf FILES_MATCHING PATTERN
"*.hpp"
)
# install includes from io
install
(
DIRECTORY libcaf_io/caf/ DESTINATION include/caf
FILES_MATCHING PATTERN
"*.hpp"
)
...
...
libcaf_core/CMakeLists.txt
View file @
42f02799
cmake_minimum_required
(
VERSION 2.8
)
cmake_minimum_required
(
VERSION 2.8
.12
)
project
(
caf_core C CXX
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
)
include_directories
(
.
)
# get header files; only needed by CMake generators,
# e.g., for creating proper Xcode projects
file
(
GLOB_RECURSE LIBCAF_CORE_HDRS
"caf/*.hpp"
)
...
...
@@ -131,22 +127,46 @@ set(LIBCAF_CORE_SRCS
src/work_stealing.cpp
)
# configure build_config.hpp header
macro
(
to_int_value name
)
if
(
${
name
}
)
set
(
${
name
}
_INT 1
)
else
()
set
(
${
name
}
_INT -1
)
endif
()
endmacro
()
to_int_value
(
CAF_NO_EXCEPTIONS
)
to_int_value
(
CAF_NO_MEM_MANAGEMENT
)
to_int_value
(
CAF_ENABLE_RUNTIME_CHECKS
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../cmake/build_config.hpp.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/caf/detail/build_config.hpp"
@ONLY
)
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/caf/detail/build_config.hpp"
DESTINATION include/caf/detail
)
add_custom_target
(
libcaf_core
)
# build shared library if not compiling static only
if
(
NOT CAF_BUILD_STATIC_ONLY
)
add_library
(
libcaf_core_shared SHARED
${
LIBCAF_CORE_SRCS
}
${
LIBCAF_CORE_HDRS
}
)
target_link_libraries
(
libcaf_core_shared
${
CAF_EXTRA_LDFLAGS
}
)
target_include_directories
(
libcaf_core_shared PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_BINARY_DIR
}
>
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
>
$<INSTALL_INTERFACE:include>
)
set_target_properties
(
libcaf_core_shared
PROPERTIES
SOVERSION
${
CAF_VERSION
}
VERSION
${
CAF_VERSION
}
OUTPUT_NAME caf_core
)
if
(
CYGWIN
)
install
(
TARGETS libcaf_core_shared RUNTIME DESTINATION bin
)
else
()
install
(
TARGETS libcaf_core_shared LIBRARY DESTINATION lib
)
endif
()
install
(
TARGETS libcaf_core_shared
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
)
add_dependencies
(
libcaf_core_shared libcaf_core
)
endif
()
...
...
@@ -154,10 +174,17 @@ endif ()
if
(
CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC
)
add_library
(
libcaf_core_static STATIC
${
LIBCAF_CORE_HDRS
}
${
LIBCAF_CORE_SRCS
}
)
target_link_libraries
(
libcaf_core_static
${
CAF_EXTRA_LDFLAGS
}
)
target_include_directories
(
libcaf_core_static PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_BINARY_DIR
}
>
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
>
$<INSTALL_INTERFACE:include>
)
set_target_properties
(
libcaf_core_static PROPERTIES OUTPUT_NAME caf_core_static
)
install
(
TARGETS libcaf_core_static ARCHIVE DESTINATION lib
)
add_dependencies
(
libcaf_core_static libcaf_core
)
endif
()
link_directories
(
${
LD_DIRS
}
)
include_directories
(
.
${
INCLUDE_DIRS
}
)
install
(
DIRECTORY
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/caf"
DESTINATION include
FILES_MATCHING PATTERN
"*.hpp"
)
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