From: ana Date: Fri, 15 Nov 2013 07:07:59 +0000 (+0000) Subject: Fix for SALOME_CONFIGURE_PREPARE() macros: avoiding redundant ';' at the beginning... X-Git-Tag: BR_hydro_v_0_3_1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3f9667b1a658408a83125476fc33742977959209;p=modules%2Fkernel.git Fix for SALOME_CONFIGURE_PREPARE() macros: avoiding redundant ';' at the beginning of the _PREREQ_COMPO_LIST list --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index df81302fb..a402d661b 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -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) #########################################################################