Common command options
Most kmpkg commands accept a group of common options that control cross-cutting aspects of the tool. Not all options affect every command. For example, a command that does not download any files will be unaffected by changing the downloads directory.
Options
--x-asset-sources=<config>
This section covers an experimental feature of kmpkg which may change or be removed at any time.
Specify the cache configuration for Asset Caching.
--binarysource=<config>
Add a source for Binary Caching.
This option can be specified multiple times; see the Binary Caching documentation for how multiple binary sources interact.
--x-buildtrees-root=<path>
This section covers an experimental feature of kmpkg which may change or be removed at any time.
Specifies the temporary path to store intermediate build files, such as objects or unpacked source code.
Defaults to buildtrees/ under the kmpkg root folder.
--classic
Forces classic mode even if a manifest file is detected.
--x-cmake-configure-debug=<debugger-pipe>[;semicolon;port;list]
This section covers an experimental feature of kmpkg which may change or be removed at any time.
Enables CMake's --debugger
within upstream build systems' CMakeLists.txt, such as within
kmpkg_cmake_configure.
The <debugger-pipe> value is passed as
--debugger-pipe on the CMake
command line.
If there is a semicolon-separated port list, the debugger is only used for ports in that list. Otherwise, it is used for all ports.
The triplet variable KMPKG_CMAKE_CONFIGURE_OPTIONS is used to pass the options to the internal CMake configure call.
As such it will not work for custom triplets overwriting KMPKG_CMAKE_CONFIGURE_OPTIONS.
Either manually pass the debugging options or append your options to KMPKG_CMAKE_CONFIGURE_OPTIONS instead.
Unlike --x-cmake-debug there will be no output indicating that the build is waiting for a debugger to connect. The output will simply stall at Configuring <triplet>.
Although all ports should be calling CMake inside of the portfile to obtain compile flags from the CMake toolchain. This command is mainly useful for ports actually using CMake as their build system.
--x-cmake-debug=<debugger-pipe>[;semicolon;port;list]
This section covers an experimental feature of kmpkg which may change or be removed at any time.
Enables CMake's --debugger while
running directly-invoked CMake scripts like triplet files (for example: x64-windows.cmake) or portfile.cmake files.
The <debugger-pipe> value is passed as
--debugger-pipe on the CMake
command line.
If there is a semicolon-separated port list, the debugger is only used for ports in that list. Otherwise, it is used for all ports.
Note: The debugger can be attached if Waiting for debugger client to connect... can be observed in the output of kmpkg and execution is halted until a debugger is connected.
--downloads-root=<path>
Specify where downloaded tools and source code archives should be kept.
Defaults to the KMPKG_DOWNLOADS environment variable. If that is unset, defaults to downloads/ under the kmpkg root folder.
--feature-flags=<flag1>,...
This variable can be set to a list of feature flags to opt-in to experimental behavior.
--host-triplet=<triplet>
Specify the host triplet.
Defaults to the KMPKG_DEFAULT_HOST_TRIPLET environment variable. If that is also unset, the value is deduced based on the host architecture and operating system.
--x-install-root=<path>
This section covers an experimental feature of kmpkg which may change or be removed at any time.
Specifies the path to lay out installed packages.
In Classic mode, defaults to installed/ under
the kmpkg root folder.
In Manifest mode, defaults to kmpkg_installed/
under the manifest folder.
--x-manifest-root=<path>
This section covers an experimental feature of kmpkg which may change or be removed at any time.
Specifies the directory containing kmpkg.json.
Defaults to searching upwards from the current working directory for the nearest
kmpkg.json.
--overlay-ports=<path>
Specifies a directory either an overlay port, or subdirectories that are themselves overlay-ports. If <path> is a directory containing a CONTROL or kmpkg.json, it is treated as an overlay port directory, and subdirectories will not be considered as additional overlay ports.
This option can be specified multiple times; ports will resolve to the first match.
--overlay-triplets=<path>
Specifies a directory containing overlay triplets.
This option can be specified multiple times to add multiple directories; triplets will resolve to the first match by name.
--x-packages-root=<path>
This section covers an experimental feature of kmpkg which may change or be removed at any time.
Specifies the temporary path to stage intermediate package files before final install.
Defaults to packages/ under the kmpkg root folder.
--triplet=<triplet>
Specify the target architecture triplet.
Defaults to the KMPKG_DEFAULT_TRIPLET environment variable. If that is unset, deduced based on the host architecture and operating system.
On Windows operating systems, the architecture is always deduced as x86 for legacy reasons.
All releases made in and after September 2023 will default to the host triplet on Windows instead of x86-windows.
--kmpkg-root=<path>
Specifies the kmpkg root folder.
Defaults to the directory containing the kmpkg program. The directory must be a valid kmpkg instance, such as a git clone of https://github.com/kumose/kmpkg. This option can be used to run a custom-built copy of the tool directly from the build folder.
Response Files (@<file>)
The kmpkg command line accepts text files containing newline-separated command line parameters.
The tool will act as though the items in the file were spliced into the command line in place of the @ reference. Response files cannot contain additional response files.