]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Yet another workaround for CMake stupid behavior
authorvsr <vsr@opencascade.com>
Wed, 20 Nov 2013 15:27:54 +0000 (15:27 +0000)
committervsr <vsr@opencascade.com>
Wed, 20 Nov 2013 15:27:54 +0000 (15:27 +0000)
salome_adm/cmake_files/SalomeMacros.cmake

index a402d661b5f7a78c259128008b641d3fe8f864b5..7d2104e424854270855c4759ae54f8a5e78468ee 100755 (executable)
@@ -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()