Skip to content

cbt-2024.06.23

Compare
Choose a tag to compare
@swar-mukh swar-mukh released this 23 Jun 17:17
· 17 commits to main since this release

I am thrilled to share the fourth public release of cbt i.e. cbt-2024.06.23! This is the biggest release so far and the primary reason why I started this project, i.e. to make compilation easy without resorting to cryptic Make/CMake commands and/or maintaining them perpetually.

This release primarily focused on making compilations timestamp-aware. When compile-project is invoked, cbt will now compile only those file(s) which:

  1. Has/have been newly created
  2. OR, was/were updated/modified since last compilation
  3. OR, was/were unsuccessful during previous compilation
  4. OR, is a dependent of a header file which was modified or has been newly created since last compilation

Features

  1. Compile, test and build simply by invoking commands
  2. Use ready-made scaffold file content or customise/update it
  3. Use cbt_tools library AS IS or customise it as per project requirements

Note: Since testing is made on a custom harness (via cbt_tools/test_harness), it is deliberately unaware of timestamps. The ideal scenario would be to only execute test-case(s) which has/have been modified, or run the entire test-suite if any file/dependency in the entire chain has been modified. It is quite difficult to accomplish that, and hence has been postponed (refer Roadmap section in README.md).

Installation

Note 1: Currently, binaries for only Ubuntu and Windows platforms are provided. For other platforms, refer to README.md for instructions on building from source.
Note 2: cbt relies on g++ for the underlying compilation mechanism. Ensure you have the GNU toolchain for your respective platform.

Steps

  1. Download the binary and the <platform>.sha256.checksum.txt for your respective platform
  2. IMPORTANT: Ensure that the integrity of the binary is preserved by verifying it through the respective <platform>.sha256.checksum.txt file
  3. Rename the binary to just cbt (or cbt.exe on Windows)
  4. On *nix platform, move the binary to /opt directory
  5. On Windows, create a new folder C:\CBT\ and move the binary under it
  6. Update PATH accordingly for your respective platform
  7. Run cbt help

You are good to go!

Highlights

  • Compile file(s) only if modified or updated or if previous compilation was/were unsuccessful by @swar-mukh (b6c698c)
  • Add support for generating SHA-256 hash on MacOS by @swar-mukh (68d88a6)
  • Show proper usage of environment parameters by @swar-mukh (2549635)
  • Fix an issue where directories with no binaries were being added while building project by @swar-mukh (b384439)
  • Use normalised path for directory traversal and execution by @swar-mukh (aa9e999)
  • Include '<vector>' in the correct file generated during scaffolding by @swar-mukh (cdcd371)

Full Changelog: refer here