How do I correctly pass CMake list (semicolon-sep) of flags to set_target_properties?

I don’t think set_target_properties can do the expansion automatically, but you can use string (REPLACE ...) to expand a list into a space separated string:

string (REPLACE ";" " " LD_FLAGS_STR "${LD_FLAGS}")
set_target_properties(
  myTarget PROPERTIES
  LINK_FLAGS  "${LD_FLAGS_STR}"
)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)