Import the package
You can import pid-utils as usual with PID. In the root CMakelists.txt
file of your package, after the package declaration you have to write something like:
PID_Dependency(pid-utils)
It will try to install last version of the package.
If you want a specific version (recommended), for instance the currently last released version:
PID_Dependency(pid-utils VERSION 0.8)
Components
hashed-string
This is a pure header library (no binary).
provides constexpr functions and user-defined literals for string hashing
Details
Please look at this page to get more information.
include directive :
In your code using the library:
#include <pid/hashed_string.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND hashed-string
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT hashed-string
PACKAGE pid-utils)
containers
This is a pure header library (no binary).
provides custom containers
include directive :
In your code using the library:
#include <pid/containers.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND containers
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT containers
PACKAGE pid-utils)
unreachable
This is a pure header library (no binary).
provides a pid::unreachable ( ) function to instruct the compiler that a section of code can never be reached
include directive :
In your code using the library:
#include <pid/unreachable.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND unreachable
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT unreachable
PACKAGE pid-utils)
static-type-info
This is a pure header library (no binary).
provides a constexpr functions to extract the name and a unique identifier of a type at compile time
Details
Please look at this page to get more information.
exported dependencies:
- from this package:
include directive :
In your code using the library:
#include <pid/static_type_info.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND static-type-info
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT static-type-info
PACKAGE pid-utils)
scope-exit
This is a pure header library (no binary).
provides ways to run functions when a scope is exited
Details
Please look at this page to get more information.
include directive :
In your code using the library:
#include <pid/scope_exit.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND scope-exit
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT scope-exit
PACKAGE pid-utils)
overloaded
This is a pure header library (no binary).
Provide the ‘overloaded’ idiom to simplify the use of std::visit
include directive :
In your code using the library:
#include <pid/overloaded.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND overloaded
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT overloaded
PACKAGE pid-utils)
index
This is a pure header library (no binary).
Provide an Index type that can be used to safely index containers expecting signed or unsigned indexes
exported dependencies:
- from this package:
include directive :
In your code using the library:
#include <pid/index.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND index
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT index
PACKAGE pid-utils)
assert
This is a shared library (set of header files and a shared binary object).
enhanced assert macro, see https://github.com/jeremy-rifkin/asserts
include directive :
In your code using the library:
#include <pid/assert.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND assert
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT assert
PACKAGE pid-utils)
utils
This is a pure header library (no binary).
export all the other libraries present in this package
exported dependencies:
- from this package:
include directive :
In your code using the library:
#include <pid/utils.h>
CMake usage :
In the CMakeLists.txt files of your applications and tests, or those of your libraries that do not export the dependency:
PID_Component_Dependency(
COMPONENT your component name
DEPEND utils
PACKAGE pid-utils)
In the CMakeLists.txt files of libraries exporting the dependency :
PID_Component_Dependency(
COMPONENT your component name
EXPORT utils
PACKAGE pid-utils)