Navigation


Changes between Version 2 and Version 3 of Developers


Ignore:
Timestamp:
Jun 21, 2010, 11:49:35 AM (14 years ago)
Author:
Sebastien Decugis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Developers

    v2 v3  
    77Last but not least, please feel free to contribute to the website! Thank you.
    88
     9=== Developer's quick start ===
     10
     11Although you can find a lot of information on Mercurial and CMake on the Internet, the following are a few useful tips and tricks for starting development with freeDiameter.
     12 Clone the repository::
     13   The following command will fetch the latest source tree in a {{{freeDiameter}}} directory:
     14{{{
     15hg clone http://www.freediameter.net/hg/freeDiameter
     16}}}
     17
     18 Update your source tree::
     19   When you already have cloned the repository, you can retrieve updates from upstream with the command bellow:
     20{{{
     21hg pull -u
     22}}}
     23   If you have made local changes, Mercurial will attempt to merge everything by it-self, which is very convenient. If you need archiving your changes, you might have a look at [http://mercurial.selenic.com/wiki/MqExtension Mercurial Queues].
     24
     25 Build and test::
     26   !Files/Directories named {{{test.*}}} are ignored by Mercurial in the freeDiameter package ([source:.hgignore]). The following files can reside in your tree without interacting with the repository, and simplify your build-and-test process:
     27{{{
     28$ ls test.conf/
     29CMakeFlags   freeDiameter.conf  myextension.conf
     30}}}
     31{{{
     32$ cat test.rebuild
     33#!/bin/bash -x
     34rm -rf test.build
     35cp -Rs `pwd`/test.conf test.build
     36cd test.build
     37cmake `cat CMakeFlags` ..
     38make
     39}}}
     40   This allows you to save your configuration files in {{{test.conf}}} directory, and rebuild the whole tree from scratch in a different folder by simply running the {{{test.rebuild}}} script.
     41
     42 Useful CMake flags for development::
     43   The following flags are useful for configuring the source, for example in CMakeFlags file (see previous point).
     44{{{
     45-DCMAKE_BUILD_TYPE:STRING=Debug
     46}}}
     47   This impacts both the compiler's flags (including symbols for debug) and freeDiameter itself (allowing some slow tracing options such as {{{--dbg-func}}}).
     48{{{
     49-DSKIP_TESTS:BOOL=OFF
     50}}}
     51   Allows the compilation of the unit tests, called by running {{{make test}}}.
     52{{{
     53-DBUILD_TEST_APP:BOOL=ON
     54}}}
     55   Compile the test application extension [wiki:test_app.fdx].
     56
    957----