tag mySimpleApplication-1.0 done

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@750 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2007-10-31 14:13:07 +00:00
commit a0fe4f8a45
5 changed files with 541 additions and 0 deletions

View file

@ -0,0 +1,72 @@
######################################################################################
### 0) Include the install configuration file where are defined the main variables
######################################################################################
INCLUDE(${CMAKE_SOURCE_DIR}/install.cmake)
######################################################################################
######################################################################################
### 1) Set your application properties
######################################################################################
# Define your project name
PROJECT(mySimpleApplication)
######################################################################################
######################################################################################
### 2) Include the sources
######################################################################################
INCLUDE_DIRECTORIES(${PARADISEO_EO_SRC_DIR}/src
${PARADISEO_MO_SRC_DIR}/src
${PARADISEO_MOEO_SRC_DIR}/src
${PARADISEO_PEO_SRC_DIR}/src)
######################################################################################
######################################################################################
### 3) Specify where CMake can find the libraries
######################################################################################
# Link with the EO library directory, only if you need it
LINK_DIRECTORIES(${PARADISEO_EO_BIN_DIR}/lib)
# Link with the MOEO library directory, only if you need it
LINK_DIRECTORIES(${PARADISEO_MOEO_BIN_DIR}/lib)
# Link with the PEO library directory, only if you need it
LINK_DIRECTORIES(${PARADISEO_PEO_BIN_DIR}/lib)
######################################################################################
######################################################################################
### 4) Define your target: just an executable here
######################################################################################
ADD_EXECUTABLE(mySimpleApplication mySimpleApplication.cpp)
######################################################################################
######################################################################################
### 5) Link the librairies for your executable
######################################################################################
# Only if you need to link libraries
TARGET_LINK_LIBRARIES(mySimpleApplication eo eoutils)
######################################################################################

View file

@ -0,0 +1,82 @@
==========================================================================================
INFORMATION
==========================================================================================
PARADISEO (PARallel and DIStributed Evolving Objects) is a white-box object-oriented
framework dedicated to the flexible design of metaheursitics.
This package is especially designed to help anyone who uses ParadisEO to build his
own application.
==========================================================================================
RELEASE
==========================================================================================
The current release of the "mySimpleApplication" package is 1.0.
==========================================================================================
WEBSITE
==========================================================================================
Please visit our website at http://paradiseo.gforge.inria.fr.
==========================================================================================
BUGS
==========================================================================================
You can find the ParadisEO's bug tracker at:
http://gforge.inria.fr/tracker/?atid=663&group_id=145&func=browse
==========================================================================================
CONTACT
==========================================================================================
For any question or for help, please write us at: paradiseo-help@lists.gforge.inria.fr.
==========================================================================================
DEPENDENCIES
==========================================================================================
ParadisEO uses EO, a templates-based, ANSI-C++ compliant evolutionary computation library.
It contains classes for almost any kind of evolutionary computation you might come up to - at
least for the ones we could think of.
EO Website:
http://eodev.sourceforge.net/.
EO is distributed under the GNU Lesser General Public License:
http://www.gnu.org/copyleft/lesser.html
==========================================================================================
LICENSE
==========================================================================================
ParadisEO is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited liability.
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.

View file

