From: Kornel Benko Date: Tue, 7 Apr 2020 09:48:45 +0000 (+0200) Subject: Cmake build: Discard (unset) some variables if not used anymore X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b23b79d5a9ef4e4ace2e604a2b8c4af0777288d0;p=features.git Cmake build: Discard (unset) some variables if not used anymore --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e0e565657f..7e2d3d1302 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,7 +275,7 @@ find_package(CXX11Compiler) if(NOT CXX11COMPILER_FOUND) message(FATAL_ERROR "A C++11 compatible compiler is required.") endif() -set(LYX_GCC11_MODE) +unset(LYX_GCC11_MODE) if(UNIX OR MINGW) if (CMAKE_CXX_COMPILER_ID MATCHES "^([cC]lang|AppleClang)$") # ignore the GCC_VERSION for clang @@ -393,6 +393,7 @@ foreach(_c_l ${_config_lines} ) set(LYX_DATE "${CMAKE_MATCH_1}") endif() endforeach(_c_l) +unset(_config_lines) FIND_PROGRAM(LYX_GITVERSION git) #message(STATUS "gitversion = ${LYX_GITVERSION}") @@ -1068,7 +1069,7 @@ endif() include(${LYX_CMAKE_DIR}/ConfigureChecks.cmake) configure_file(${LYX_CMAKE_DIR}/configCompiler.h.cmake ${TOP_BINARY_DIR}/configCompiler.h) -set(opts) +unset(opts) foreach(_option ${LYX_OPTIONS}) if(${_option}_show_message) string(SUBSTRING "${_option} " 0 31 _var) @@ -1103,6 +1104,8 @@ list(APPEND tmp_vi " LyX files dir: ${CMAKE_INSTALL_PREFIX}/${dest_da string(REPLACE ";" "\\n" VERSION_INFO "${tmp_vi}") configure_file(${LYX_CMAKE_DIR}/config.h.cmake ${TOP_BINARY_DIR}/config.h) +unset(opts) +unset(tmp_vi) if(QTVERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*") MATH(EXPR QT4_VERSION "(${CMAKE_MATCH_1}<<16)|(${CMAKE_MATCH_2}<<8)|${CMAKE_MATCH_3}")