[Fawkes Git] branch/master: mongodb: fix compilation on FreeBSD adding regex Boost lib

Tim Niemueller niemueller at kbsg.rwth-aachen.de
Thu Jan 7 10:35:51 CET 2016


Changes have been pushed for the project "Fawkes Robotics Software Framework".

Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, master has been updated
        to  0627fb6ba1d5e3808f09c81e0634ff7b5d013e69 (commit)
      from  95a6dd89b3b882db7cb90e98994b9362dd2fc54e (commit)

http://git.fawkesrobotics.org/fawkes.git/master

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- *Log* ---------------------------------------------------------------
commit 0627fb6ba1d5e3808f09c81e0634ff7b5d013e69
Author:     Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
AuthorDate: Thu Jan 7 10:30:56 2016 +0100
Commit:     Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
CommitDate: Thu Jan 7 10:30:56 2016 +0100

    mongodb: fix compilation on FreeBSD adding regex Boost lib
    
    On FreeBSD the Boost regex library must be linked (likely due to
    mongo-cxx-driver being built statically).
    
    Additionally move a test for the mongo-cxx-driver version to assure that
    the intended Boost libraries are tried.

http://git.fawkesrobotics.org/fawkes.git/commit/0627fb6
http://trac.fawkesrobotics.org/changeset/0627fb6

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 src/plugins/mongodb/mongodb.mk |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)


- *Diffs* -------------------------------------------------------------

- *commit* 0627fb6ba1d5e3808f09c81e0634ff7b5d013e69 - - - - - - - - - -
Author:  Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
Date:    Thu Jan 7 10:30:56 2016 +0100
Subject: mongodb: fix compilation on FreeBSD adding regex Boost lib

 src/plugins/mongodb/mongodb.mk |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/mongodb/mongodb.mk b/src/plugins/mongodb/mongodb.mk
index 4320004..bde0fc9 100644
--- a/src/plugins/mongodb/mongodb.mk
+++ b/src/plugins/mongodb/mongodb.mk
@@ -18,15 +18,18 @@ include $(BUILDSYSDIR)/boost.mk
 MONGO_CXX_DRIVER_BOOST_LIBS = thread system
 
 ifneq ($(wildcard /usr/include/mongo/client/dbclient.h /usr/local/include/mongo/client/dbclient.h),)
-  ifeq ($(call boost-have-libs,$(MONGO_CXX_DRIVER_BOOST_LIBS)),1)
-    HAVE_MONGODB = 1
-    CFLAGS_MONGODB  = -DHAVE_MONGODB $(CFLAGS_CPP11)
-    ifneq ($(wildcard $(SYSROOT)/usr/include/mongo/version.h $(SYSROOT)/usr/local/include/mongo/version.h),)
-      CFLAGS_MONGODB += -DHAVE_MONGODB_VERSION_H
-    else
-      MONGO_CXX_DRIVER_BOOST_LIBS += regex filesystem
+  ifneq ($(wildcard $(SYSROOT)/usr/include/mongo/version.h $(SYSROOT)/usr/local/include/mongo/version.h),)
+    CFLAGS_MONGODB_VERSION_H += -DHAVE_MONGODB_VERSION_H
+    ifeq ($(OS),FreeBSD)
+      MONGO_CXX_DRIVER_BOOST_LIBS += regex
     endif
+  else
+    MONGO_CXX_DRIVER_BOOST_LIBS += regex filesystem
+  endif
 
+  ifeq ($(call boost-have-libs,$(MONGO_CXX_DRIVER_BOOST_LIBS)),1)
+    HAVE_MONGODB = 1
+    CFLAGS_MONGODB  = -DHAVE_MONGODB $(CFLAGS_CPP11) $(CFLAGS_MONGODB_VERSION_H)
     LDFLAGS_MONGODB = -lmongoclient -lm -lpthread \
 		                  $(call boost-libs-ldflags,$(MONGO_CXX_DRIVER_BOOST_LIBS))
 




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org


More information about the fawkes-commits mailing list