[CMake] set file property from function

Tiago Macarios tiagomacarios at gmail.com
Mon Jul 18 03:21:59 EDT 2016


Hi,

Is there a way to set a property of a file/source from a function?

Below seems to work file outside of a function, but seems not to work
inside one.

set_property(
    SOURCE ${AFILE}
    APPEND PROPERTY COMPILE_FLAGS "/wd4068"
)

Do I need to CACHE it? or is it a scope problem?

Thanks,

Mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160718/f2ab9deb/attachment.html>


More information about the CMake mailing list