Commit b3c59ff4 authored by Dominik Charousset's avatar Dominik Charousset

Fix comments and store versions as cache variables

parent a32c7fbd
...@@ -194,21 +194,24 @@ endif() ...@@ -194,21 +194,24 @@ endif()
# -- get CAF version ----------------------------------------------------------- # -- get CAF version -----------------------------------------------------------
# get line containing the version from config.hpp and extract version number # Get line containing the version from config.hpp and extract version number.
file(READ "libcaf_core/caf/config.hpp" CAF_CONFIG_HPP) file(READ "libcaf_core/caf/config.hpp" CAF_CONFIG_HPP)
string(REGEX MATCH "#define CAF_VERSION [0-9]+" CAF_VERSION_LINE "${CAF_CONFIG_HPP}") string(REGEX MATCH "#define CAF_VERSION [0-9]+" CAF_VERSION_LINE "${CAF_CONFIG_HPP}")
string(REGEX MATCH "[0-9]+" CAF_VERSION_INT "${CAF_VERSION_LINE}") string(REGEX MATCH "[0-9]+" CAF_VERSION_INT "${CAF_VERSION_LINE}")
# calculate major, minor, and patch version # Calculate major, minor, and patch version.
math(EXPR CAF_VERSION_MAJOR "${CAF_VERSION_INT} / 10000") math(EXPR CAF_VERSION_MAJOR "${CAF_VERSION_INT} / 10000")
math(EXPR CAF_VERSION_MINOR "( ${CAF_VERSION_INT} / 100) % 100") math(EXPR CAF_VERSION_MINOR "( ${CAF_VERSION_INT} / 100) % 100")
math(EXPR CAF_VERSION_PATCH "${CAF_VERSION_INT} % 100") math(EXPR CAF_VERSION_PATCH "${CAF_VERSION_INT} % 100")
# create full version string # Create full version string.
set(CAF_VERSION "${CAF_VERSION_MAJOR}.${CAF_VERSION_MINOR}.${CAF_VERSION_PATCH}") set(CAF_VERSION "${CAF_VERSION_MAJOR}.${CAF_VERSION_MINOR}.${CAF_VERSION_PATCH}"
# set the library version for our shared library targets CACHE INTERNAL "The full CAF version string")
# Set the library version for our shared library targets.
if(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD") if(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD")
set(CAF_LIB_VERSION "${CAF_VERSION_MAJOR}.${CAF_VERSION_MINOR}") set(CAF_LIB_VERSION "${CAF_VERSION_MAJOR}.${CAF_VERSION_MINOR}"
CACHE INTERNAL "The version string used for shared library objects")
else() else()
set(CAF_LIB_VERSION "${CAF_VERSION}") set(CAF_LIB_VERSION "${CAF_VERSION}"
CACHE INTERNAL "The version string used for shared library objects")
endif() endif()
# -- generate build config header ---------------------------------------------- # -- generate build config header ----------------------------------------------
......
...@@ -28,13 +28,13 @@ Locating packages in non-standard locations: ...@@ -28,13 +28,13 @@ Locating packages in non-standard locations:
Debugging options: Debugging options:
--log-level=STRING build with debugging output, possible values: --log-level=STRING build with debugging output, possible values:
- ERROR - ERROR
- WARNING - WARNING
- INFO - INFO
- DEBUG - DEBUG
- TRACE - TRACE
--sanitizers=STRING build with this list of sanitizers enabled --sanitizers=STRING build with this list of sanitizers enabled
Convenience options: Convenience options:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment