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
e2f030d2
Commit
e2f030d2
authored
Jun 29, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store CMake config in new header, close #270
parent
77a021f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
25 deletions
+94
-25
.gitignore
.gitignore
+1
-0
CMakeLists.txt
CMakeLists.txt
+30
-25
cmake/build_config.hpp.in
cmake/build_config.hpp.in
+41
-0
libcaf_core/caf/config.hpp
libcaf_core/caf/config.hpp
+2
-0
libcaf_core/caf/detail/build_config.hpp
libcaf_core/caf/detail/build_config.hpp
+20
-0
No files found.
.gitignore
View file @
e2f030d2
...
@@ -16,3 +16,4 @@ manual/manual.html
...
@@ -16,3 +16,4 @@ manual/manual.html
manual/variables.tex
manual/variables.tex
*.swp
*.swp
bii/*
bii/*
libcaf_core/caf/detail/build_config.hpp
CMakeLists.txt
View file @
e2f030d2
...
@@ -228,22 +228,6 @@ endif()
...
@@ -228,22 +228,6 @@ endif()
set
(
LD_FLAGS
${
LD_FLAGS
}
${
CMAKE_LD_LIBS
}
)
set
(
LD_FLAGS
${
LD_FLAGS
}
${
CMAKE_LD_LIBS
}
)
################################################################################
# add custom definitions requested via configure script #
################################################################################
if
(
CAF_LOG_LEVEL
)
add_definitions
(
-DCAF_LOG_LEVEL=
${
CAF_LOG_LEVEL
}
)
endif
()
if
(
CAF_ENABLE_RUNTIME_CHECKS
)
add_definitions
(
-DCAF_ENABLE_RUNTIME_CHECKS
)
endif
()
if
(
CAF_NO_MEM_MANAGEMENT
)
add_definitions
(
-DCAF_NO_MEM_MANAGEMENT
)
endif
()
################################################################################
################################################################################
# check for biicode build pipeline #
# check for biicode build pipeline #
################################################################################
################################################################################
...
@@ -263,6 +247,32 @@ IF(BIICODE)
...
@@ -263,6 +247,32 @@ IF(BIICODE)
RETURN
()
RETURN
()
ENDIF
()
ENDIF
()
################################################################################
# configure build_config.hpp header #
################################################################################
if
(
CAF_LOG_LEVEL
)
set
(
CAF_LOG_LEVEL_INT
${
CAF_LOG_LEVEL
}
)
else
()
set
(
CAF_LOG_LEVEL_INT -1
)
endif
()
macro
(
to_int_value name
)
if
(
${
name
}
)
set
(
${
name
}
_INT 1
)
else
()
set
(
${
name
}
_INT -1
)
endif
()
endmacro
()
to_int_value
(
CAF_LOG_LEVEL
)
to_int_value
(
CAF_NO_MEM_MANAGEMENT
)
to_int_value
(
CAF_ENABLE_RUNTIME_CHECKS
)
to_int_value
(
CAF_USE_ASIO
)
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 #
# setup for install target #
################################################################################
################################################################################
...
@@ -445,15 +455,10 @@ if(NOT CAF_NO_UNIT_TESTS)
...
@@ -445,15 +455,10 @@ if(NOT CAF_NO_UNIT_TESTS)
# find boost asio if the asio multiplexer should be used for testing
# find boost asio if the asio multiplexer should be used for testing
if
(
CAF_USE_ASIO
)
if
(
CAF_USE_ASIO
)
set
(
Boost_USE_MULTITHREADED ON
)
set
(
Boost_USE_MULTITHREADED ON
)
find_package
(
Boost COMPONENTS system
)
find_package
(
Boost COMPONENTS system REQUIRED
)
if
(
Boost_FOUND
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
add_definitions
(
-DCAF_USE_ASIO
)
set
(
LD_DIRS
${
LD_DIRS
}
${
Boost_LIBRARIES
}
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
set
(
LD_FLAGS
${
LD_FLAGS
}
${
Boost_SYSTEM_LIBRARY
}
)
set
(
LD_DIRS
${
LD_DIRS
}
${
Boost_LIBRARIES
}
)
set
(
LD_FLAGS
${
LD_FLAGS
}
${
Boost_SYSTEM_LIBRARY
}
)
else
()
set
(
CAF_USE_ASIO no
)
endif
()
endif
()
endif
()
# setup unit test binary
# setup unit test binary
add_executable
(
caf-test
add_executable
(
caf-test
...
...
cmake/build_config.hpp.in
0 → 100644
View file @
e2f030d2
/******************************************************************************
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright (C) 2011 - 2015 *
* Dominik Charousset <dominik.charousset (at) haw-hamburg.de> *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#ifndef CAF_DETAIL_BUILD_CONFIG_HPP
#define CAF_DETAIL_BUILD_CONFIG_HPP
// this header is auto-generated by CMake
#if @CAF_LOG_LEVEL_INT@ != -1
#define CAF_LOG_LEVEL @CAF_LOG_LEVEL@
#endif
#if @CAF_NO_MEM_MANAGEMENT_INT@ != -1
#define CAF_NO_MEM_MANAGEMENT
#endif
#if @CAF_ENABLE_RUNTIME_CHECKS_INT@ != -1
#define CAF_ENABLE_RUNTIME_CHECKS
#endif
#if @CAF_USE_ASIO_INT@ != -1
#define CAF_USE_ASIO
#endif
#endif //CAF_DETAIL_BUILD_CONFIG_HPP
libcaf_core/caf/config.hpp
View file @
e2f030d2
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
#ifndef CAF_CONFIG_HPP
#ifndef CAF_CONFIG_HPP
#define CAF_CONFIG_HPP
#define CAF_CONFIG_HPP
#include "caf/detail/build_config.hpp"
// Config pararameters defined by the build system (usually CMake):
// Config pararameters defined by the build system (usually CMake):
//
//
// CAF_ENABLE_RUNTIME_CHECKS:
// CAF_ENABLE_RUNTIME_CHECKS:
...
...
libcaf_core/caf/detail/build_config.hpp
0 → 100644
View file @
e2f030d2
/******************************************************************************
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright (C) 2011 - 2015 *
* Dominik Charousset <dominik.charousset (at) haw-hamburg.de> *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
// default config is empty (will be overridden by CMake)
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