Some environment variables have special meaning for luchs. In general, they are prefixed with
LUCHS_
. However, some environment-variables that are used are not specifically prefixed at all.
The luchs/root-preamble.cmake
file (for which you can find an example in the examples
directory) looks at several places for luchs. It first checks for the existance of some
environment variables and only if these are not defined will look for a directory .luchs
at the top-level directory of the software project that is currently getting built or will try
to fetch it from the default Git server.
The environment variables which are checked first, are the following:
Determines the path to the directory on the filesystem where luchs is located. If found, no other environment variable will be checked for finding luchs.
Determines the path to the Git repository (server) from which luchs shall be cloned. If found, the following environment variable will still be checked as well.
Determines the tag, branch or commit hash that shall be checked out from the Git repository
(server). This variable is only considered if luchs shall be cloned from a Git repository
(whether from the one determined by LUCHS_FRAMEWORK_GIT_REPOSITORY
or from the default one).
If it is not found, the default branch (main
) will be cloned instead.
Similar to finding luchs itself, finding a common dependency also first considers similar named environment variables before trying to load it from some fixed location or cloning it from some Git repository.
Determines the path to the directory on the filesystem where dependency <name>
is located. If
found, no other environment variable will be checked for finding dependency <name>
.
Determines the path to the Git repository (server) from which dependency <name>
shall be
cloned. If found, the following environment variable will still be checked as well.
Determines the tag, branch or commit hash that shall be checked out from the Git repository
(server). This variable is only considered if dependency <name>
shall be cloned from a Git
repository (whether from the one determined by LUCHS_DEPENDENCY_<name>_GIT_REPOSITORY
or
from the default one). If it is not found, the default branch will be cloned instead.
Some other environment variables are also considered by luchs. Often, these should be set on CI systems by the build job.
The environment variable CURRENT_BUILD_NUMBER
is supposed to carry a non-negative integer and
will be interpreted as a build number. It will be treated as the forth component of a
semver version number, in particular for (Windows) resource files. (Note,
however, that it is not used as value for CMake's PROJECT_VERSION_TWEAK
variable!)
If that environment variable does not exist a simple 0
will be assumed instead and used
internally.
Note: Normally, this environment variable should only be set on CI systems by the build job.