Skip to content

Rename include directory, `#pragma once`, CMake target namespaces

Paul Gessinger-Befurt requested to merge ACTS-436-consistent-namespaces into master

As discussed on 24.04.2018, we are renaming the include directory ACTS -> Acts and replace the use of include guards with #pragma once.

This MR introduces these changes. It also includes a checker script and CI job that tests for global include guards and will fail if it finds those.

This also addresses the issue we have with inconsistent target names depending on whether we are building against an installed version or from subdirectory. This MR introduces a CMake function acts_add_library that should be used instead of plain add_library. This sets up an unprefixed internal target (e.g. Core) and adds a namespaced alias (e.g. Acts::Core). When exporting the targets, the namespace is applied to the unprefixed target, so Acts::Core is available in code using find_package(Acts). The function also makes sure our library output files are still called libActsCore.so and so on.

Closes ACTS-414 Closes ACTS-436 Closes ACTS-450

Edited by Paul Gessinger-Befurt

Merge request reports