[CMake] XCode generator and .metal shader files

Victor Rykov soth1985 at gmail.com
Fri Jul 22 17:07:06 EDT 2016


Hi,

After adding a .metal file to a target via add_executable the metal file
does not get pushed to the generated project`s Compile Sources queue and
subsequently does not compile during project build unless I add the file to
the queue manually from Xcode, I`ve tried setting compile flags on the
.metal file as I`ve seen people mention that it works:

set(MetalTriangle_SHADERS Shaders.metal)

set_source_files_properties(${MetalTriangle_SHADERS} PROPERTIES
COMPILE_FLAGS "-fno-fast-math")


but unfortunately it did not help, is there any workaround to this problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160723/b3f33351/attachment.html>


More information about the CMake mailing list