[cmake-developers] OpenCL language support (was: Compiler dependencies with Unix Makefiles)

Brad King brad.king at kitware.com
Mon Aug 27 13:41:06 EDT 2018


On 08/25/2018 02:08 PM, jerry.c.t at web.de wrote:
> new Compiler to CMake which compiles and links OpenCL files (file ending .cl)

Will that be done via `enable_language(OpenCL)`?  How might it work
on VS and Xcode?

> What is the reason that CMake uses its own mechanism with Unix Makefiles
> instead of relying on the compiler?

We support compilers that don't have such options and have done so since
before many of today's compilers gained support.

> Is it possible to configure CMake to use -MMD -MF with Unix Makefiles?

I've long wanted to see the Makefile generators converted to that
approach when using compilers that support it, but have never found
time to do it.

> If not, is it possible to tell cmake_depends to understand .cl files?

In principle yes, but in the long run it would certainly be better
to use the depfile approach.

-Brad


More information about the cmake-developers mailing list