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
Post a Comment