Merge branch 'master' of ssh://localhost:8479/gitroot/eodev/eodev
This commit is contained in:
commit
af0102a5d7
8 changed files with 148 additions and 16 deletions
|
|
@ -28,11 +28,16 @@ SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT
|
|||
### 3) Include useful features
|
||||
######################################################################################
|
||||
|
||||
# include useful features for cmake
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
||||
|
||||
INCLUDE(FindDoxygen)
|
||||
INCLUDE(FindPkgConfig)
|
||||
|
||||
FIND_PACKAGE(Boost 1.33.0)
|
||||
|
||||
FIND_PACKAGE(EO)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${EO_INCLUDE_DIRS}
|
||||
${MO_INCLUDE_DIRS}
|
||||
|
|
@ -87,7 +92,7 @@ SET(SAMPLE_SRCS)
|
|||
######################################################################################
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(application)
|
||||
#ADD_SUBDIRECTORY(application)
|
||||
ADD_SUBDIRECTORY(test)
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
|
||||
|
|
|
|||
100
edo/cmake/modules/FindEO.cmake
Normal file
100
edo/cmake/modules/FindEO.cmake
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
# File: FindEO.cmake
|
||||
# CMAKE commands to actually use the EO library
|
||||
# Version: 0.0.1
|
||||
#
|
||||
# The following variables are filled out:
|
||||
# - EO_INCLUDE_DIRS
|
||||
# - EO_LIBRARY_DIRS
|
||||
# - EO_LIBRARIES
|
||||
# - EO_FOUND
|
||||
#
|
||||
# Here are the components:
|
||||
# - PyEO
|
||||
# - es
|
||||
# - ga
|
||||
# - cma
|
||||
#
|
||||
# You can use FIND_PACKAGE( EO COMPONENTS ... ) to enable one or several components.
|
||||
#
|
||||
|
||||
# Default enabled components
|
||||
SET(EO_LIBRARIES_TO_FIND eo eoutils)
|
||||
|
||||
# Use FIND_PACKAGE( EO COMPONENTS ... ) to enable modules
|
||||
IF(EO_FIND_COMPONENTS)
|
||||
FOREACH(component ${EO_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${component} _COMPONENT)
|
||||
SET(EO_USE_${_COMPONENT} 1)
|
||||
ENDFOREACH(component)
|
||||
|
||||
# To make sure we don't use PyEO, ES, GA, CMA when not in COMPONENTS
|
||||
IF(NOT EO_USE_PYEO)
|
||||
SET(EO_DONT_USE_PYEO 1)
|
||||
ELSE(NOT EO_USE_PYEO)
|
||||
SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} PyEO)
|
||||
ENDIF(NOT EO_USE_PYEO)
|
||||
|
||||
IF(NOT EO_USE_ES)
|
||||
SET(EO_DONT_USE_ES 1)
|
||||
ELSE(NOT EO_USE_ES)
|
||||
SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} es)
|
||||
ENDIF(NOT EO_USE_ES)
|
||||
|
||||
IF(NOT EO_USE_GA)
|
||||
SET(EO_DONT_USE_GA 1)
|
||||
ELSE(NOT EO_USE_GA)
|
||||
SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} ga)
|
||||
ENDIF(NOT EO_USE_GA)
|
||||
|
||||
IF(NOT EO_USE_CMA)
|
||||
SET(EO_DONT_USE_CMA 1)
|
||||
ELSE(NOT EO_USE_CMA)
|
||||
SET(EO_LIBRARIES_TO_FIND ${EO_LIBRARIES_TO_FIND} cma)
|
||||
ENDIF(NOT EO_USE_CMA)
|
||||
ENDIF(EO_FIND_COMPONENTS)
|
||||
|
||||
IF(NOT EO_INCLUDE_DIRS)
|
||||
FIND_PATH(
|
||||
EO_INCLUDE_DIRS
|
||||
EO.h
|
||||
PATHS
|
||||
/usr/include/eo
|
||||
/usr/local/include/eo
|
||||
)
|
||||
ENDIF(NOT EO_INCLUDE_DIRS)
|
||||
|
||||
IF(NOT EO_LIBRARY_DIRS)
|
||||
FIND_PATH(
|
||||
EO_LIBRARY_DIRS
|
||||
libeo.a
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
ENDIF(NOT EO_LIBRARY_DIRS)
|
||||
|
||||
IF(NOT EO_LIBRARIES)
|
||||
SET(EO_LIBRARIES)
|
||||
FOREACH(component ${EO_LIBRARIES_TO_FIND})
|
||||
FIND_LIBRARY(
|
||||
EO_${component}_LIBRARY
|
||||
NAMES ${component}
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
IF(EO_${component}_LIBRARY)
|
||||
SET(EO_LIBRARIES ${EO_LIBRARIES} ${EO_${component}_LIBRARY})
|
||||
ELSE(EO_${component}_LIBRARY)
|
||||
MESSAGE(FATAL_ERROR "${component} component not found.")
|
||||
ENDIF(EO_${component}_LIBRARY)
|
||||
ENDFOREACH(component)
|
||||
ENDIF(NOT EO_LIBRARIES)
|
||||
|
||||
IF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES)
|
||||
SET(EO_FOUND 1)
|
||||
MARK_AS_ADVANCED(EO_FOUND)
|
||||
MARK_AS_ADVANCED(EO_INCLUDE_DIRS)
|
||||
MARK_AS_ADVANCED(EO_LIBRARY_DIRS)
|
||||
MARK_AS_ADVANCED(EO_LIBRARIES)
|
||||
ENDIF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES)
|
||||
|
|
@ -12,7 +12,7 @@ SET(EO_LIBRARIES eoutils eo es ga cma gcov) # do not use quotes around this list
|
|||
|
||||
SET(MO_INCLUDE_DIRS "${MO_DIR}/src" CACHE PATH "MO include directory" FORCE)
|
||||
SET(MO_LIBRARY_DIRS "${MO_DIR}/release/lib" CACHE PATH "MO library directory" FORCE)
|
||||
SET(MO_LIBRARIES "mo")
|
||||
#SET(MO_LIBRARIES "mo") # no library is generated when building MO
|
||||
|
||||
# ... or rather use pkg-config (dont forget to comment the code above)
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@ CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
|||
# now create config install_symlink script file
|
||||
CONFIGURE_FILE(install_symlink.py.cmake ${CMAKE_CURRENT_BINARY_DIR}/install_symlink.py)
|
||||
|
||||
# now create PKGBUILD file for archlinux package manager
|
||||
CONFIGURE_FILE(PKGBUILD.cmake ${CMAKE_CURRENT_BINARY_DIR}/PKGBUILD)
|
||||
|
||||
# Set a special flag if the environment is windows (should do the same in a config.g file)
|
||||
IF (WIN32)
|
||||
ADD_DEFINITIONS(-D_WINDOWS=1)
|
||||
|
|
|
|||
23
eo/PKGBUILD.cmake
Normal file
23
eo/PKGBUILD.cmake
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $
|
||||
# Maintainer: Caner Candan <caner@candan.fr>
|
||||
pkgname=libeo
|
||||
pkgver=@PROJECT_VERSION@
|
||||
pkgrel=1
|
||||
pkgdesc="Evolving Objects is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast."
|
||||
url=""
|
||||
arch=('i686' 'x86_64')
|
||||
license=('LGPL')
|
||||
depends=()
|
||||
makedepends=('make' 'cmake')
|
||||
conflicts=()
|
||||
replaces=()
|
||||
backup=()
|
||||
install=
|
||||
source=($pkgname-$pkgver.tar.gz)
|
||||
md5sums=()
|
||||
build() {
|
||||
cd $startdir/src/$pkgname-$pkgver
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr .
|
||||
make || return 1
|
||||
make DESTDIR=$startdir/pkg install
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
# Version: 0.0.1
|
||||
#
|
||||
# The following variables are filled out:
|
||||
# - EO_INCLUDE_DIR
|
||||
# - EO_LIBRARY_DIR
|
||||
# - EO_INCLUDE_DIRS
|
||||
# - EO_LIBRARY_DIRS
|
||||
# - EO_LIBRARIES
|
||||
# - EO_FOUND
|
||||
#
|
||||
|
|
@ -53,25 +53,25 @@ IF(EO_FIND_COMPONENTS)
|
|||
ENDIF(NOT EO_USE_CMA)
|
||||
ENDIF(EO_FIND_COMPONENTS)
|
||||
|
||||
IF(NOT EO_INCLUDE_DIR)
|
||||
IF(NOT EO_INCLUDE_DIRS)
|
||||
FIND_PATH(
|
||||
EO_INCLUDE_DIR
|
||||
EO_INCLUDE_DIRS
|
||||
EO.h
|
||||
PATHS
|
||||
/usr/include/eo
|
||||
/usr/local/include/eo
|
||||
)
|
||||
ENDIF(NOT EO_INCLUDE_DIR)
|
||||
ENDIF(NOT EO_INCLUDE_DIRS)
|
||||
|
||||
IF(NOT EO_LIBRARY_DIR)
|
||||
IF(NOT EO_LIBRARY_DIRS)
|
||||
FIND_PATH(
|
||||
EO_LIBRARY_DIR
|
||||
EO_LIBRARY_DIRS
|
||||
libeo.a
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
ENDIF(NOT EO_LIBRARY_DIR)
|
||||
ENDIF(NOT EO_LIBRARY_DIRS)
|
||||
|
||||
IF(NOT EO_LIBRARIES)
|
||||
SET(EO_LIBRARIES)
|
||||
|
|
@ -91,10 +91,10 @@ IF(NOT EO_LIBRARIES)
|
|||
ENDFOREACH(component)
|
||||
ENDIF(NOT EO_LIBRARIES)
|
||||
|
||||
IF(EO_INCLUDE_DIR AND EO_LIBRARY_DIR AND EO_LIBRARIES)
|
||||
IF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES)
|
||||
SET(EO_FOUND 1)
|
||||
MARK_AS_ADVANCED(EO_FOUND)
|
||||
MARK_AS_ADVANCED(EO_INCLUDE_DIR)
|
||||
MARK_AS_ADVANCED(EO_LIBRARY_DIR)
|
||||
MARK_AS_ADVANCED(EO_INCLUDE_DIRS)
|
||||
MARK_AS_ADVANCED(EO_LIBRARY_DIRS)
|
||||
MARK_AS_ADVANCED(EO_LIBRARIES)
|
||||
ENDIF(EO_INCLUDE_DIR AND EO_LIBRARY_DIR AND EO_LIBRARIES)
|
||||
ENDIF(EO_INCLUDE_DIRS AND EO_LIBRARY_DIRS AND EO_LIBRARIES)
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@
|
|||
#include <ga/eoBit.h>
|
||||
|
||||
|
||||
/** eoBitFlip --> changes 1 bit
|
||||
\class eoBitBitFlip eoBitOp.h ga/eoBitOp.h
|
||||
/** eoOneBitFlip --> changes 1 bit
|
||||
\class eoOneBitFlip eoBitOp.h ga/eoBitOp.h
|
||||
\ingroup bitstring
|
||||
|
||||
@ingroup Variators
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ inline bool eoUniformGenerator<bool>::operator()(void)
|
|||
/**
|
||||
The class eoBooleanGenerator can be used in the STL generate function
|
||||
to easily generate random booleans with a specified bias
|
||||
\ingroup bitstring
|
||||
*/
|
||||
class eoBooleanGenerator : public eoRndGenerator<bool>
|
||||
{
|
||||
|
|
|
|||
Reference in a new issue