]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix for SALOME_CONFIGURE_PREPARE() macros: avoiding redundant ';' at the beginning...
authorana <ana@opencascade.com>
Fri, 15 Nov 2013 07:07:59 +0000 (07:07 +0000)
committerana <ana@opencascade.com>
Fri, 15 Nov 2013 07:07:59 +0000 (07:07 +0000)
salome_adm/cmake_files/SalomeMacros.cmake

index df81302fbddbf6cd18860d05105ae95b7a71f802..a402d661b5f7a78c259128008b641d3fe8f864b5 100755 (executable)
@@ -846,7 +846,14 @@ ENDMACRO(SALOME_GENERATE_TESTS_ENVIRONMENT)
 MACRO(SALOME_APPEND_LIST_OF_LIST result element_list)
   SET(_tmp_res)
   STRING(REPLACE ";" "," _tmp_res "${${element_list}}")
-  SET(${result} "${${result}};${_tmp_res}")  # LIST(APPEND ...) doesn't handle well empty elements!?
+
+  LIST(LENGTH result _list_len)
+  IF(NOT _list_len EQUAL 0)
+    SET(${result} "${${result}}${_tmp_res};")  # LIST(APPEND ...) doesn't handle well empty elements!?
+  ELSE()
+    SET(${result} "${_tmp_res};")              # to avoid redundant ';' at the beginning of the list
+  ENDIF()
+
 ENDMACRO(SALOME_APPEND_LIST_OF_LIST)
 
 #########################################################################