[CMake] XCode generator and .metal shader files

Victor Rykov soth1985 at gmail.com
Sun Jul 31 00:03:10 EDT 2016


Thanks for a tip,
Cmake generates correct project with regard to shaders if I set LANGUAGE to
METAL

set_source_files_properties(${MetalTriangle_SHADERS} PROPERTIES LANGUAGE
METAL)

On Wed, Jul 27, 2016 at 6:03 AM, Gregor Jasny <gjasny at googlemail.com> wrote:

> Hello,
>
> On 22/07/16 23:07, Victor Rykov wrote:
> > 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?
>
> Does it help to set the source files LANGUAGE property to C or C++ via
> https://cmake.org/cmake/help/v3.6/prop_sf/LANGUAGE.html ?
>
> Thanks,
> Gregor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160731/91bc8936/attachment.html>


More information about the CMake mailing list