From: vsr Date: Wed, 20 Nov 2013 15:27:54 +0000 (+0000) Subject: Yet another workaround for CMake stupid behavior X-Git-Tag: BR_hydro_v_0_3_1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=019375874601ab0ee7417485fb5c4f0bed9bc92f;p=modules%2Fkernel.git Yet another workaround for CMake stupid behavior --- diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index a402d661b..7d2104e42 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -847,7 +847,8 @@ MACRO(SALOME_APPEND_LIST_OF_LIST result element_list) SET(_tmp_res) STRING(REPLACE ";" "," _tmp_res "${${element_list}}") - LIST(LENGTH result _list_len) + # Yet another CMake stupidity - LIST(LENGTH ";" var) returns 0 + STRING(LENGTH result _list_len) IF(NOT _list_len EQUAL 0) SET(${result} "${${result}}${_tmp_res};") # LIST(APPEND ...) doesn't handle well empty elements!? ELSE()