@ -0,0 +1,320 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
//
// 2005-12-01 ksc Initial release
//
-->
<html>
<head>
<title>Build My Simple Application</title>
<link rel='stylesheet' title="A Bit Modern" href='http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/inria.css' type='text/css' />
<script type="text/javascript">
<!-- //
browser_type = navigator.appName;
if (browser_type == "Microsoft Internet Explorer") {
document.write("<link href='http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/inria-ie.css' rel='stylesheet' type='text/css' />");
}
//-->
</script>
</head>
<body>
<!-- Logo -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><a href="/"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/logo.png" border="0" alt="" width="198" height="52" /></a></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="left" bgcolor="#E0E0E0" width="9"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/tabs/topleft.png" height="9" width="9" alt="" /></td>
<td bgcolor="#E0E0E0" width="30"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/clear.png" width="30" height="1" alt="" /></td>
<td align="right" bgcolor="#E0E0E0" width="9"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/tabs/topright.png" height="9" width="9" alt="" /></td>
</tr>
<!-- Outer body row -->
<tr>
<td bgcolor="#E0E0E0"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/clear.png" width="10" height="1" alt="" /></td>
<td valign="top" width="100%" bgcolor="#E0E0E0" >
<!-- Inner Tabs / Shell -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="left" bgcolor="#ffffff" width="9"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/tabs/topleft-inner.png" height="9" width="9" alt="" /></td>
<td bgcolor="#ffffff"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/clear.png" width="1" height="1" alt="" /></td>
<td align="right" bgcolor="#ffffff" width="9"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/tabs/topright-inner.png" height="9" width="9" alt="" /></td>
</tr>
<tr>
<td bgcolor="#ffffff"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/clear.png" width="10" height="1" alt="" /></td>
<td valign="top" width="100%" bgcolor="white">
<!-- -->
<!-- BODY -->
<!-- -->
<div id='head'>
<div id='logo'><img src="../img/paradisEO_small.png"/></div>
<div id='page-title'>Paradiseo</div>
<!--div id='page-subtitle'>BuildMySimpleApplication</div-->
<div id='page-actions'><ul><li class='browse'><a accesskey='' class='selflink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.BuildMySimpleApplication'>View</a>
</li><li class='edit'><a accesskey='e' rel='nofollow' class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.BuildMySimpleApplication?action=edit'>Edit</a>
</li><li class='diff'><a accesskey='h' rel='nofollow' class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.BuildMySimpleApplication?action=diff'>History</a>
</li><li class='upload'><a accesskey='ak_attach' rel='nofollow' class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.BuildMySimpleApplication?action=upload'>Attach</a>
</li><li class='print'><a accesskey='' rel='nofollow' class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.BuildMySimpleApplication?action=print'>Print</a>
</li></ul>
</div>
</div>
<div id='content'>
<div id='col-left'>
<!--PageLeftFmt-->
<div id='sidebar'><p class='sidehead'> <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Home'>Home</a></strong>
</p><ul><li> <a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.News'>&gt; News</a>
</li><li> <a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.AssociatedEvents'>&gt; Associated events</a>
</li></ul><p class='vspace sidehead'> <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Documentation'>Documentation</a></strong>
</p><ul><li><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.API'>&gt; API doc</a>
</li><li><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.DesignConcepts'>&gt; Design concepts</a>
</li><li><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Tutorials'>&gt; Tutorials</a>
</li><li><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.FAQ'>&gt; FAQ</a>
</li><li><a class='urllink' href='http://gforge.inria.fr/forum/?group_id=145' rel='nofollow'>&gt; Forum</a>
</li><li><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.MailingList'>&gt; Mailing lists</a>
</li><li><a class='urllink' href='http://gforge.inria.fr/tracker/?atid=663&amp;group_id=145&amp;func=browse' rel='nofollow'>&gt; Bug tracking</a>
</li></ul><p class='vspace sidehead'> <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Download'>Download</a></strong>
</p>
<p class='vspace sidehead'> <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Contributions.Index'>Contribution repository</a></strong>
</p>
<p class='vspace sidehead'> <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Publications'>Publi &amp; appli</a></strong>
</p>
<p class='vspace sidehead'> <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Team'>Team</a></strong>
</p>
<p class='vspace'><span style='display: none;'> <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Applications'>Applications</a></strong> </span>
<br /><span style='display: none;'> sidehead <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Features'>Features</a></strong> </span>
<br /><span style='display: none;'> sidehead <strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.License'>License</a></strong> </span>
<br /><span style='display: none;'> sidehead<strong><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Contact'>Contact</a></strong> </span>
</p>
<p class='vspace' style='text-align: right;'> <span style='font-size:83%'><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Site.SideBar?action=edit'>edit</a></span>
</p>
</div>
<!--/PageLeftFmt-->
</div>
<div id='col-right'>
<!--PageText-->
<div id='wikitext'>
<h1><big>Build a simple application using <span class='wikiword'>ParadisEO</span></big></h1>
<h2><big>Introduction</big></h2>
<p>There are many steps required to produce a <span class='wikiword'>ParadisEO</span>-based program. As <span class='wikiword'>ParadisEO</span> is a C++ library, any "main" file containing the basic instructions of your program is expected to be first <strong>compiled</strong>. The way the program should be compiled depends on the environment. For example on Unix platforms, some "Makefiles" allow an automatic compilation of a C++ source file and the generation of the "makefiles" themselves is achieved by <a class='urllink' href='http://www.cmake.org/' rel='nofollow'>CMake</a>. <span class='wikiword'>CMake</span> manages the software compilation process and it can be used with several generators:
</p>
<div class='vspace'></div><dl><dd><ul><li><strong><span style='color: blue;'>Visual Studio 8 2005 </span></strong> (Win32 + Win64) projects
</li><li><strong><span style='color: blue;'>Visual Studio 7 .NET 2003 </span></strong> projects
</li><li><strong><span style='color: blue;'>Visual Studio 7 and 6</span></strong> projects
</li><li><strong><span style='color: blue;'><span class='wikiword'>NMake</span></span></strong> Makefiles
</li><li><strong><span style='color: blue;'><span class='wikiword'>MinGW</span></span></strong> Makefiles
</li><li><strong><span style='color: blue;'>Borland</span></strong> Makefiles
</li><li><strong><span style='color: blue;'><span class='wikiword'>KDevelop</span></span></strong> projects
</li><li><strong><span style='color: blue;'>Unix</span></strong> Makefiles
</li><li><strong><span style='color: blue;'>Xcode</span></strong> Projects
</li><li><strong><span style='color: blue;'>MSYS</span></strong> Makefiles
</li><li><strong><span style='color: blue;'><span class='wikiword'>WMake</span></span></strong> Makefiles
</li></ul></dd></dl><p class='vspace'>A package containing all the required files has been developped for any user who wants to build his own application easily. In this case, we suppose this application to be only made of a "main.cpp" file (no specific components). The content of the package is pre-filled so that a user has just to paste his algorithm in the cpp-file and change one variable.
</p>
<div class='vspace'></div><h2><big>"mySimpleApplication" package's content</big></h2>
<p>The package contains the following files:
</p>
<div class='vspace'></div><ul><li><strong>install.cmake</strong>: Contains variables that specify where <span class='wikiword'>ParadisEO</span> has been installed.
</li><li><strong>mySimpleApplication.cpp</strong> : A C++ main containing the algorithm
</li><li><strong>README</strong>: Contains basic information
</li><li><strong><span class='wikiword'>CMakeLists</span>.txt</strong>: The only <span class='wikiword'>CMake</span> configuration file
</li><li><strong>index.html</strong>: The content of the current web-page
</li></ul><p class='vspace'><span style='color: red;'><strong>It can be downloaded from </span><a class='wikilink' href='http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.Here'>here</a></strong>.
</p>
<div class='vspace'></div><h2><big>Adapt the package</big></h2>
<p>Here, we give the steps to custom the package for any application.
</p>
<p class='vspace'><em>Note: For further help about <span class='wikiword'>CMake</span>, see the <a class='urllink' href='http://www.cmake.org/HTML/Documentation.html' rel='nofollow'>CMake documentation</a></em>.
</p>
<p class='vspace'><br />
</p><div style='color: black; font-size: 8pt; background-color: #99CCFF;' >
<h3><ins>Step 1 : Develop your algorithm</ins></h3>
</div>
<p>You just have to edit the <strong><em>mySimpleApplication.cpp</em></strong> and implement your code.
</p>
<div class='vspace'></div><div style='color: black; font-size: 8pt; background-color: #CCFFCC;' >
<ol><li>include &lt;iostream&gt;
</li></ol><p>/// #include &lt; file &gt;
</p>
<p class='vspace'>/// Use functions from namespace std ?
<br />using namespace std;
</p>
<p class='vspace'>int main(int argc, char **argv)
<br />{
</p><pre> /// Your code ...
cout &lt;&lt; "I'm a simple application linked with <span class='wikiword'>ParadisEO</span>" &lt;&lt; endl ;
return 1;
</pre><p class='vspace'>}'
</p></div>
<p class='vspace'><br />
</p><div style='color: black; font-size: 8pt; background-color: #99CCFF;' >
<h3><ins>Step 2 : Change the <span class='wikiword'>ParadisEO</span>-path in "install.cmake"</ins></h3>
</div>
<p class='vspace'>When <span class='wikiword'>ParadisEO</span> has been configured in the standard way (the global package containing all the modules has been installed), just replace "myDirectory" by the absolute path to <span class='wikiword'>ParadisEO</span> the section n°1:
</p>
<div class='vspace'></div><div style='color: black; font-size: 8pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>SET(PARADISEO_DIR <strong>"myDirectory"</strong> CACHE PATH "<span class='wikiword'>ParadisEO</span> directory" FORCE)
</div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'>... replaced (for example) by:
</p>
<div class='vspace'></div><div style='color: black; font-size: 8pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>SET(PARADISEO_DIR <strong>"/home/john/paradiseo-ix86-1.0"</strong> CACHE PATH "<span class='wikiword'>ParadisEO</span> directory" FORCE)
</div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'><span style='color: green;'><strong>If you have simply installed <span class='wikiword'>ParadisEO</span> using the provided install script, go to the next step.</strong></span>
</p>
<p class='vspace'><strong><em>Advanced configuration</em></strong>: <br />
<br />If the modules of <span class='wikiword'>ParadisEO</span> have been deployed separately, the path to each module (EO, MO, MOEO and PEO) can also be specified. Here's an example for EO, <em>PARADISEO_EO_SRC_DIR</em> refers to the EO sources, <em>PARADISEO_EO_BIN_DIR</em> is the directory where EO has been compiled.
</p>
<div class='vspace'></div><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>SET(PARADISEO_EO_SRC_DIR "${PARADISEO_DIR}/paradiseo-eo" CACHE PATH
<dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><div class='indent'>"<span class='wikiword'>ParadisEO</span>-EO source directory" FORCE)
</div></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></div><div class='indent'>SET(PARADISEO_EO_BIN_DIR "${PARADISEO_DIR/paradiseo-eo/build" CACHE PATH
<dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><div class='indent'>"<span class='wikiword'>ParadisEO</span>-EO binary directory" FORCE)
</div></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'>A third section is added to automatically set the flags required when using the package under Visual Studio 8. It has no effect for all the other cases.
</p>
<p class='vspace'><br />
</p><div style='color: black; font-size: 8pt; background-color: #99CCFF;' >
<h3><ins>Step 3 : Adapt the <span class='wikiword'>CMakeLists</span>.txt</ins></h3>
</div>
<div class='vspace'></div><ul><li>Give your project name in the section n°1 :
</li></ul><div class='vspace'></div><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>PROJECT(mySimpleApplication)
</div></dd></dl></dd></dl></dd></dl></div>
<div class='vspace'></div><ul><li>Specify the source directories to include
</li></ul><div class='vspace'></div><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>INCLUDE_DIRECTORIES(${PARADISEO_EO_SRC_DIR}/src
<dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><div class='indent'>${PARADISEO_MO_SRC_DIR}/src
</div><div class='indent'>${PARADISEO_MOEO_SRC_DIR}/src
</div><div class='indent'>${PARADISEO_PEO_SRC_DIR}/src)
</div></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'>For example, if you only use <span class='wikiword'>ParadisEO</span>-EO sources, just set:
</p><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>INCLUDE_DIRECTORIES(${PARADISEO_EO_SRC_DIR}/src
</div></dd></dl></dd></dl></dd></dl></div>
<div class='vspace'></div><ul><li>Specify where are the libraries (for the linker)
</li></ul><div class='vspace'></div><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>LINK_DIRECTORIES(${PARADISEO_EO_BIN_DIR}/lib)
</div><div class='indent'>LINK_DIRECTORIES(${PARADISEO_MOEO_BIN_DIR}/lib)
</div><div class='indent'>LINK_DIRECTORIES(${PARADISEO_PEO_BIN_DIR}/lib)
</div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'>For example, if you only use <span class='wikiword'>ParadisEO</span>-EO and <span class='wikiword'>ParadisEO</span>-MOEO libraries, just set:
</p><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>LINK_DIRECTORIES(${PARADISEO_EO_BIN_DIR}/lib)
</div><div class='indent'>LINK_DIRECTORIES(${PARADISEO_MOEO_BIN_DIR}/lib)
</div></dd></dl></dd></dl></dd></dl></div>
<div class='vspace'></div><ul><li>Define your executable: give the executable name + the name of the cpp file
</li></ul><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>ADD_EXECUTABLE(mySimpleApplication mySimpleApplication.cpp)
</div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'>Important: If you change the name of the cpp file "mySimpleApplication.cpp", don't forget to give the right name for the ADD_EXECUTABLE command.
</p>
<div class='vspace'></div><ul><li>Specify the libraries that should be linked to build your executable (for example, for Unix Makefiles, the option used to give the linked libraries is "-L &lt; a path to the lib&gt;")
</li></ul><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>TARGET_LINK_LIBRARIES(mySimpleApplication lib1 lib2 ...)
</div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'>An example using the "eo" and "eoutils" of <span class='wikiword'>ParadisEO</span>-EO is:
</p><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>TARGET_LINK_LIBRARIES(mySimpleApplication <strong>eo eoutils</strong>)
</div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'>Important: If you change the name of the executable (see a few lines above), don't forget to replace <strong><em>"mySimpleApplication</em></strong> " by the right name in:
</p>
<div class='vspace'></div><div style='color: black; font-size: 9pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><dl><dd><div class='indent'>TARGET_LINK_LIBRARIES(<strong><em>mySimpleApplication</em></strong> eo eoutils)
</div></dd></dl></dd></dl></dd></dl></div>
<p class='vspace'><br />
</p><div style='color: black; font-size: 8pt; background-color: #99CCFF;' >
<h3><ins>Step 4 : Launch the build process and compile</ins></h3>
</div>
<p class='vspace'>There are two ways to build and compile your program:
</p><div class='indent'>- Compile it in the source directory, that means where your main cpp file is
</div><div class='indent'>- Compile it somewhere else in order to have on one hand the source files, on the other the rest (makefiles of configuration file, ".o" files, the executable itself). This way is called <strong><em> out-source-build</em></strong> and is highly recommended.
</div><p class='vspace'>Moreover, you should know in advance the kind of generator you want <span class='wikiword'>CMake</span> to use.
</p>
<p class='vspace'>For an "out-source-build", let's suppose your application's source file is located in <span style='color: green;'> <strong>/home/john/mySimpleApplication</strong></span> and you want to build it in <span style='color: red;'> <strong>/home/john/work/result</strong></span> for <strong><span style='color: blue;'>Visual Studio 8 2005 </span></strong> :
</p>
<p class='vspace'>From any directory, simply run (from a terminal/console)
</p><div style='color: black; font-size: 8pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><div class='indent'><strong>cmake <span style='color: green;'>/home/john/mySimpleApplication</span> <span style='color: red;'> /home/john/work/result</span> -G<span style='color: blue;'>"Visual Studio 8 2005"</span></strong>
</div></dd></dl></dd></dl></div>
<p class='vspace'>The generic call for <span class='wikiword'>CMake</span> is:
</p><div style='color: black; font-size: 8pt; background-color: #ffffcc;' >
<dl><dd><dl><dd><div class='indent'><strong>cmake <span style='color: green;'>&lt;path to the sources&gt; </span> <span style='color: red;'> &lt;target build path&gt;</span> -G<span style='color: blue;'>"&lt;generator name&gt;"</span></strong>
</div></dd></dl></dd></dl></div>
<p class='vspace'>Then :
</p>
<p class='vspace'>- Go in <span style='color: red;'> <strong><em>/home/john/work/result</em></strong></span>
<br />- Compile your program using the appropriate tool. Examples:
</p><dl><dd><dl><dd><div class='indent'>--&gt; If you chose the Unix Makefiles generator, enter "make"
</div><div class='indent'>--&gt; If you chose Visual Studio generator, open the generated solution/project and compile
</div><div class='indent'>--&gt; ...
</div></dd></dl></dd></dl>
<p class='vspace'><br />
<br /><strong> For further help and information, feel free to send us an email at <a class='urllink' href='mailto:paradiseo-help@lists.gforge.inria.fr' rel='nofollow'>paradiseo-help@lists.gforge.inria.fr</a> </strong>.
</p>
</div>
<!--PageFooterFmt-->
<div id='footer'>abitmodernCopyright
&nbsp&nbsp&nbsp&nbsp
<!--a href="http://paradiseo.gforge.inria.fr/index.php?n=Paradiseo.BuildMySimpleApplication?action=pdf" title="Read this web page on format .pdf" ><acronym title="Portable Document Format" lang="en">PDF version </acronym></a-->
</div> <!--/PageFooterFmt-->
</div>
<div class='clearfix'></div>
</div>
<div class='clearfix'></div>
<!-- -->
<!-- END BODY -->
<!-- -->
</td>
<td width="10" bgcolor="#ffffff"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/clear.png" width="2" height="1" alt="" /></td>
</tr>
<tr>
<td align="left" bgcolor="#E0E0E0" width="9"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/tabs/bottomleft-inner.png" height="11" width="11" alt="" /></td>
<td bgcolor="#ffffff"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/clear.png" width="1" height="1" alt="" ></td>
<td align="right" bgcolor="#E0E0E0" width="9"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/tabs/bottomright-inner.png" height="11" width="11" alt="" /></td>
</tr>
</TABLE>
</td>
<td width="10" bgcolor="#E0E0E0"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/clear.png" width="2" height="1" alt="" /></td>
</tr>
<tr>
<td align="left" bgcolor="#E0E0E0" width="9"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/tabs/bottomleft.png" height="9" width="9" alt="" /></td>
<td bgcolor="#E0E0E0"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/clear.png" width="1" height="1" alt="" /></td>
<td align="right" bgcolor="#E0E0E0" width="9"><img src="http://paradiseo.gforge.inria.fr/pub/skins/abitmodern/images/tabs/bottomright.png" height="9" width="9" alt="" /></td>
</tr>
</table>
</body>
</html>

View file

@ -0,0 +1,50 @@
#########################################################################################################
# 1) ParadisEO install: SIMPLE Configuration
#########################################################################################################
# Here, just specify PARADISEO_DIR : the directory where ParadisEO has been installed
SET(PARADISEO_DIR "/opt/paradiseo-ix86-1.0" CACHE PATH "ParadisEO directory" FORCE)
#########################################################################################################
#########################################################################################################
# 2) ParadisEO install: ADVANCED Configuration
#########################################################################################################
SET(PARADISEO_EO_SRC_DIR "${PARADISEO_DIR}/paradiseo-eo" CACHE PATH "ParadisEO-EO source directory" FORCE)
SET(PARADISEO_EO_BIN_DIR "${PARADISEO_DIR}/paradiseo-eo/build" CACHE PATH "ParadisEO-EO binary directory" FORCE)
SET(PARADISEO_MO_SRC_DIR "${PARADISEO_DIR}/paradiseo-mo" CACHE PATH "ParadisEO-MO source directory" FORCE)
SET(PARADISEO_MO_BIN_DIR "${PARADISEO_DIR}/paradiseo-mo/build" CACHE PATH "ParadisEO-MO binary directory" FORCE)
SET(PARADISEO_MOEO_SRC_DIR "${PARADISEO_DIR}/paradiseo-moeo" CACHE PATH "ParadisEO-MOEO source directory" FORCE)
SET(PARADISEO_MOEO_BIN_DIR "${PARADISEO_DIR}/paradiseo-moeo/build" CACHE PATH "ParadisEO-MOEO binary directory" FORCE)
SET(PARADISEO_PEO_SRC_DIR "${PARADISEO_DIR}/paradiseo-peo" CACHE PATH "ParadisEO-PEO source directory" FORCE)
SET(PARADISEO_PEO_BIN_DIR "${PARADISEO_DIR}/paradiseo-peo/build" CACHE PATH "ParadisEO-PEO binary directory" FORCE)
#########################################################################################################
######################################################################################
### 3) OPTIONNAL: Windows advanced config - especially for Microsoft Visual Studio 8
######################################################################################
IF(CMAKE_CXX_COMPILER MATCHES cl)
IF(NOT WITH_SHARED_LIBS)
IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005")
SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy")
SET(CMAKE_CXX_FLAGS_DEBUG "/MTd /Z7 /Od")
SET(CMAKE_CXX_FLAGS_RELEASE "/MT /O2")
SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE")
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005")
ENDIF(NOT WITH_SHARED_LIBS)
ENDIF(CMAKE_CXX_COMPILER MATCHES cl)
######################################################################################

View file

@ -0,0 +1,17 @@
#include <iostream>
// #include < file >
// Use functions from namespace std ?
using namespace std;
int main(int argc, char **argv)
{
// Your code ...
cout << "I'm a simple application linked with ParadisEO" << endl ;
return 1;
}