Giter Site home page Giter Site logo

injae / cppm Goto Github PK

View Code? Open in Web Editor NEW
39.0 8.0 3.0 60.16 MB

c++ package manager only use CMake

Home Page: https://injae.github.io/cppm

CMake 15.60% C++ 83.63% C 0.19% Dockerfile 0.59%
cmake cppm package-manager cpp cplusplus linux windows osx hunter rust-cargo

cppm's Introduction

Linux Windows MacOS
Linux Windows MacOS

Dependencies

  • 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.

Easy Config file

# 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]

Easy to make Unregistered Package Add

$ 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

Installation

Linux

# 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"

Macos

# 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"

Windows

# 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

Features

  • 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])

Document

cppm's People

Contributors

injae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cppm's Issues

Where should I begin in order to use this?

I have built and installed cppm on windows. However, though I had run "cppm init", nothing was executed.
In case of, "cppm cppkg search json", the program was crashed.
Where should I begin in order to use this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.