[CMake] Support for Custom LANG in CMAKE (CUDA and general case)

t m cmake at majchrowski.co.uk
Tue Jun 21 05:14:05 EDT 2011


Hi James,

Thanks you for feedback. See my comments:

> I dismissed the idea of using the cmake dependency scanner, because it was a
> makefile only solution.  I wasn't interested in maintaining multiple code
> paths.  It's much better for testing to have it work basically the same way
> everywhere.

[TM] Is there any plan to perfrom removal of the cmake dependency
scanner for C and CXX
code or it will be still in use ? What is a supported non-makefile
solution for C and CXX code
and how the dependency scanning is pluged to the cmake in this case?
Can I pluged
my own dependency scanner which will generete the dependency file ?

> Also, in order to make the dependency scanning work properly the dependency
> scanner would have to be taught about things such as target architectures
> which can cause certain preprocessor flags to be defined (since these
> preprocessor flags can be used to change which headers get included) and it
> would have to be made consistent with CUDA and kept up to date.  It seemed a
> better solution to use the built in dependency generation in nvcc.

[TM] What I really think is required is to possibility to define
compleate support for the new language.
CMake already provides this possibilites to define compiler itself,
thought this set of files:

CMake*Compiler.cmake.in
CMake*CompilerABI.cu
CMake*Information.cmake
CMakeDetermine*Compiler.cmake
CMakeTest*Compiler.cmake

The missing part is possibilites to:
 - defined own dependency generator in case we would like to use
external dependency generator (e.g. nvcc --generate-dependencies)
 - Alternativly derived the default dependency generator.

If this is done I think nobody requires to merge the cuda changes to
the main stream of the cmake,
becouse of any language could be handle thought a standard CMAKE
Interface without need of patching.

What do you think about this idea?

regards, Tomasz Majchrowski.


More information about the CMake mailing list