diff --git a/cmake/macros.cmake b/cmake/macros.cmake index 06df6c6d0..65b6cc9c8 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -78,8 +78,7 @@ function(listtostr LIST OUTPUT) # Do not use string(REPLACE ";" " ") here to avoid messing up list entries set(res) foreach(ITEM ${${LIST}}) - string(SUBSTRING "${ITEM}" 0 6 start) - if(start STREQUAL "SHELL:") + if(ITEM MATCHES "^SHELL:") string(SUBSTRING "${ITEM}" 6 -1 ITEM) endif() if(ITEM)