enable debug options
parent
5d41f5bdfa
commit
0c590c513e
10
configure.ac
10
configure.ac
|
@ -13,6 +13,16 @@ AC_CONFIG_SRCDIR([wrap/wrap.cpp])
|
||||||
AC_CANONICAL_HOST # needs to be called at some point earlier
|
AC_CANONICAL_HOST # needs to be called at some point earlier
|
||||||
AM_CONDITIONAL([DARWIN], [case $host_os in darwin*) true;; *) false;; esac])
|
AM_CONDITIONAL([DARWIN], [case $host_os in darwin*) true;; *) false;; esac])
|
||||||
|
|
||||||
|
# enable debug variable
|
||||||
|
AC_ARG_ENABLE([debug],
|
||||||
|
[ --enable-debug Turn on debugging],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) debug=true ;;
|
||||||
|
no) debug=false ;;
|
||||||
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
|
||||||
|
esac],[debug=false])
|
||||||
|
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
|
|
@ -142,7 +142,6 @@ testVSLAMFactor_LDADD = libgtsam.la
|
||||||
# The header files will be installed in ~/include/gtsam
|
# The header files will be installed in ~/include/gtsam
|
||||||
headers = gtsam.h Value.h Factor.h LinearFactorSet.h Point2Prior.h Simulated2DOdometry.h Simulated2DMeasurement.h smallExample.h $(sources:.cpp=.h)
|
headers = gtsam.h Value.h Factor.h LinearFactorSet.h Point2Prior.h Simulated2DOdometry.h Simulated2DMeasurement.h smallExample.h $(sources:.cpp=.h)
|
||||||
|
|
||||||
|
|
||||||
# create both dynamic and static libraries
|
# create both dynamic and static libraries
|
||||||
AM_CXXFLAGS = -I$(boost) -fPIC
|
AM_CXXFLAGS = -I$(boost) -fPIC
|
||||||
lib_LTLIBRARIES = libgtsam.la
|
lib_LTLIBRARIES = libgtsam.la
|
||||||
|
@ -150,6 +149,11 @@ libgtsam_la_SOURCES = $(sources)
|
||||||
libgtsam_la_CPPFLAGS = $(AM_CXXFLAGS)
|
libgtsam_la_CPPFLAGS = $(AM_CXXFLAGS)
|
||||||
libgtsam_la_LDFLAGS = -version-info $(version) -L../colamd -lcolamd #-lboost_serialization-mt
|
libgtsam_la_LDFLAGS = -version-info $(version) -L../colamd -lcolamd #-lboost_serialization-mt
|
||||||
|
|
||||||
|
# enable debug if --enable-debug is set in configure
|
||||||
|
if DEBUG
|
||||||
|
AM_CXXFLAGS += -g
|
||||||
|
endif
|
||||||
|
|
||||||
# install the header files
|
# install the header files
|
||||||
include_HEADERS = $(headers)
|
include_HEADERS = $(headers)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue