> For the complete documentation index, see [llms.txt](https://cppm.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cppm.gitbook.io/project/structure/cppm.toml.md).

# cppm.toml

cppm package config file

### package <a href="#package" id="package"></a>

```
[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]
```

### &#x20;cmake <a href="#cmake" id="cmake"></a>

> 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 <a href="#hunter" id="hunter"></a>

> hunter package can use

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

### compiler <a href="#compiler" id="compiler"></a>

> 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

```
[compiler]
clang   = {option = "..."} ## clang compiler options
gcc     = {option = "..."} ## gcc compiler options
msvc    = {option = "..."} ## visual studio compiler options
```

> can add compiler options by Debug and Release mode.

```
[compiler.debug]
clang   = {option = "..."} ## clang compiler options
gcc     = {option = ".."} ## gcc compiler options
msvc    = {option = "..."} ## visual studio compiler options
[compiler.release]
clang   = {option = "..."} ## clang compiler options
gcc     = {option = "..."} ## gcc compiler options
msvc    = {option = "..."} ## visual studio compiler options
```

### bin <a href="#bin" id="bin"></a>

> binary target define

```
[[bin]]
name   = "cppm" # bin name
source = ["src/.*"] # source files
# install = true # true and false (default => true) value is defulat can't install
[[bin]]
name   = "tbin" # bin name
source = ["src/.*"] # source files
install = false # 
```

### lib <a href="#lib" id="lib"></a>

> library target define&#x20;

```
[[lib]]
name   = "nlpo"   # lib name
type   = "static" # lib type , static or shared or header-only
source = ["src/.*"] # source files 
# install = true # true and false (default => true) # target install option
[[lib]]
name   = "exam"   # lib name
type   = "shared" # lib type , static or shared or header-only
source = ["src/.*"] # source files 
install = false # this target make install not working
```

### dependencies <a href="#dependencies" id="dependencies"></a>

> 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\
> &#x20;     public: library include in header and .cpp\
> &#x20;     private: libray include in .cpp\
> &#x20;     interface: library include in header

```
[dependencies]
cpptoml = {module = "cpptoml"} # cmake option is library name in cmake
Boost   = {module = " ${Boost_LIBRARIES}", components="system filesystem", no_module=true} 
fmt     = {module = "fmt::fmt" HUNTER} # search and install to use hunter package manager
nlpo    = "git" # cppkg package auto load other arguments, only need version
fmt     = "6.0.0" # cppkg package 
```
