Configure-Time

File Discovery

  • All files under src/ ending in:

    • .c

    • .cpp

    are globbed as source files (see Requirements to use LIBRA for repository layout requirements) so that if you add a new source file, rename a source file, etc., you just need to re-run cmake. This means you don’t have to MANUALLY specify all the files in the cmake project. Woo-hoo!

    Note

    See Using cmake Globbing for rationale on why globs are used, contrary to common cmake guidance.

  • All files under tests/ ending in a specified pattern are recursively globbed as unit test files which will be compiled into executable unit tests at build time if LIBRA_TESTS=YES. See Variables more details on this configuration item. Same for integration tests. ${LIBRA_INTEGRATION_TEST_MATCHER.{c,cpp}}.

  • All files under tests/ ending in a specified pattern are recursively globbed as the test harness for unit/integration tests. All test harness files will be compiled into static libraries at build time and all test targets link against them if LIBRA_TESTS=YES.

Note

The difference between unit tests and integration tests is purely semantic, and exists solely to help organize your tests. LIBRA treats both types of tests equivalently.

The following variables are available for fine-tuning the cmake configuration process. All of these variables can be specified on the command line via -D, or put in your project-local.cmake–see project-local.cmake: How To Hook Into LIBRA for details.

Knobs For Configuring LIBRA/Cmake

The location where cmake should search for other locally installed libraries (e.g., $HOME/.local). VERY useful to separate out 3rd party headers which you want to suppress all warnings for by treating them as system headers when you can’t/don’t want to install things as root.

Only available if LIBRA_DRIVER=SELF.

Default: $HOME/.local/system

Knobs For Supporting SW Engineering

Enable documentation build via make apidoc.

Default: NO.

Knobs For Configuring Builds

Enable multithreaded code/OpenMP code via compiler flags (e.g., -fopenmp), and/or selecting additional code for compilation.

Default: NO.