[LyX/master] Cmake build: Discard (unset) some variables if not used anymore
Kornel Benko
kornel at lyx.org
Tue Apr 7 09:29:58 UTC 2020
commit c84fc5b40c8c3f99c9c25dd34bf31c194286cdb3
Author: Kornel Benko <kornel at lyx.org>
Date: Tue Apr 7 11:48:45 2020 +0200
Cmake build: Discard (unset) some variables if not used anymore
---
CMakeLists.txt | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0e5656..7e2d3d1 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}")
More information about the lyx-cvs
mailing list