Linux | Windows | MacOS |
---|---|---|
- c++ compiler (c++17)
- CMake (minimum 3.12)
- Git
- Ccache (optional)
My native language is not English.
Since I used a translator, please let me know if you have any problems with grammar.
This project was inspired by Rust's Cargo.
Cppm is a cross platform C++ project manager
So the configuration of the configuration file is almost similar to Rust's Cargo.toml.
Using cppm, you can easily create a cross-platform c ++ project.
Projects made with cppm only need c ++ compiler, cmake and git.
Projects written in cppm automatically install dependencies.
Not many libraries are supported by the cppkg yet. But cppkg package make easy
So cppm made the package of the Hunter Package Manager available.
If there is a library you want to add, please issue a pull request to the Cppkg repository
Cppm auto detect vcpkg toolchain.
# cppm project config file
[package]
name = "cppm"
version = "0.0.10"
description = "c++ cmake maker use to toml like Cargo"
git = "https://github.com/injae/cppm.git"
#vcpkg =true # vcpkg auto detect flag, but not recommended option
[cmake]
include = ["cmake/cppm_install.cmake"]
[lib]
name = "cppm-core"
source = ["src/core/.*", "src/util/.*", "src/cppkg/.*"]
[[bin]]
name = "cppm"
source = ["src/cmake/.*","src/option/.*", "src/util/.*", "src/main.cpp"]
[[test]]
name = "cppm-test-check"
source = ["tests/test.cpp"]
[[example]]
name = "cppm-core-load"
source = ["examples/example.cpp"]
[workspace]
member = ["libs/nlpo", "libs/tomlpp"]
[dependencies]
fmt = "6.2.0"
hashpp = "git"
range-v3 = "git"
[dev-dependencies]
Catch2 = "2.9.1"
#[target.x64-unix.dependencies]
#[target.x64-unix.dev-dependencies]
#[target.x64-windows.dependencies]
#[target.windows.dev-dependencies]
$ cd {package root}/thirdparty
$ cppm cppkg init -U "https://github.com/fmtlib/fmt/releases/download/6.2.0/fmt-6.2.0.zip" fmt
# fmt/6.2.0/cppkg.toml
[fmt]
version = "6.2.0"
description = ""
module = "fmt::fmt"
url="https://github.com/fmtlib/fmt/releases/download/6.2.0/fmt-6.2.0.zip"
$ cd {package root}/thirdparty
$ cppm cppkg init -U "https://github.com/fmtlib/fmt.git" fmt
# fmt/git/cppkg.toml
[fmt]
version = "git"
description = ""
module = "fmt::fmt"
git="https://github.com/fmtlib/fmt.git"
flags="-DFMT_DOC=OFF -DFMT_TEST=OFF -DFMT_FUZZ=OFF" # (optional) for cmake build fast flags
# install c++17 compiler, cmake and git
git clone --recurse-submodules https://github.com/injae/cppm.git
cd cppm
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
cd build
cmake --build . --config Release
cd Release
./cppm build install
# Adding to cppm path
export PATH="$HOME/.cppm/bin:$PATH"
# AppleClang not working (can't use filesystem and optional)
brew install llvm cmake
# Adding to llvm clang env
# export CC=#llvm clang path
# export CXX=#llvm clang++ path
git clone --recurse-submodules https://github.com/injae/cppm.git
cd cppm
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DUSE_CPPM_PATH=ON .
cd build
cmake --build . --config Release
cd Release
./cppm build install
# Adding to cppm path
export PATH="$HOME/.cppm/bin:$PATH"
# need visual studio , git , cmake
# scoop install git cmake
git clone --recurse-submodules https://github.com/injae/cppm.git
cd cppm
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DUSE_CPPM_PATH=ON .
cd build
cmake --build . --config Release --target install --target cppm_link
# Add System Path %USERPROFILE%\.cppm\bin
- easy configure file (cppm.toml)
- generate build command (cppm build {options})
- cmake dependencies auto installer (cppkg)
- none cppm base project build (cppm build) (with cppm-toolchain) command
- easy cppkg file generator (cppm cppkg init)
- auto add CMake project uninstall target (cppm build uninstall) (with cppm-toolchain)
- no sudo, package local install path (~/.cppm/)
- unit test option (cppm test)
- Cppkg package search (cppm search)
- cmake project initialize (cppm init {options} {name})
- cppkg repository update (cppm cppkg update)
- hunter package dependency available
- auto detect vcpkg
- can use hunter package manager
- sub project option (cppm.toml [workspace])