CMA-ES / libcmaes

libcmaes is a multithreaded C++11 library with Python bindings for high performance blackbox stochastic optimization using the CMA-ES algorithm for Covariance Matrix Adaptation Evolution Strategy
Other
321 stars 78 forks source link

Supporting new gflags library #108

Closed agrayver closed 9 years ago

agrayver commented 9 years ago

gflags 2.1.1 does not seem to have namespace "google" anymore, instead it was renamed to "gflags". Simply replacing former with latter in all test/example files solved the problem.

beniz commented 9 years ago

A well known annoyance by gflags indeed! And a good opportunity to tackle it once and for all.

There's no good ways of fixing this, but a 'hack' used by others as well (http://caffe.berkeleyvision.org/doxygen/common_8hpp_source.html).

The code is now ready for gflags 2.1 but it is recommended to use the following in external programs that use gflags:

#include <gflags/gflags.h>
#ifndef GFLAGS_GFLAGS_H_
namespace gflags = google;
#endif  // GFLAGS_GFLAGS_H_

gflags::ParseCommandLineFlags(&argc, &argv, true);
beniz commented 9 years ago

This is active on 'dev' branch.