Merge pull request #9320 from Icinga/boost1.78

Make compatible with Boost 1.78 (for Windows)
This commit is contained in:
Alexander Aleksandrovič Klimov 2022-04-06 16:38:33 +02:00 committed by GitHub
commit 92e688b94a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 5 deletions

View File

@ -89,7 +89,7 @@ file(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING" ICINGA2_LICENSE_GPL)
set(ICINGA2_LICENSE "${ICINGA2_LICENSE_GPL}\n\n---\n\n${ICINGA2_LICENSE_ADDITIONS}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" ${ICINGA2_LICENSE})
file(STRINGS VERSION SPEC_VERSION REGEX "^Version:")
file(STRINGS ICINGA2_VERSION SPEC_VERSION REGEX "^Version:")
string(LENGTH "${SPEC_VERSION}" SPEC_VERSION_LENGTH)
math(EXPR SPEC_VERSION_LENGTH "${SPEC_VERSION_LENGTH} - 9")
string(SUBSTRING ${SPEC_VERSION} 9 ${SPEC_VERSION_LENGTH} SPEC_VERSION)
@ -102,7 +102,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/icinga-version.h.force)
configure_file(icinga-version.h.force ${CMAKE_CURRENT_BINARY_DIR}/icinga-version.h COPYONLY)
else()
if(NOT ICINGA2_GIT_VERSION_INFO OR GIT_VERSION MATCHES "-NOTFOUND$")
file(STRINGS VERSION SPEC_REVISION REGEX "^Revision: ")
file(STRINGS ICINGA2_VERSION SPEC_REVISION REGEX "^Revision: ")
string(LENGTH "${SPEC_REVISION}" SPEC_REVISION_LENGTH)
math(EXPR SPEC_REVISION_LENGTH "${SPEC_REVISION_LENGTH} - 10")
string(SUBSTRING ${SPEC_REVISION} 10 ${SPEC_REVISION_LENGTH} SPEC_REVISION)
@ -536,4 +536,4 @@ if(WIN32)
)
endif()
include(CPack)
include(CPack)

View File

@ -64,7 +64,7 @@ git log --use-mailmap | grep '^Author:' | cut -f2- -d' ' | sort -f | uniq > AUTH
Update the version:
```
sed -i "s/Version: .*/Version: $VERSION/g" VERSION
sed -i "s/Version: .*/Version: $VERSION/g" ICINGA2_VERSION
```
## Changelog <a id="changelog"></a>

View File

@ -2342,7 +2342,7 @@ for implementation details.
CMake determines the Icinga 2 version number using `git describe` if the
source directory is contained in a Git repository. Otherwise the version number
is extracted from the [VERSION](VERSION) file. This behavior can be
is extracted from the [ICINGA2_VERSION](ICINGA2_VERSION) file. This behavior can be
overridden by creating a file called `icinga-version.h.force` in the source
directory. Alternatively the `-DICINGA2_GIT_VERSION_INFO=OFF` option for CMake
can be used to disable the usage of `git describe`.

View File

@ -11,6 +11,7 @@
#include "base/objectlock.hpp"
#include <cstdint>
#include <mmatch.h>
#include <boost/filesystem/exception.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/lexical_cast.hpp>