Giter Site home page Giter Site logo

offirmo-graveyard / cvm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tweakoz/cvm

0.0 2.0 0.0 403 KB

C/C++ Version Manager. A tool for automatically managing your C/C++ dependencies : libs, tools and even the compiler, automatically installed with specific versions and modes (debug/release). Inspired from those great ruby tools : RVM (Ruby Version Manager) and "bundler".

Shell 95.49% Groff 4.51%

cvm's Introduction

C/C++ Version Manager

Project status license

CVM was an experiment and is no longer into active development. You can browse code and pick any ideas you want, or give a try to other attempts : biicode, cpm, pacm, [insert google "C++ package manager" here]...

C/C++ Version Manager. A tool for automatically managing your C/C++ dependencies :

  • compiler
  • libraries
  • misceanellous build tools Each component is automatically installed with specific versions and modes (debug/release).

Inspired from the great RVM (Ruby Version Manager) : https://rvm.io// and the Bundler tool : http://gembundler.com/gemfile.html

Introduction

The user story

(Note : the slideshow is more readable : http://fr.slideshare.net/Offirmo/introducing-cvm)

Right now I'm writing a C++ app. It is ready to be deployed to the production server. Unfortunately...

First, I use libraries that need to be installed as well. Ubuntu has packages for most of them, but they are outdated in this case. So I need to install them from source, latest version...

...in fact no ! Not the latest version but the same exact version my app is currently using. Which version was it already ?

Then one of the libs needs another lib with another specific version requirement. So I not only need to install it as well, but I must also pass its emplacment to the other lib, or it would try to use the system one instead...

One of the lib needs the cmake tool. Of course, the default system version is too old. So I need to download and recompile cmake...

Then cmake, when compiling the lib, detects the system libraries and not the recent one I just installed... Aaaaaaaaaaaargh !!!

(...and manx more problems for a lot of libs and tools...)

Oh, and I'm also planning to use latest gcc 4.7 to play with C++ 2011. Or maxbe cjang. Just thinking of the future pain of recompiling everything nearly depress me...

One more thing : I want to try the GNU standard lib "debug mode" which require recompilation of... just every lib !

You got it. It's not only tiring to manually install and recompile everything again and again for each server install, it's just impossible at some level.

So I thought to automatize it.

I used to do some rails development, and I had a tool called "Ruby Version Manager" (RVM) which, together with an util called "Bundler" was doing exactly that for Ruby.

A quick look on the internet showed no existing tool/competitor --> Let's do this !!

Installation

Requirements

cvm is in pure shell. (Would have been a heresy to use python ;)

Installation

Get a copy of the files and set your path to point to the "bin" dir.

Check if it works by typing : (after relaunching your shell for the PATH alteration to take effect of course !)

cvm

It should display some help. If it does not, check that

Usage

write a "compfile" (component file) like this one, for a Wt app :

## C++ VM component set definition
## see https://github.com/Offirmo/cvm
##
## Thanks to this file and the C++VM tool,
## all exact dependencies are installed.

c++vm_minimum_required_version 1.0.1

# if no particular gcc version is required
# let's use the system one
require compiler.gcc,   version : system
require lib.std,        version : system

require lib.UnitTest++, version : 1.4+

# need a recent version
require lib.Boost,      version : 1.51+

# sqlite is an optional dependency of Wt. We want a decent version.
require lib.sqlite,      version : 3.7+
# we worked with an exact version of Wt
require lib.Wt,         version : 2.3.2, require : lib.sqlite

then type :

`cvm new wtapp01`
`cvm set_compfile <your compfile>`
`cvm upgrade`

You may now build your app, wrapped by cvm to make the new libs available.

Example with make : cvm_exec make

Example with cmake :

`cvm_exec cmake -Wdev ../myapp`
`cvm_exec make`
`cm_exec <call to your freshly built app>`

An interesting command is : cvm status

Currently available components

Libs

  • Boost
  • bzip2
  • graphicmagic
  • python-dev
  • sqlite
  • UnitTest++
  • Wt
  • zlib

Tools

  • autotools
  • cmake
  • git

Coming soon

  • svn
  • mysql
  • postgresql
  • python
  • python_setuptools

TODO

  • Better doc ;)

cvm's People

Contributors

offirmo avatar

Watchers

 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.