From 588368dd2a46ddec70741c6cc87a79a0b26ee383 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 23 Oct 2020 18:13:15 +0200 Subject: Add automatic generation of version and build type headers for compilation This change replaces the static version and build type header file generation by CMake with dynamic CMake targets to generate the version file whenever a Make target is executed. Thus, there is no need anymore to reconfigure and rerun CMake after the repository version or build configuration has changed. --- cmake/GenerateBuild.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 cmake/GenerateBuild.cmake (limited to 'cmake/GenerateBuild.cmake') diff --git a/cmake/GenerateBuild.cmake b/cmake/GenerateBuild.cmake new file mode 100644 index 0000000..5af35d2 --- /dev/null +++ b/cmake/GenerateBuild.cmake @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (C) 2020 Manuel Bentele +# + +# set current build type of the project +set(XLOOP_BUILD ${BUILD_TYPE}) + +# write dnbd3 build type into a new C source file based on the specified build file template +configure_file(${BUILD_INPUT_FILE_TEMPLATE} ${BUILD_OUTPUT_FILE}) -- cgit v1.2.3-55-g7522