cppm.toml

cppm package config file

package

[package]
name = "example"        # user package name
version = "1.0.0"       # user package version
description = "example" # package description
standard = "17"         # c++ standard version, other value = [11,14,17(default),20]

cmake

ccache auto use

[cmake]
version  = "..."    # cmake minimum version, default => 3.6
include = ["cmake/cppm_install.cmake","..."] # include cmake files
option   = "..."    # cmake options, 'cppm build' use this option

hunter

hunter package can use

[hunter]
url  = "..." # default url: https://github.com/ruslo/hunter/archive/v0.23.89.tar.gz
sha1 =  "..." # default sha1: a370290a8b32987755a36d64807bf8c7f5b61730

compiler

base compiler option [compiler.debug] clang = {option = "-Wall -fPIC -O0 -g"} gcc = {option = "-Wall -fPIC -O0 -g"} msvc = {option = "/MP /MDd /Zi /Ob0 /Od /RT1"} [compiler.release] clang = {option = "-fPIC -O3 -DNDEBUG"} gcc = {option = "-fPIC -O3 -DNDEBUG"} msvc = {option = "/MP /MD /Zi /O2 /DNDEBUG"} If no compiler option is available, add the default option to the Base option. clang = {option = ""} gcc = {option = ""} msvc = {option = ""}

Add option by compiler

can add compiler options by Debug and Release mode.

bin

binary target define

lib

library target define

dependencies

May if you use cppkg only need version argument add thirdparty library dependencies (0) = {module = (1), version = (2), components = (3), hunter=(4), no_module=(5) lnk_type=(6)} (0): package name (1): library name in cmake, Need (2): library version, default(latest) latest version order: n.n.n.n > git (3): library components (4): dependency use hunter package (5): if module name is cmake variable(${Example_LIBRARIES}), use this option, default(false) (6): cmake library link type , public(default) or private or interface public: library include in header and .cpp private: libray include in .cpp interface: library include in header

Last updated

Was this helpful?