Skip to content

Commit

Permalink
Merge pull request #218 from phbasler/master
Browse files Browse the repository at this point in the history
Moving the header files
  • Loading branch information
beniz authored Dec 4, 2020
2 parents 9f6473e + cad7914 commit 70a03e0
Show file tree
Hide file tree
Showing 66 changed files with 197 additions and 196 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-ask-tell-uh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-ask-tell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-bounds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-genopheno.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-gradient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-lscaling-sigmas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-lscaling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-pffunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code-pfunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-code.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with libcmaes. If not, see <http://www.gnu.org/licenses/>.
*/

#include "cmaes.h"
#include <libcmaes/cmaes.h>
#include <iostream>

using namespace libcmaes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#ifndef ACOVARIANCEUPDATE_H
#define ACOVARIANCEUPDATE_H

#include "cmaparameters.h"
#include "cmasolutions.h"
#include "eigenmvn.h"
#include <libcmaes/cmaparameters.h>
#include <libcmaes/cmasolutions.h>
#include <libcmaes/eigenmvn.h>

namespace libcmaes
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef BIPOPCMASTRATEGY_H
#define BIPOPCMASTRATEGY_H

#include "ipopcmastrategy.h"
#include <libcmaes/ipopcmastrategy.h>
#include <random>

namespace libcmaes
Expand Down
4 changes: 2 additions & 2 deletions src/candidate.h → include/libcmaes/candidate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#ifndef CANDIDATE_H
#define CANDIDATE_H

#include "eo_matrix.h"
#include "cmaparameters.h"
#include <libcmaes/eo_matrix.h>
#include <libcmaes/cmaparameters.h>

