Giter VIP home page Giter VIP logo

clang-build-test's Issues

Allow explicit setting of sources without glob

Either via the rule that if sources are specified directly, directories will not be globbed, or via a switch, e.g. search_directories.
Some stupid project layouts have a lot of stuff mixed in a single folder and it may be better to allow this. Unit test .cpp files are generally gathered in a single folder, too.

Define a way to build only a desired set of targets

For example: a project may define various library targets, which should only be built if actually used (e.g. either a c-interface or a c++-interface).
One may also not want to always build all test executables.

Add toml parser and basic external target parsing

Should be able to parse a basic example such as

[myexe]
[myexe.sources]
include_directories = ["myexe/include"]
source_directories = ["myexe/src"]
[myexe.link]
dependencies = ["eigen"]
flags = ["-DEIGEN_NO_FAST_MATH"]

[eigen]
external = true
url = "https://github.com/eigenteam/eigen-git-mirror"

Enable parallel build

For this, a command line option -j should be added, so that e.g. -j4 could be used to create up to 4 parallel threads of build execution.
To make it work, it's merely necessary to spawn an appropriate number of threads when a targets compile/link has completed and the parents are called. Probably this should be done with a thread pool/queue, where it's continuously checked how many threads are currently running, threads are started if possible and the others kept waiting.

Filter output

Currently you are using print statements everywhere. However, if you would use functions like the python logging stuff, you could set different output levels. So people who want to integrate your code into their toolchain could silence your output or select how much output they want.

Build folder paths: reflect version numbers and build types?

The question is what should happen if no version is known or the build type is Default...

That aside, it would make sense to have paths such as build/release/targetname/1.0.0/ (with subdirectories for external_sources, obj/source_subfolder, lib, bin, include and possibly others).

For unknown versions, instead of a folder like v1.0.0 maybe vAny?

Rethink build folder structure

After resolving #14, it may be sensible to put files in folders called lib, bin and include (and, for that matter, copy export headers, analogous to CMake install).
The question is if all target build results should go into the same folder or, instead, folders lib/target1 etc. should be created.

Path separators

Path separators shouldn't be hardcoded into your scripts. Although it works most of the times, there are modules like PathLib2 that take away all the hassle with python path separators. E.g. if you are on windows, you have a folder that starts with U and you manipulate those strings (like adding a filename to the end of the path), python will not like that newly created string (see here: https://docs.python.org/3/howto/unicode.html for the example I gave).

Rebuild only modified

When traveling through the dependency graph, the build process should only be started when a target with updated sources or config is encountered.

As a first implementation, it should be enough to poll the modification dates and compare it to those in a cache file: https://stackoverflow.com/a/182259/4069571
E.g. a touch.toml could be written into the root of the builddir.

Add a qt5 usage example (may require e.g. `pre_compile` script)

Since external tools, such as moc, uic, rcc may need to be called, it may be necessary to introduce additional steps, such as pre_compile, post_compile and post_link, which will call a user-provided python script (if present).
The example would then contain a QT MWE and such an additional script which calls the required tools manually.

If this example were successful, it would prove the necessary versatility and applicability for this tool.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.