C ++ based system

Are there any build systems that don't use DSL but actually use C ++ as the build language?

+4
source share
6 answers

I wrote a build system that I use in my Python projects called pybake . It is designed to be a little smarter than it does, with less magic. The construct is also defined in Python, thereby reusing the existing language, instead of generating a new DSL for this purpose. An example is used here.

+3
source

Yo Dawg, I heard that you like C ++, so I added C ++ to your build system, so you need to compile before compiling.

+11
source

No, which are popular if someone was crazy enough to even write it. C ++ would be an incredibly awkward language for this.

If you want to create it, instead choose a language like Python or Lua to use something popular rather than invent a new DSL.

+3
source

You ask if there are any build systems like Make or Ant that use C ++ code as directives rather than specialized commands? Although many higher-level languages ​​have such a system, in C ++ I do not know. Of course, not popular. This is probably due to the fact that C ++ is a compiled language, and not one that is trivially parsed. This makes it less suitable for what is essentially an easy scripting task.

+2
source

There is probably C ++ code there, but if you mean that you have to write a C ++ program and compile it, then run it to create another source tree, I don't think that would really work in a circuit things With what would you build your script construct with? It goes on and on.

Compilers and commands behind scripting languages ​​are often written in C or C ++.

+1
source

Since C ++ is compiled, this will give you the problem of creating a build system for your C ++ build system. I do not know any C ++ based build system and would be surprised to find it. For interpreted languages ​​like Python, self-tuning is not a problem (and therefore you will find, for example, scons).

If you are looking for something better than Make, check out CMake . Although this is somewhat outdated, you can find the C ++ Project Template as an example for creating projects based on CMake.

0
source

Source: https://habr.com/ru/post/1339955/


All Articles