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
8de46283
Commit
8de46283
authored
Jul 27, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read version from config.hpp, delete VERSION file
parent
7b86aa08
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
42 deletions
+44
-42
CMakeLists.txt
CMakeLists.txt
+12
-7
VERSION
VERSION
+0
-1
libcaf_core/caf/config.hpp
libcaf_core/caf/config.hpp
+32
-34
No files found.
CMakeLists.txt
View file @
8de46283
cmake_minimum_required
(
VERSION 2.8
)
cmake_minimum_required
(
VERSION 2.8
)
project
(
caf C CXX
)
project
(
caf C CXX
)
# extract version from VERSION file
# read content of config.hpp
file
(
STRINGS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/VERSION"
CAF_VERSION LIMIT_COUNT 1
)
file
(
READ
"libcaf_core/caf/config.hpp"
CONFIG_HPP
)
string
(
REPLACE
"."
" "
version_numbers
${
CAF_VERSION
}
)
# get line containing the version
separate_arguments
(
version_numbers
)
string
(
REGEX MATCH
"#define CAF_VERSION [0-9]+"
VERSION_LINE
"
${
CONFIG_HPP
}
"
)
list
(
GET version_numbers 0 CAF_VERSION_MAJOR
)
# extract version number from line
list
(
GET version_numbers 1 CAF_VERSION_MINOR
)
string
(
REGEX MATCH
"[0-9]+"
VERSION_INT
"
${
VERSION_LINE
}
"
)
list
(
GET version_numbers 2 CAF_VERSION_PATCH
)
# calculate major, minor, and patch version
math
(
EXPR CAF_VERSION_MAJOR
"
${
VERSION_INT
}
/ 10000"
)
math
(
EXPR CAF_VERSION_MINOR
"(
${
VERSION_INT
}
/ 100) % 100"
)
math
(
EXPR CAF_VERSION_PATCH
"
${
VERSION_INT
}
% 100"
)
# create full version string
set
(
CAF_VERSION
"
${
CAF_VERSION_MAJOR
}
.
${
CAF_VERSION_MINOR
}
.
${
CAF_VERSION_PATCH
}
"
)
# prohibit in-source builds
# prohibit in-source builds
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_BINARY_DIR
}
"
)
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_BINARY_DIR
}
"
)
...
...
VERSION
deleted
100644 → 0
View file @
7b86aa08
0.10.1
libcaf_core/caf/config.hpp
View file @
8de46283
...
@@ -39,8 +39,8 @@
...
@@ -39,8 +39,8 @@
*/
*/
#define CAF_VERSION 1001
#define CAF_VERSION 1001
#define CAF_MAJOR_VERSION (CAF_VERSION / 10000
0
)
#define CAF_MAJOR_VERSION (CAF_VERSION / 10000)
#define CAF_MINOR_VERSION ((CAF_VERSION / 100) % 100
0
)
#define CAF_MINOR_VERSION ((CAF_VERSION / 100) % 100)
#define CAF_PATCH_VERSION (CAF_VERSION % 100)
#define CAF_PATCH_VERSION (CAF_VERSION % 100)
// sets CAF_DEPRECATED, CAF_ANNOTATE_FALLTHROUGH,
// sets CAF_DEPRECATED, CAF_ANNOTATE_FALLTHROUGH,
...
@@ -48,22 +48,22 @@
...
@@ -48,22 +48,22 @@
#if defined(__clang__)
#if defined(__clang__)
# define CAF_CLANG
# define CAF_CLANG
# define CAF_DEPRECATED __attribute__((__deprecated__))
# define CAF_DEPRECATED __attribute__((__deprecated__))
# define CAF_PUSH_WARNINGS \
# define CAF_PUSH_WARNINGS
\
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic push")
\
_Pragma("clang diagnostic ignored \"-Wall\"") \
_Pragma("clang diagnostic ignored \"-Wall\"")
\
_Pragma("clang diagnostic ignored \"-Wextra\"") \
_Pragma("clang diagnostic ignored \"-Wextra\"")
\
_Pragma("clang diagnostic ignored \"-Werror\"") \
_Pragma("clang diagnostic ignored \"-Werror\"")
\
_Pragma("clang diagnostic ignored \"-Wdeprecated\"") \
_Pragma("clang diagnostic ignored \"-Wdeprecated\"")
\
_Pragma("clang diagnostic ignored \"-Wdisabled-macro-expansion\"") \
_Pragma("clang diagnostic ignored \"-Wdisabled-macro-expansion\"")
\
_Pragma("clang diagnostic ignored \"-Wextra-semi\"") \
_Pragma("clang diagnostic ignored \"-Wextra-semi\"")
\
_Pragma("clang diagnostic ignored \"-Wdocumentation\"") \
_Pragma("clang diagnostic ignored \"-Wdocumentation\"")
\
_Pragma("clang diagnostic ignored \"-Wweak-vtables\"") \
_Pragma("clang diagnostic ignored \"-Wweak-vtables\"")
\
_Pragma("clang diagnostic ignored \"-Wunused-parameter\"") \
_Pragma("clang diagnostic ignored \"-Wunused-parameter\"")
\
_Pragma("clang diagnostic ignored \"-Wswitch-enum\"") \
_Pragma("clang diagnostic ignored \"-Wswitch-enum\"")
\
_Pragma("clang diagnostic ignored \"-Wshadow\"") \
_Pragma("clang diagnostic ignored \"-Wshadow\"")
\
_Pragma("clang diagnostic ignored \"-Wconversion\"") \
_Pragma("clang diagnostic ignored \"-Wconversion\"")
\
_Pragma("clang diagnostic ignored \"-Wcast-align\"") \
_Pragma("clang diagnostic ignored \"-Wcast-align\"")
\
_Pragma("clang diagnostic ignored \"-Wundef\"") \
_Pragma("clang diagnostic ignored \"-Wundef\"")
\
_Pragma("clang diagnostic ignored \"-Wnested-anon-types\"")
_Pragma("clang diagnostic ignored \"-Wnested-anon-types\"")
# define CAF_POP_WARNINGS \
# define CAF_POP_WARNINGS \
_Pragma("clang diagnostic pop")
_Pragma("clang diagnostic pop")
...
@@ -124,26 +124,24 @@ using ::backtrace_symbols_fd;
...
@@ -124,26 +124,24 @@ using ::backtrace_symbols_fd;
#endif
#endif
#ifdef CAF_ENABLE_RUNTIME_CHECKS
#ifdef CAF_ENABLE_RUNTIME_CHECKS
# define CAF_REQUIRE__(stmt, file, line) \
# define CAF_REQUIRE__(stmt, file, line) \
printf("%s:%u: requirement failed '%s'\n", file, line, stmt); \
printf("%s:%u: requirement failed '%s'\n", file, line, stmt); { \
{ \
void* array[10]; \
void* array[10]; \
auto caf_bt_size = ::caf::detail::backtrace(array, 10); \
auto caf_bt_size = ::caf::detail::backtrace(array, 10); \
::caf::detail::backtrace_symbols_fd(array, caf_bt_size, 2); \
::caf::detail::backtrace_symbols_fd(array, caf_bt_size, 2); \
} abort()
} \
# define CAF_REQUIRE(stmt) \
abort()
if (static_cast<bool>(stmt) == false) { \
# define CAF_REQUIRE(stmt) \
CAF_REQUIRE__(#stmt, __FILE__, __LINE__); \
if (static_cast<bool>(stmt) == false) { \
} static_cast<void>(0)
CAF_REQUIRE__(#stmt, __FILE__, __LINE__); \
}((void) 0)
#else
#else
# define CAF_REQUIRE(unused) static_cast<void>(0)
# define CAF_REQUIRE(unused) static_cast<void>(0)
#endif
#endif
#define CAF_CRITICAL__(error, file, line) { \
#define CAF_CRITICAL__(error, file, line) {
\
printf("%s:%u: critical error: '%s'\n", file, line, error); \
printf("%s:%u: critical error: '%s'\n", file, line, error);
\
exit(7); \
exit(7);
\
}
((void)
0)
}
static_cast<void>(
0)
#define CAF_CRITICAL(error) CAF_CRITICAL__(error, __FILE__, __LINE__)
#define CAF_CRITICAL(error) CAF_CRITICAL__(error, __FILE__, __LINE__)
...
...
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