Re: [CMake] CMake is Converting lists to strings

2019-06-12 Thread Marc CHEVRIER
You are wrongly using the STRING(REPLACE …) command. The right way to use it to avoid list conversion is to expand the list inside  quotes (to preserve list items separators): STRING (REPLACE "../" "" SIMPLE_LIST "${SIMPLE_LIST}") Without the quotes, all list elements are concatenated in the

Re: [CMake] CMake is Converting lists to strings

2019-06-12 Thread J Decker
I know... just need to rebuild a new list... something like set( _ALL_INCLUDES ) foreach( INC ${ALL_INCLUDES}) string(REPLACE "../" "" INC ${INC}) LIST( APPEND _ALL_INCLUDES ${INC} ) endforeach( INC ) set( ALL_INCLUDES ${_ALL_INCLUDES}) On Wed, Jun 12, 2019 at 3:10 AM J Decker

[CMake] CMake is Converting lists to strings

2019-06-12 Thread J Decker
I'm collecting sources and includes into a parent scope variable, and then attempting to use that variable to reference the right sources. Sources get added to the list as ../(theirpath)/(source) so in the parent level I can simply replace "../" with "" and then they are relative in the right