CMake setting reference¶
This section references all settings that can be used with Cahute’s CMake settings.
CMake built-in settings¶
The following variables can be used with every CMake project, and described amongst others in cmake-variables(7), but may be described with information more relevant to Cahute here.
CMAKE_BUILD_TYPEBuild type. Commonly found values with Cahute are the following:
DebugNon-optimized output with debug symbols and no binary stripping.
ReleaseOptimized output.
Note
As described in the CMake package guidelines for Archlinux, CMake automatically forces
-O3whenReleaseis selected. Cahute overrides this with-O2instead.CMAKE_INSTALL_PREFIXInstall prefix.
In the build from source guides, it is recommended to set this to
/usrrather than the default/usr/localvalue.CMAKE_VERBOSE_MAKEFILEOptional switch to set to
ONto see the commands executed when building the project.
Cahute-specific general settings¶
The following variables are specific to Cahute.
CAHUTE_CLIEnable command-line utilities.
This is enabled by default.
CAHUTE_CLI_EXPERIMENTALEnable experimental / unfinished command-line utilities.
This is disabled by default.
CAHUTE_CLI_LIBRARY_TYPEWhich type of the Cahute library should the CLI utilities, if built, depend on, among
staticandshared.This is only taken into account if CAHUTE_LIBRARY_TYPE is set to
both. It is set tosharedby default.
CAHUTE_CLI_RUNTIME_DEPSWhether to install runtime dependencies (such as shared libraries) with the command-line utilities.
This is disabled by default on all platforms.
CAHUTE_DEFAULT_LOGLEVELDefault logging level used when creating a context, among
debuginfo,warning(by default),error,fatalandnone.See Logging facilities for more information.
CAHUTE_GITInclude git-related information to the built targets, i.e. if the source directory is a git repository with at least one commit on the current branch, the following macros will be defined and included in the headers:
CAHUTE_GIT_COMMIT;CAHUTE_GIT_BRANCH;CAHUTE_GIT_TAGGED;CAHUTE_GIT_DIRTY.
This is enabled by default.
CAHUTE_LIBRARY_TYPEType to build the Cahute library as, among the following possibilities:
staticOnly build the library as a static library (
.aor.lib, depending on the platform).sharedOnly build the library as a shared library (
.soor.dll, depending on the platform).bothBuild the library as both a static and a shared library.
This is set to
sharedon Win32, and tostaticon other platforms.
CAHUTE_STATICBuild the Cahute library as a static library.
This is disabled by default on Win32, and enabled by default on other platforms.
CAHUTE_LIBUSBEnable the use of libusb.
Note
This will be ignored on Win32, since Cahute needs to support drivers libusb doesn’t.
This is enabled by default on platforms libusb support.
CAHUTE_PKGCONFEnable installing pkgconf / pkg-config files.
This is supported by default.
CAHUTE_REPORT_URLURL to the bug reporting guide included within the library and command-line utilities.
CAHUTE_SDLEnable the use of SDL.
This is enabled by default on platforms SDL2 support.
CAHUTE_UDEVEnable building and installing the udev rule.
This is enabled by default when building for Linux.
CAHUTE_UDEV_GROUPName of the group to which the udev rule gives permission to calculators plugged in via USB.
It is recommended to set the same group here as for normal serial devices, as defined by your distribution.
The Linux Standard Base groups defines
uucpand the Archlinux user groups use it for serial devices, other distributions use other groups such asdialout; see the following for more information:This is set to
uucpby default.
Cahute-specific command-line utility switches¶
Most command-line utilities in Cahute can be enabled using the CAHUTE_CLI setting.
However, they can also be individually enabled using the following switches:
Cahute-specific experimental command-line utility switches¶
Some command-line utilities in Cahute are considered experimental (not fully implemented), and can be enabled by enabling both the CAHUTE_CLI and CAHUTE_CLI_EXPERIMENTAL settings.
However, they can also be individually enabled using the following switches:
CAHUTE_CLI_CASEnable building CaS.