Skip to main content

A simple build tool for C and C++

Project description

Installation

pip install tdbuild

Usage

Usage is dead simple. Use tdbuild new to create a Python script called tdfile.py. Hand-edit some basic inputs to the compiler (what are your source files? what is the executable called? etc). Then, run tdbuild to build and tdbuild run to run your code. Altogether, it looks like this:

mkdir new_project && cd new_project

python -m tdbuild new

emacs tdfile.py

python -m tdbuild

python -m tdbuild run

Why did you write this software?

Do you find CMake's scripting language arcane and its documentation unusable?

Do you struggle to install and maintain a usable set of Unix tools on Windows? And do you hate creating Makefiles that are cross platform?

Do you want to write code instead of learning how to use a flashy new build system like Meson?

Yeah. Me too. Use this C/C++ build system. Fundamentally, all it does it build a command line for your compiler. It's that simple. If tdbuild ever becomes insufficient for you, you can copy thee command line and do whatever the hell you want with it. You can also add custom flags to the command line.

Yes, this means your whole program will rebuild every time. If your program is very big or uses a lot of templates, your build times will be slow. If you are the target audience for this build tool, then you won't care. tdbuild is not for enterprise software, nor is it for large open source projects. It's for people who just want to write a damn C/C++ project that compiles on all platforms without screwing with build tools for a few days.

Some projects that I build with tdbuild every day:

Options

Your build options are simply a Python dictionary. That's it. Here's a list of all the possible options the tool supports:

Top Level

options.project:

options.source_dir:

options.include_dirs:

options.lib_dir:

options.build_dir:

options.source_files:

options.build_type:

options.binary_type:

options.cpp:

options.cpp_standard:

options.disable_console:

options.defines:

Windows

options.Windows.system_libs:

options.Windows.user_libs:

options.Windows.dlls:

options.Windows.ignore:

options.Windows.arch:

options.Windows.out:

options.Windows.runtime_library:

options.Windows.warnings:

options.Windows.extras:

Linux

options.Linux.compiler:

options.Linux.user_libs:

options.Linux.system_libs:

options.Linux.extras:

options.Linux.out:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tdbuild-3.0.4.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tdbuild-3.0.4-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file tdbuild-3.0.4.tar.gz.

File metadata

  • Download URL: tdbuild-3.0.4.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.2 Windows/10

File hashes

Hashes for tdbuild-3.0.4.tar.gz
Algorithm Hash digest
SHA256 e29f45c3966381b7ca1eb04cce9470be7a4dd416e56542d7cd878ef8dbf43af1
MD5 7a93a13c529e3625d70bb1c4ba5116a8
BLAKE2b-256 1e8636a46633b0ebc4bc3e2df69359e3ccaa54179f87f9adf2a187c48ff5dd28

See more details on using hashes here.

File details

Details for the file tdbuild-3.0.4-py3-none-any.whl.

File metadata

  • Download URL: tdbuild-3.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.2 Windows/10

File hashes

Hashes for tdbuild-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3d4c454200c5186508b71b7ca89f654523783561264538cc1460d8c8c74a4286
MD5 a12098113c69b8f5527cfe3a48f16c08
BLAKE2b-256 551dcdf3b18372ee824b16ac2a45b1d8dc994814ba1a27e42098687c0c9ce5ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page