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_TYPE
Build type. Commonly found values with Cahute are the following:
Debug
Non-optimized output with debug symbols and no binary stripping.
Release
Optimized output.
Note
As described in the CMake package guidelines, CMake automatically forces
-O3
whenRelease
is selected. Cahute overrides this with-O2
instead.CMAKE_INSTALL_PREFIX
Install prefix.
In the Build from source guides guide, it is recommended to set this to
/usr
rather than the default/usr/local
value.CMAKE_VERBOSE_MAKEFILE
Optional switch to set to
ON
to see the commands executed when building the project.
Cahute-specific general settings¶
The following variables are specific to Cahute.
CAHUTE_DEFAULT_LOGLEVEL
Default logging level used when creating a context, among
info
,warning
(by default),error
,fatal
andnone
.See Logging facilities for more information.
CAHUTE_CLI
Enable command-line utilities.
CAHUTE_CLI_EXPERIMENTAL
Enable experimental / unfinished command-line utilities.
CAHUTE_GIT
Include 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_LIBUSB
Enable the use of libusb.
CAHUTE_PKGCONF
Enable installing pkgconf / pkg-config files.
CAHUTE_REPORT_URL
URL to the bug reporting guide included within the library and command-line utilities.
CAHUTE_SDL
Enable the use of SDL.
CAHUTE_UDEV
Enable building and installing the udev rule.
CAHUTE_UDEV_GROUP
Name 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
uucp
and the Archlinux user groups use it for serial devices, other distributions use other groups such asdialout
; see the following for more information:
Cahute feature switches (advanced)¶
The following variables can be used to toggle features within the CMake configuration on or off directly.
Warning
These switches are for advanced users, and should be indirectly defined through settings defined in Cahute-specific general settings.
CAHUTE_FEATURE_CLI_CAS
Enable and include the CaS command-line reference target.
By default, this is enabled if both
CAHUTE_CLI
andCAHUTE_CLI_EXPERIMENTAL
are enabled.CAHUTE_FEATURE_CLI_P7
Enable and include the p7 command line reference target.
By default, this is enabled if
CAHUTE_CLI
is enabled.CAHUTE_FEATURE_CLI_P7OS
Enable and include the p7os command line reference target.
By default, this is enabled if
CAHUTE_CLI
is enabled.CAHUTE_FEATURE_CLI_P7SCREEN
Enable and include the p7screen command line reference target.
By default, this is enabled if both
CAHUTE_CLI
andCAHUTE_SDL
are enabled.CAHUTE_FEATURE_CLI_XFER9860
Enable and include the xfer9860 command line reference target.
By default, this is enabled if
CAHUTE_CLI
is enabled.CAHUTE_FEATURE_LIB_HEADERS
Enable and include the library headers.
By default, this is enabled.
CAHUTE_FEATURE_LIB_PKGCONF
Enble and include the pkgconf / pkg-config files for the library.
By default, this is enabled if
CAHUTE_PKGCONF
is enabled.CAHUTE_FEATURE_LIB_STATIC
Enable and include the target to build the static library.
By default, this is enabled.
CAHUTE_FEATURE_UDEV
Enable and include the udev rules.
By default, this is enabled if
CAHUTE_UDEV
is enabled.