From d5b8752a4a58ce456f3df8d7914766b82af18bcf Mon Sep 17 00:00:00 2001 From: muellese Date: Sun, 29 Nov 2020 13:04:44 +0100 Subject: [PATCH] cmake: min. cmake version 3.12; fix quotes in add_compile_definitions --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aba75743..b5514bc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # This cmake file is not meant to be edited for a special setup. # For special setups use cache line files or command line options, as described a few # lines ahead concerning module INDEPENDENT builds -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.12) # check version file if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/version.txt") file(STRINGS "version.txt" MHMVERSION LIMIT_COUNT 1) @@ -52,9 +52,9 @@ project(mhm message("mhm VERSION: ${mhm_VERSION} (from ${MHMVERSION})") message("mhm DATE: ${MHMDATE}") # add version to pre-processor flags (qoutes need in before hand) -add_compile_definitions(MHMVERSION=\"${MHMVERSION}\") +add_compile_definitions(MHMVERSION='${MHMVERSION}') # add date to pre-processor flags (qoutes need in before hand) -add_compile_definitions(MHMDATE=\"${MHMDATE}\") +add_compile_definitions(MHMDATE='${MHMDATE}') # The variable "CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT" can be set before executing cmake via a cache command: # $cmake -DCMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT:STRING=ON .. -- GitLab