The difference is that with set_property you can define the scope. In fact, you have more options with set_property , except to just specify the target, for example, specify the source files in the list in order to have a specific property.
For instance:
set_property(SOURCE src1.cpp src2.cpp PROPERTY SKIP_AUTOMOC ...)
This will add the SKIP_AUTOMOC property to the listed source files. (This is for Qt, where Moc'ing of objects happens automatically, and sometimes you donβt want it).
Contrast with set_target_properties , where you must specify Target and the property and its value.
set_target_properties(target PROPERTIES CXX_STANDARD 11 ...)
Hope this helps!
Chris source share