namespace libcmaes
{
Expand Down
8 changes: 4 additions & 4 deletions src/cmaes.h → include/libcmaes/cmaes.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
#ifndef CMAES_H
#define CMAES_H

#include "esoptimizer.h"
#include "cmastrategy.h"
#include "ipopcmastrategy.h"
#include "bipopcmastrategy.h"
#include <libcmaes/esoptimizer.h>
#include <libcmaes/cmastrategy.h>
#include <libcmaes/ipopcmastrategy.h>
#include <libcmaes/bipopcmastrategy.h>

namespace cma = libcmaes;

Expand Down
6 changes: 3 additions & 3 deletions src/cmaparameters.h → include/libcmaes/cmaparameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#ifndef CMAPARAMETERS_H
#define CMAPARAMETERS_H

#include "parameters.h"
#include "eo_matrix.h"
#include "cmaes_export.h"
#include <libcmaes/parameters.h>
#include <libcmaes/eo_matrix.h>
#include <libcmaes/cmaes_export.h>
#include <float.h>

namespace libcmaes
Expand Down
12 changes: 6 additions & 6 deletions src/cmasolutions.h → include/libcmaes/cmasolutions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <libcmaes/libcmaes_config.h>
#include <libcmaes/candidate.h>
#include <libcmaes/eo_matrix.h>
#include <libcmaes/cmaparameters.h>
#include <libcmaes/cmastopcriteria.h>
#include <libcmaes/pli.h>
#include <vector>
#include <algorithm>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef CMASTOPCRITERIA_H
#define CMASTOPCRITERIA_H

#include "cmaparameters.h"
#include <libcmaes/cmaparameters.h>
#include <functional>
#include <map>

Expand Down
16 changes: 8 additions & 8 deletions src/cmastrategy.h → include/libcmaes/cmastrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#ifndef CMASTRATEGY_H
#define CMASTRATEGY_H

#include "esostrategy.h"
#include "cmaparameters.h"
#include "cmasolutions.h"
#include "cmastopcriteria.h"
#include "covarianceupdate.h"
#include "acovarianceupdate.h"
#include "vdcmaupdate.h"
#include "eigenmvn.h"
#include <libcmaes/esostrategy.h>
#include <libcmaes/cmaparameters.h>
#include <libcmaes/cmasolutions.h>
#include <libcmaes/cmastopcriteria.h>
#include <libcmaes/covarianceupdate.h>
#include <libcmaes/acovarianceupdate.h>
#include <libcmaes/vdcmaupdate.h>
#include <libcmaes/eigenmvn.h>
#include <fstream>

namespace libcmaes
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#ifndef COVARIANCEUPDATE_H
#define COVARIANCEUPDATE_H

#include "cmaparameters.h"
#include "cmasolutions.h"
#include "eigenmvn.h"
#include <libcmaes/cmaparameters.h>
#include <libcmaes/cmasolutions.h>
#include <libcmaes/eigenmvn.h>

namespace libcmaes
{
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/errstats.h → include/libcmaes/errstats.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#ifndef ERRSTATS_H
#define ERRSTATS_H

#include "pli.h"
#include "contour.h"
#include "cmaes.h"
#include <libcmaes/pli.h>
#include <libcmaes/contour.h>
#include <libcmaes/cmaes.h>

namespace libcmaes
{
Expand Down
6 changes: 3 additions & 3 deletions src/esoptimizer.h → include/libcmaes/esoptimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

#include <functional>
#include <chrono>
#include "parameters.h"
#include "esostrategy.h"
#include "cmasolutions.h"
#include <libcmaes/parameters.h>
#include <libcmaes/esostrategy.h>
#include <libcmaes/cmasolutions.h>

/* algorithms */
enum {
Expand Down
6 changes: 3 additions & 3 deletions src/esostrategy.h → include/libcmaes/esostrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#ifndef ESOSTRATEGY_H
#define ESOSTRATEGY_H

#include "eo_matrix.h" // to include Eigen everywhere.
#include "candidate.h"
#include "eigenmvn.h"
#include <libcmaes/eo_matrix.h> // to include Eigen everywhere.
#include <libcmaes/candidate.h>
#include <libcmaes/eigenmvn.h>
#include <random>

namespace libcmaes
Expand Down
6 changes: 3 additions & 3 deletions src/genopheno.h → include/libcmaes/genopheno.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#ifndef GENOPHENO_H
#define GENOPHENO_H

#include "noboundstrategy.h"
#include "pwq_bound_strategy.h"
#include "scaling.h"
#include <libcmaes/noboundstrategy.h>
#include <libcmaes/pwq_bound_strategy.h>
#include <libcmaes/scaling.h>
#include <vector>

namespace libcmaes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef IPOPCMASTRATEGY_H
#define IPOPCMASTRATEGY_H

#include "cmastrategy.h"
#include <libcmaes/cmastrategy.h>

namespace libcmaes
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/llogging.h → include/libcmaes/llogging.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef LLOGGING_H
#define LLOGGING_H

#include "libcmaes_config.h"
#include <libcmaes/libcmaes_config.h>

#ifdef HAVE_GLOG // HAVE_LIB_GLOG
#include <glog/logging.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef NOBOUNDSTRATEGY_H
#define NOBOUNDSTRATEGY_H

#include "eo_matrix.h"
#include <libcmaes/eo_matrix.h>
#include <vector>
#include <limits>

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/parameters.h → include/libcmaes/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#ifndef PARAMETERS_H
#define PARAMETERS_H

#include "eo_matrix.h"
#include "genopheno.h"
#include "llogging.h"
#include <libcmaes/eo_matrix.h>
#include <libcmaes/genopheno.h>
#include <libcmaes/llogging.h>
#include <string>
#include <cmath>
#include <limits>
Expand Down
2 changes: 1 addition & 1 deletion src/pli.h → include/libcmaes/pli.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef PLI_H
#define PLI_H

#include "eo_matrix.h"
#include <libcmaes/eo_matrix.h>
#include <vector>

namespace libcmaes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#ifndef PWQ_BOUND_STRATEGY_H
#define PWQ_BOUND_STRATEGY_H

#include "eo_matrix.h"
#include "cmaes_export.h"
#include <libcmaes/eo_matrix.h>
#include <libcmaes/cmaes_export.h>
#include <vector>

namespace libcmaes
Expand Down
Loading

0 comments on commit 70a03e0

Please sign in to comment.