CMake options and the preprocessor macros that expose those choices. More...
Libcwd uses CMake for configuration. You can list cached options with cmake -LAH <build-dir> .
This section describes the CMake options specific to libcwd. The name of the macros that are related to the respective features are given between parenthesis after the option. You can not define these macros yourself, you may only use them in an #if ... #endif test. The macros are always defined; when the corresponding CMake option was enabled then the macro is defined to 1, otherwise it is defined to 0. This makes it possible for the compiler to warn you when you made a typo in the name of a macro (add -Wundef to your compile flags for that).
Example:
If you're using gitache to download/configure/compile/install libcwd, put the following content (relative to the root of your project) in cmake/gitache-configs/libcwd.cmake:
Optionally add a CMAKE_ARGS. For example, to toggle all default options:
Then use libcwd as package name in your CMakeLists.txt:
You must use libcwd here for version 2, because gitache sets <package-name>_ROOT to where the package is found, and that only works with find_package if <package-name> is the actual library name. For the same reason, for version 1 you should continue to use libcwd_r.