[cmake-developers] [Discussion] Add python support for CMakeLists

Brad King brad.king at kitware.com
Fri Jan 13 11:15:19 EST 2017


On 01/13/2017 11:05 AM, Egor Pugin wrote:
> Why not just use C/C++ for writing build system (bs) rules?
> 
> CMake first will build bs itself (e.g. into shared library) and then
> load and execute it on the source tree.

In an earlier post of this thread I said that no dynamic loading will
be allowed.  We used to have the `load_command` command but it is now
deprecated.  This approach simply doesn't work because we can't know
that the toolchains can compile for CMake's architecture on the host.
Certainly we're not going to include a C++ JIT in CMake itself ;)

> I'll investigate this in my C++ Archive Network [1] project very soon.
> Now I have mentioned here declarative (YAML) syntax with custom CMake
> insertions. For example, see specifications [2-5].

YAML may be a nice choice for a declarative spec, especially because
it can just contain JSON too.  One requirement for such a format is
that it is possible for a tool to read the entire spec, make small
modifications, and write it back out as close as possible to the
original format.  The idea is that "git diff" should only show the
changes made by the tool.  This means a standard layout would need
to be defined.

-Brad



More information about the cmake-developers mailing list