Git Product home page Git Product logo

enbodied's Introduction

enbodied

This is intended to be some kind of SDL project playing with n-body systems, but right now is an almost empty project (using cmake, C++11, and SDL2) that can be used as a template for others.

Building

This is my first time playing with cmake. The information that is used to compile the project is specified in CMakeLists.txt, the source is in src/, and the executable will be placed in bin/---this directory will be created in the process.

Steps:

  1. mkdir build to create a build directory for out-of-source building (i.e. prevent cluttering the rest of the project with cmake spam and object files); this directory can be removed at any time, along with the bin/ directory, to clean the project. This directory can be called something else, but build/ is standard.

  2. cd build/ to move to the build directory.

  3. cmake .. to run cmake on the directory above but in this directory. This will create a number of files including a Makefile in this directory, and create the bin/ directory.

    • At this point running cmake .. again will additionally create a symlink from the compile_commands.json database to the src/ directory. This is useful for tools such as YouCompleteMe which can use it to calculate the flags needed to test compile files. Unfortunately this process does not work on the first invocation of cmake .., as it requires the file to already be present at a stage before it is originally generated, but as it uses a symlink it will remain updated. Note that this second invocation will in fact be faster than the first, and that the compile_commands.json file contains absolute paths meaning that it can be copied but cannot be used on different computers.
  4. make in the build/ directory will now compile the project and output the binary executable into the bin/ directory. make clean will remove this executable, but will not delete the directory or any of the cmake files in the build/ directory.

enbodied's People

Contributors

petraoleum avatar

Watchers

James Cloos 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.