Code Monkey home page Code Monkey logo

cpp-build-example's Introduction

Originally derived from https://github.com/sazzer/cpp-build-systems

Static libs by default to work on windows (only buck does not run on windows)

Linux

Install g++ (4.9 or higher)

Windows

Install vc build tools 2015.

Exec this before running the builds.

call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64

Tool-specific requirements

Go to their homepage and install the their respective dependencies.

mkdir meson-out && cd meson-out
meson .. --buildtype release
ninja
ninja test

# run
./executable
9k bfg9000-out
cd bfg9000-out
ninja
ninja test

# run
./executable
mkdir cmake-out && cd cmake-out
conan install .. --build missing
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja
ninja test

# run
./bin/executable
buck build //:executable
buck test //:shared_gtest

# run
./buck-out/gen/executable

Very similar to bazel with a few differences

Setup

Download the binary appropriate for your platform and add it to your exec PATH.

# print out your gn version (At the time of this writing, mine was 446079)
gn --version

# import the cross-platform build config/toolchain template
git clone --depth 1 --single-branch -b master https://github.com/dyu/gn-build build

Linux

gn gen gn-out --args='gcc_cc="gcc" gcc_cxx="g++" is_debug=false is_clang=false is_official_build=true'

Windows

gn gen gn-out --args="visual_studio_path=\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\" visual_studio_version=\"2015\" is_debug=false is_clang=false is_official_build=true"
ninja -C gn-out

# run
./gn-out/executable

cpp-build-example's People

Contributors

dyu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

84506232

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.