diff --git a/.travis.yml b/.travis.yml
index 5d7ce35c..819ee4c7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,12 +22,12 @@ before_install:
before_script:
- ./autogen.sh
- - echo "#define CMAES_EXPORT" > cmaes_export.h
+ - echo "#define CMAES_EXPORT" > include/libcmaes/cmaes_export.h
- if [ $TRAVIS_OS_NAME == linux ]; then ./configure --enable-python; fi
- if [ $TRAVIS_OS_NAME == osx ]; then ./configure --enable-python LDFLAGS="-L/usr/local/lib/"; fi
script: make
-os:
+os:
- linux
- osx
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a900de79..d78fd3b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,7 +123,7 @@ if 'real_prefix' in dir(sys):
endif ()
# boost-python
- FIND_PACKAGE(Boost COMPONENTS python)
+ find_package(Boost COMPONENTS python)
if (Boost_FOUND)
set (HAVE_BOOST_PYTHON TRUE)
if (NOT TARGET Boost::python)
@@ -137,6 +137,11 @@ if 'real_prefix' in dir(sys):
endif ()
endif ()
+set (HAVE_SURROG ${LIBCMAES_ENABLE_SURROG})
+configure_file (include/libcmaes/libcmaes_config.h.cmake.in include/libcmaes/libcmaes_config.h)
+install (FILES ${PROJECT_BINARY_DIR}/include/libcmaes/libcmaes_config.h
+ DESTINATION ${RELATIVE_INSTALL_INCLUDE_DIR}/libcmaes)
+
if (NOT MSVC)
set (prefix ${CMAKE_INSTALL_PREFIX})
set (exec_prefix ${prefix})
diff --git a/Makefile.am b/Makefile.am
index 7d57f8eb..f29c0e6c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,7 +9,7 @@ SUBDIRS += python
endif
libcmaesincludedir=$(includedir)/libcmaes
-libcmaesinclude_HEADERS = libcmaes_config.h
+libcmaesinclude_HEADERS = include/libcmaes/libcmaes_config.h include/libcmaes/cmaes_export.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcmaes.pc
diff --git a/README.md b/README.md
index 988ae1ab..26434b80 100644
--- a/README.md
+++ b/README.md
@@ -52,7 +52,7 @@ sudo apt-get install autoconf automake libtool libgoogle-glog-dev libgflags-dev
For compiling with basic options enabled:
```
./autogen.sh
-echo "#define CMAES_EXPORT" > cmaes_export.h
+echo "#define CMAES_EXPORT" > include/libcmaes/cmaes_export.h
./configure
make
```
diff --git a/configure.ac b/configure.ac
index 49e7ddce..b6bef490 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_INIT(libcmaes,0.9.5)
AC_MSG_NOTICE([libcmaes $PACKAGE_VERSION])
AC_CONFIG_SRCDIR(Makefile.am)
AM_INIT_AUTOMAKE([subdir-objects])
-AM_CONFIG_HEADER([libcmaes_config.h])
+AM_CONFIG_HEADER([include/libcmaes/libcmaes_config.h])
AC_CONFIG_FILES(libcmaes.pc)
#ac_default_prefix=`pwd`
diff --git a/examples/Makefile.am b/examples/Makefile.am
index d01e9dcd..8c66ab70 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -26,7 +26,7 @@ sample_code_surrogate_rsvm_SOURCES=surrogates/sample-code-surrogate-rsvm.cc
endif
endif
-AM_CPPFLAGS=-I$(top_srcdir)/src/ -I$(EIGEN3_INC) $(GFLAGS_CFLAGS)
+AM_CPPFLAGS=-I$(top_srcdir)/include/ -I$(EIGEN3_INC) $(GFLAGS_CFLAGS)
AM_CXXFLAGS=-Wall -Wextra -g -O3 -mavx -mfma
if !HAVE_CLANG
AM_CXXFLAGS+=-fopenmp
diff --git a/examples/sample-code-ask-tell-uh.cc b/examples/sample-code-ask-tell-uh.cc
index 343cc3d8..481e885d 100644
--- a/examples/sample-code-ask-tell-uh.cc
+++ b/examples/sample-code-ask-tell-uh.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code-ask-tell.cc b/examples/sample-code-ask-tell.cc
index 4bcbbe9f..1f96a4fa 100644
--- a/examples/sample-code-ask-tell.cc
+++ b/examples/sample-code-ask-tell.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code-bounds.cc b/examples/sample-code-bounds.cc
index 476496a8..b2e25279 100644
--- a/examples/sample-code-bounds.cc
+++ b/examples/sample-code-bounds.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code-genopheno.cc b/examples/sample-code-genopheno.cc
index 6e6f1992..e21028d0 100644
--- a/examples/sample-code-genopheno.cc
+++ b/examples/sample-code-genopheno.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code-gradient.cc b/examples/sample-code-gradient.cc
index 4c40eb5e..a5c13cb4 100644
--- a/examples/sample-code-gradient.cc
+++ b/examples/sample-code-gradient.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code-lscaling-sigmas.cc b/examples/sample-code-lscaling-sigmas.cc
index a83c27e9..1afd8b2b 100644
--- a/examples/sample-code-lscaling-sigmas.cc
+++ b/examples/sample-code-lscaling-sigmas.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code-lscaling.cc b/examples/sample-code-lscaling.cc
index 889353a1..76682e77 100644
--- a/examples/sample-code-lscaling.cc
+++ b/examples/sample-code-lscaling.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code-pffunc.cc b/examples/sample-code-pffunc.cc
index 0dbf94a0..a7db1693 100644
--- a/examples/sample-code-pffunc.cc
+++ b/examples/sample-code-pffunc.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code-pfunc.cc b/examples/sample-code-pfunc.cc
index d0508ca0..467147fa 100644
--- a/examples/sample-code-pfunc.cc
+++ b/examples/sample-code-pfunc.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/examples/sample-code.cc b/examples/sample-code.cc
index 927e03fe..9b2f3943 100644
--- a/examples/sample-code.cc
+++ b/examples/sample-code.cc
@@ -19,7 +19,7 @@
* along with libcmaes. If not, see .
*/
-#include "cmaes.h"
+#include
#include
using namespace libcmaes;
diff --git a/src/acovarianceupdate.h b/include/libcmaes/acovarianceupdate.h
similarity index 93%
rename from src/acovarianceupdate.h
rename to include/libcmaes/acovarianceupdate.h
index cf520ea2..8942ad78 100644
--- a/src/acovarianceupdate.h
+++ b/include/libcmaes/acovarianceupdate.h
@@ -22,9 +22,9 @@
#ifndef ACOVARIANCEUPDATE_H
#define ACOVARIANCEUPDATE_H
-#include "cmaparameters.h"
-#include "cmasolutions.h"
-#include "eigenmvn.h"
+#include
+#include
+#include
namespace libcmaes
{
diff --git a/src/bipopcmastrategy.h b/include/libcmaes/bipopcmastrategy.h
similarity index 98%
rename from src/bipopcmastrategy.h
rename to include/libcmaes/bipopcmastrategy.h
index c99c2be9..ea309fe7 100644
--- a/src/bipopcmastrategy.h
+++ b/include/libcmaes/bipopcmastrategy.h
@@ -22,7 +22,7 @@
#ifndef BIPOPCMASTRATEGY_H
#define BIPOPCMASTRATEGY_H
-#include "ipopcmastrategy.h"
+#include
#include
namespace libcmaes
diff --git a/src/candidate.h b/include/libcmaes/candidate.h
similarity index 98%
rename from src/candidate.h
rename to include/libcmaes/candidate.h
index 2a892a5e..d5ede0b9 100644
--- a/src/candidate.h
+++ b/include/libcmaes/candidate.h
@@ -22,8 +22,8 @@
#ifndef CANDIDATE_H
#define CANDIDATE_H
-#include "eo_matrix.h"
-#include "cmaparameters.h"
+#include
+#include
namespace libcmaes
{
diff --git a/src/cmaes.h b/include/libcmaes/cmaes.h
similarity index 98%
rename from src/cmaes.h
rename to include/libcmaes/cmaes.h
index 1252937b..f7e49e17 100644
--- a/src/cmaes.h
+++ b/include/libcmaes/cmaes.h
@@ -22,10 +22,10 @@
#ifndef CMAES_H
#define CMAES_H
-#include "esoptimizer.h"
-#include "cmastrategy.h"
-#include "ipopcmastrategy.h"
-#include "bipopcmastrategy.h"
+#include
+#include
+#include
+#include
namespace cma = libcmaes;
diff --git a/src/cmaparameters.h b/include/libcmaes/cmaparameters.h
similarity index 99%
rename from src/cmaparameters.h
rename to include/libcmaes/cmaparameters.h
index 0f1ecddf..da9f0388 100644
--- a/src/cmaparameters.h
+++ b/include/libcmaes/cmaparameters.h
@@ -22,9 +22,9 @@
#ifndef CMAPARAMETERS_H
#define CMAPARAMETERS_H
-#include "parameters.h"
-#include "eo_matrix.h"
-#include "cmaes_export.h"
+#include
+#include
+#include
#include
namespace libcmaes
diff --git a/src/cmasolutions.h b/include/libcmaes/cmasolutions.h
similarity index 98%
rename from src/cmasolutions.h
rename to include/libcmaes/cmasolutions.h
index 49c2fa50..23aca8a1 100644
--- a/src/cmasolutions.h
+++ b/include/libcmaes/cmasolutions.h
@@ -22,12 +22,12 @@
#ifndef CMASOLUTIONS_H
#define CMASOLUTIONS_H
-#include "libcmaes_config.h"
-#include "candidate.h"
-#include "eo_matrix.h"
-#include "cmaparameters.h"
-#include "cmastopcriteria.h"
-#include "pli.h"
+#include
+#include
+#include
+#include
+#include
+#include
#include
#include
diff --git a/src/cmastopcriteria.h b/include/libcmaes/cmastopcriteria.h
similarity index 98%
rename from src/cmastopcriteria.h
rename to include/libcmaes/cmastopcriteria.h
index 669262ee..33d2531f 100644
--- a/src/cmastopcriteria.h
+++ b/include/libcmaes/cmastopcriteria.h
@@ -22,7 +22,7 @@
#ifndef CMASTOPCRITERIA_H
#define CMASTOPCRITERIA_H
-#include "cmaparameters.h"
+#include
#include
#include