cmake - How to add path before every cpp in a SET variable? (CMakeLists) -


i have following variable in cmakelists:

set(source s1.cpp s2.cpp ... )

i add path before each sx.cpp don't want add hand that:

set(path path) set(source {$path}s1.cpp {$path}s2.cpp ... )

is there way add path without having copy variable around?

thanks

foreach(src ${source})   list(append src2 "${path}/${src}") endforeach() 

and have result in src2


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -