Code Monkey home page Code Monkey logo

reasonablecmakeforcxx's Introduction

Reasonable CMake For C++ Demos


Build Status

reason.cmake is a CMake wrapper to enhance the build experience for C++.

Project 1

It shows how to integrate reason.cmake with legacy CMake modules, using add_subdirectory.

The module1 and module2 in the deps directory are written completely in native CMake code without any 'reason' integration.

Using legacy modules is risky and buggy because previous CMakeLists.txt might damage the whole build via setting global include directories and global compile options. Any failed module should be manually converted into reason build, and you will get the benefits from now on.

Project 2

It shows how to depend on an external reason build project. (Project 2 depends on Project 1)

By showing cmake where the Project 1 is installed via CMAKE_PREFIX_PATH variable, you can use find_package seamlessly.

Note:

  1. If you have already installed Project1 by package manager, aka. dpkg installed globally into /usr/ directory, the global path is already in CMAKE_PREFIX_PATH, and there's no extra work at all.
  2. The package built (i.e. deb package) does not include files in Project 1 or any other packages found via find_package, and therefore both packages are required at binary distribution.

Project 3

It shows how to rewrite Project 1 with reason.cmake.

Project 4

It shows how to integrate with header-only libraries, or named 'interface libraries' in CMake.

Project 5

It shows how multiple executables depend on common libraries are managed in reason.cmake.

reasonablecmakeforcxx's People

Contributors

adamcavendish avatar

Stargazers

 avatar  avatar  avatar

Watchers

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