]> git.lyx.org Git - features.git/commitdiff
Cmake build: Correct display cmake options
authorKornel Benko <kornel@lyx.org>
Sun, 14 Jul 2019 09:12:55 +0000 (11:12 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:36 +0000 (15:48 +0200)
The change allows to display options whose string-length
is less than 10 characters.
The previous setting truncated the string to 4 chars,
which is too few for a string like e.g. "NATIVE".

development/cmake/modules/LyXMacros.cmake

index ff0822e32a97cdfbff46d1818f72c3c64b65dc0c..aee2efab7dab9454a740407f2647f1cf2e9ffb26 100644 (file)
@@ -288,7 +288,7 @@ macro(LYX_OPTION_LIST_ALL)
        file(APPEND ${run_cmake} " -G\"${CMAKE_GENERATOR}\"  ${cont}")
        foreach(_option ${LYX_OPTIONS})
                if(${_option}_show_message OR ${ARGV0} STREQUAL "help")
-                       string(SUBSTRING "${_option}                            " 0 25 _var)
+                       string(SUBSTRING "${_option}                            " 0 31 _var)
                         get_property(_prop CACHE ${_option} PROPERTY STRINGS)
                        list(FIND LYX_OPTION_STRINGS ${_option} _index)
                        if (${_index} GREATER -1)
@@ -299,8 +299,8 @@ macro(LYX_OPTION_LIST_ALL)
                        else()
                                set(_isset OFF)
                        endif()
-                       string(SUBSTRING "${_isset}     " 0 4 _val)
-                       message(STATUS "${_var}= ${_val}   : ${${_option}_description}")
+                       string(SUBSTRING "${_isset}           " 0 10 _val)
+                       message(STATUS "${_var}= ${_val}: ${${_option}_description}")
                        file(APPEND ${run_cmake} " -D${_option}=${${_option}}  ${cont}")
                endif()
        endforeach()