Code Monkey home page Code Monkey logo

quick-cmake's Introduction

Quick-Cmake

Project File Generator

CMake on a single platform CMake

quick-cmake is used to generate modules for cmake projects. This involves generating simple filesystem structures for executables or libraries, that can be used in isolation, or easily linked to a greater project.

Usage

$ quick-cmake [options] <path> [<name>]

path is the location at which the new cmake project is created.

name is the name of the project (and default target) that will be generated. if name is not included, it will be set as the name of the directory at path.

basic-usage: executables

$ quick-cmake "project"

Generates a cmake executable in the project/ directory, creating the dir if it does not exist. It will not overwrite an existing Cmake project.

The above command will result in this directory structure:

project
|
├── CMakeLists.txt
└── main.cpp

0 directories, 2 files

basic-usage: libraries

$ quick-cmake -l "project"

generates a cmake library at project/. It will have the following structure:

project
|
├── CMakeLists.txt
├── include
│   └── project
│       └── project.h
└── src
    └── project.cpp

3 directories, 3 files

This library can then be easily linked to a parent project by simply calling

add_subdirectory(project)
target_link_libaries(parent PUBLIC project)

the interesting directory structure of the include/project/project.h allows a user to use #include <project/project.h> for any target that the library is linked to. convenient!

Options

-l: create's a cmake library module instead of an executable.

--fmt <format>: set's the format of the created project. This allows for quick generation of "templated" libraries.

available <format> arguments are:

  • Qt - Qt widgets application
  • Qml - Qml application
  • Catch - Catch2 test executable (this will override the "library" option)

quick-cmake's People

Contributors

brynnjolf avatar

Watchers

 avatar

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.