commit a9764cf191fe4454d5c5b0e057669689870453cf
Author: Kornel Benko <[email protected]>
Date:   Wed Dec 9 15:37:58 2015 +0100

    Cmake build: Initialize some variables before use.

diff --git a/development/autotests/ExportTests.cmake 
b/development/autotests/ExportTests.cmake
index 4d3b316..6c5e494 100644
--- a/development/autotests/ExportTests.cmake
+++ b/development/autotests/ExportTests.cmake
@@ -36,6 +36,14 @@ else()
   set(PDF_FORMATS "pdf" "pdf2" "pdf3")
 endif()
 
+set(potential_languages "ca" "cs" "da" "de" "el" "es" "eu" "fa" "fr" "gl" "he" 
"hu" "id" "it" "ja" "ko" "nb" "nl" "pl" "pt" "ro" "ru" "sk" "sl" "sr" "sv" "uk" 
"zh_CN")
+
+macro(initLangVars varname)
+  foreach(_l ${potential_languages})
+    set(${varname}_${_l})
+  endforeach()
+endmacro()
+
 macro(getoutputformats filepath varname)
   file(STRINGS "${filepath}" lines)
   # What should we test, if default_output_format is not defined?
@@ -164,6 +172,8 @@ endmacro()
 macro(loadTestList filename resList depth)
   # Create list of strings from a file without comments
   # ENCODING parameter is a new feature in cmake 3.1
+  initLangVars(${resList})
+  initLangVars("sublabel")
   if (CMAKE_VERSION VERSION_GREATER "3.1")
     file(STRINGS ${filename} tempList ENCODING "UTF-8")
   else()
diff --git a/development/cmake/modules/LyXMacros.cmake 
b/development/cmake/modules/LyXMacros.cmake
index c0dd65e..11a050c 100644
--- a/development/cmake/modules/LyXMacros.cmake
+++ b/development/cmake/modules/LyXMacros.cmake
@@ -104,7 +104,9 @@ macro(LYX_AUTOMOC)
 
                                        set(_moc  
${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
                                        if (WIN32)
-                                                         set(_def -D_WIN32)
+                                               set(_def -D_WIN32)
+                                       else()
+                                               set(_def)
                                        endif()
                                        #set(_moc ${_abs_PATH}/${_current_MOC})
                                        add_custom_command(OUTPUT ${_moc}

Reply via email to