diff --git a/edo/CMakeLists.txt b/edo/CMakeLists.txt index 868c456be..563437043 100644 --- a/edo/CMakeLists.txt +++ b/edo/CMakeLists.txt @@ -1,5 +1,14 @@ +############################################################################ +########## +### 1) If you want to set your own variables in install.cmake and avoid the cmd line ###################################################################################### -### 1) Set the application properties + +INCLUDE(install.cmake OPTIONAL) + +###################################################################################### + +###################################################################################### +### 2) Project properties ###################################################################################### # Checks cmake version compatibility @@ -16,15 +25,12 @@ SET(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT ###################################################################################### -### 2) Include useful features +### 3) Include useful features ###################################################################################### INCLUDE(FindDoxygen) INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(EO eo REQUIRED) -PKG_CHECK_MODULES(MO mo REQUIRED) - FIND_PACKAGE(Boost 1.33.0) INCLUDE_DIRECTORIES( @@ -34,11 +40,16 @@ INCLUDE_DIRECTORIES( # /Dev/ometah-0.3/common ) +LINK_DIRECTORIES( + ${EO_LIBRARY_DIRS} + ${MO_LIBRARY_DIRS} + ) + ###################################################################################### ###################################################################################### -### 3) Include header files path +### 4) Include header files path ###################################################################################### INCLUDE_DIRECTORIES( @@ -49,7 +60,7 @@ INCLUDE_DIRECTORIES( ###################################################################################### -### 4) Set compiler definitions +### 5) Set compiler definitions ###################################################################################### IF(UNIX) @@ -63,7 +74,7 @@ ENDIF() ###################################################################################### -### 5) Prepare some variables for CMAKE usage +### 6) Prepare some variables for CMAKE usage ###################################################################################### SET(SAMPLE_SRCS) @@ -72,7 +83,7 @@ SET(SAMPLE_SRCS) ###################################################################################### -### 6) Now where we go ? +### 7) Now where we go ? ###################################################################################### ADD_SUBDIRECTORY(src) @@ -85,7 +96,7 @@ ADD_SUBDIRECTORY(doc) ###################################################################################### -### 7) Create executable, link libraries and prepare target +### 8) Create executable, link libraries and prepare target ###################################################################################### SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) @@ -99,7 +110,7 @@ INSTALL(TARGETS edo ARCHIVE DESTINATION lib COMPONENT libraries) ###################################################################################### -### 8) Install pkg-config config file for EO +### 9) Install pkg-config config file for EO ###################################################################################### INSTALL(FILES edo.pc DESTINATION lib/pkgconfig COMPONENT headers) @@ -108,7 +119,7 @@ INSTALL(FILES edo.pc DESTINATION lib/pkgconfig COMPONENT headers) ###################################################################################### -### 9) Include packaging +### 10) Include packaging ###################################################################################### INCLUDE(Packaging.cmake) diff --git a/edo/application/common/CMakeLists.txt b/edo/application/common/CMakeLists.txt index d16353f59..14c3509e3 100644 --- a/edo/application/common/CMakeLists.txt +++ b/edo/application/common/CMakeLists.txt @@ -10,6 +10,6 @@ FOREACH(file ${RESOURCES}) EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${file} - ${DO_BINARY_DIR}/${file} + ${EDO_BINARY_DIR}/${file} ) ENDFOREACH(file) diff --git a/edo/install.cmake-dist b/edo/install.cmake-dist new file mode 100644 index 000000000..bd07be7c8 --- /dev/null +++ b/edo/install.cmake-dist @@ -0,0 +1,20 @@ +# Variables to set + +# directory we need to build project +SET(EO_DIR "<>" CACHE PATH "EO directory" FORCE) +SET(MO_DIR "<>" CACHE PATH "MO directory" FORCE) + +# automagically set parameters, do not edit + +SET(EO_INCLUDE_DIRS "${EO_DIR}/src" CACHE PATH "EO include directory" FORCE) +SET(EO_LIBRARY_DIRS "${EO_DIR}/release/lib" CACHE PATH "EO library directory" FORCE) +SET(EO_LIBRARIES "eoutils eo es ga cma gcov") + +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") + +# ... or rather use pkg-config (dont forget to comment the code above) + +#PKG_CHECK_MODULES(EO eo REQUIRED) +#PKG_CHECK_MODULES(MO mo REQUIRED) diff --git a/edo/src/edoEstimatorNormalMulti.h b/edo/src/edoEstimatorNormalMulti.h index f06fadd86..8b4b7abb6 100644 --- a/edo/src/edoEstimatorNormalMulti.h +++ b/edo/src/edoEstimatorNormalMulti.h @@ -73,7 +73,7 @@ public: //------------------------------------------------------------- - _varcovar.resize(s_size, s_size); + _varcovar.resize(s_size); //------------------------------------------------------------- diff --git a/edo/src/edoSamplerNormalMulti.h b/edo/src/edoSamplerNormalMulti.h index c1ce57453..889c2e54f 100644 --- a/edo/src/edoSamplerNormalMulti.h +++ b/edo/src/edoSamplerNormalMulti.h @@ -53,7 +53,7 @@ public: assert( Vl == Vc ); - _L.resize(Vl, Vc); + _L.resize(Vl); unsigned int i,j,k; diff --git a/edo/test/t-mean-distance.cpp b/edo/test/t-mean-distance.cpp index 40a95c994..6f3b84f6c 100644 --- a/edo/test/t-mean-distance.cpp +++ b/edo/test/t-mean-distance.cpp @@ -41,7 +41,7 @@ Authors: #include #include -#include +#include #include "Rosenbrock.h" #include "Sphere.h"