mardi, juin 25, 2013

lundi, juin 24, 2013

CMake : Compiling for different hardware architectures


  • GCC (on Linux) or Sun Studio
Use compile option -m32 (force 32-bit build), -m64 (force 64-bit build)
  • Windows, Visual Studio generator
Use cmake -G "Visual Studio 9 2008 Win64" path_to_source_dir to compile 64-bit (x64)
  • Mac OS X
Use CMAKE_OSX_ARCHITECTURES CMake variable. You can set more than a single architecture to create universal binary, e.g
 cmake "-DCMAKE_OSX_ARCHITECTURES=i386;pcc" path_to_source 
will build universal binary with 32-bit intel / 32-bit powerpc.
cmake "-DCMAKE_OSX_ARCHITECTURES=x86_64" path_to_source 
will create x86_64 binary.

  • NMake Makefiles
    for 64 bits use the right SetEnv ou vsvarsall.bat command line and then
    cmake path to source -G "NMake Makefiles"
    nmake

mardi, juin 18, 2013

Git basic


Creer une archive zip à partir d'un tag ou d'une branche

git archive --format zip --prefix=root_folder_name/ --output /full/path/to/zipfile.zip TAG_NAME|BRANCH_NAME

Exemple avec projet hemeshgui pour creer une archive de release d'une v0.3-alpha
cd hemeshgui
git archive --format zip --prefix=hemeshgui/ --output ../hemeshgui-v0.3-alpha.zip v0.3-alpha
---------------------------------