Giter VIP home page Giter VIP logo

cmake_cpp_boilerplate's Introduction

Minimal cmake boilerplate

Install clangd.

Linux

Configure and build

mkdir build folder. cd into build folder and run

cmake ..
make

Run

To run program

cd bin
./main

Generate compile_commands.json

compile_commands.json will be created in build directory. Symlink it (or simply copy it) to the root directory. To symlink it, cd to the root and

ln -s build/compile_commands.json.

Windows

We use bash environment with native CMake and Ninja. We build and compile with MSBuild and MSVC toolchain.

Configure

cd build/ && cmake ..

Build

cd build && MSBuild.exe -target:Build /property:Configuration=Release .\boilerplate.sln

Run

cd bin && main.exe

Generate compile_commands.json

cd ninja && cmake -G"Ninja" .. && mv compile_commands.json ..

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.