Skip to content

Commit

Permalink
Finalize removal of liblog4cxx dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
bchretien committed Oct 21, 2017
1 parent b968ddc commit c5ce607
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 43 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Expand Up @@ -215,11 +215,6 @@ ENDIF()
SET(BOOST_COMPONENTS date_time filesystem system unit_test_framework)
SEARCH_FOR_BOOST()
SEARCH_FOR_EIGEN("eigen3 >= 3.2.5")
IF(WIN32)
ADD_REQUIRED_DEPENDENCY("liblog4cxx >= 0.10.0" "liblog4cxx_d >= 0.10.0")
ELSE()
ADD_REQUIRED_DEPENDENCY("liblog4cxx >= 0.10.0")
ENDIF()

# Libtool dynamic loading
# This project does not use Libtool directly but still uses ltdl for
Expand Down
2 changes: 0 additions & 2 deletions README.md
Expand Up @@ -75,7 +75,6 @@ RobOptim uses the following tools:
* [Doxygen][] a documentation generation tool
* [Boost][] C++ library
* [Eigen][] (>= 3.2) C++ template library for linear algebra
* [log4cxx][] logging framework
* [Libtool][] and its ltdl library for portable plug-in management
* a C++03 compliant modern C++ compiler such as GCC or clang

Expand Down Expand Up @@ -213,6 +212,5 @@ Development Snapshots ( *unstable* ):
[Eigen]: http://eigen.tuxfamily.org/
[Git]: http://git-scm.com/
[Libtool]: https://www.gnu.org/software/libtool/
[log4cxx]: https://logging.apache.org/log4cxx/
[pkg-config]: http://www.freedesktop.org/wiki/Software/pkg-config/
[RobotPkg]: http://robotpkg.openrobots.org/
25 changes: 6 additions & 19 deletions include/roboptim/core/debug.hh
Expand Up @@ -22,7 +22,6 @@
# include <boost/config.hpp>
# include <boost/current_function.hpp>

# include <log4cxx/logger.h>
# include <roboptim/core/indent.hh>

// Note: the API is inspired by BOOST_ASSERT. We reimplement the high-level
Expand Down Expand Up @@ -81,24 +80,12 @@ namespace roboptim
#define ROBOPTIM_ASSERT(expr) ROBOPTIM_ASSERT_INTERNAL(expr)
#define ROBOPTIM_ASSERT_MSG(expr,msg) ROBOPTIM_ASSERT_MSG_INTERNAL(expr, msg)

# define RoboptimCoreDebug(STATEMENT) \
LOG4CXX_DEBUG(log4cxx::Logger::getLogger("roboptim.core"), \
STATEMENT)

# define RoboptimCoreDout(cntrl, data) \
LOG4CXX_INFO(log4cxx::Logger::getLogger("roboptim.core"), \
data)

#define RoboptimCoreDoutFatal(cntrl, data) \
LOG4CXX_INFO(log4cxx::Logger::getLogger("roboptim.core"), \
data)

#define RoboptimCoreForAllDebugChannels(STATEMENT) \
LOG4CXX_INFO(log4cxx::Logger::getLogger("roboptim.core"), \
STATEMEMT)
#define RoboptimCoreForAllDebugObjects(STATEMENT) \
LOG4CXX_INFO(log4cxx::Logger::getLogger("roboptim.core"), \
STATEMENT)
// Legacy log4cxx macros
# define RoboptimCoreDebug(STATEMENT)
# define RoboptimCoreDout(cntrl, data)
# define RoboptimCoreDoutFatal(cntrl, data)
# define RoboptimCoreForAllDebugChannels(STATEMENT)
# define RoboptimCoreForAllDebugObjects(STATEMENT)

# ifdef NDEBUG
# define ROBOPTIM_DEBUG_ONLY(X)
Expand Down
2 changes: 0 additions & 2 deletions include/roboptim/core/differentiable-function.hh
Expand Up @@ -22,8 +22,6 @@
# include <stdexcept>
# include <utility>

# include <log4cxx/logger.h>

# include <roboptim/core/fwd.hh>

# include <roboptim/core/function.hh>
Expand Down
2 changes: 0 additions & 2 deletions include/roboptim/core/function.hh
Expand Up @@ -33,8 +33,6 @@
# include <Eigen/Dense>
# include <Eigen/Sparse>

# include <log4cxx/logger.h>

# include <roboptim/core/fwd.hh>
# include <roboptim/core/indent.hh>
# include <roboptim/core/portability.hh>
Expand Down
2 changes: 0 additions & 2 deletions include/roboptim/core/generic-solver.hh
Expand Up @@ -30,8 +30,6 @@
# include <boost/variant/variant.hpp>
# include <boost/utility.hpp>

# include <log4cxx/logger.h>

# include <roboptim/core/fwd.hh>
# include <roboptim/core/problem.hh>
# include <roboptim/core/result.hh>
Expand Down
2 changes: 0 additions & 2 deletions include/roboptim/core/twice-differentiable-function.hh
Expand Up @@ -22,8 +22,6 @@
# include <stdexcept>
# include <utility>

# include <log4cxx/logger.h>

# include <roboptim/core/fwd.hh>
# include <roboptim/core/differentiable-function.hh>

Expand Down
6 changes: 0 additions & 6 deletions src/CMakeLists.txt
Expand Up @@ -52,7 +52,6 @@ IF(GENERATE_COVERAGE)
TARGET_COMPILE_OPTIONS(roboptim-core PRIVATE "--coverage")
SET_TARGET_PROPERTIES(roboptim-core PROPERTIES LINK_FLAGS "--coverage")
ENDIF()
PKG_CONFIG_USE_DEPENDENCY(roboptim-core liblog4cxx)

# Add required libs to pkg-config file.
SET(ROBOPTIM_API_BOOST_LIBRARIES date_time system filesystem)
Expand Down Expand Up @@ -88,7 +87,6 @@ INSTALL(TARGETS roboptim-core
# Dummy plug-in.
ADD_LIBRARY(roboptim-core-plugin-dummy MODULE dummy.cc)
ADD_DEPENDENCIES(roboptim-core-plugin-dummy roboptim-core)
PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-dummy liblog4cxx)
TARGET_LINK_LIBRARIES(roboptim-core-plugin-dummy roboptim-core)
SET_TARGET_PROPERTIES(roboptim-core-plugin-dummy PROPERTIES PREFIX "")

Expand All @@ -101,7 +99,6 @@ INSTALL(TARGETS roboptim-core-plugin-dummy DESTINATION ${PLUGINDIR})
# Dummy-sparse plug-in.
ADD_LIBRARY(roboptim-core-plugin-dummy-sparse MODULE dummy-sparse.cc)
ADD_DEPENDENCIES(roboptim-core-plugin-dummy-sparse roboptim-core)
PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-dummy-sparse liblog4cxx)
TARGET_LINK_LIBRARIES(roboptim-core-plugin-dummy-sparse roboptim-core)
SET_TARGET_PROPERTIES(roboptim-core-plugin-dummy-sparse PROPERTIES PREFIX "")

Expand All @@ -114,7 +111,6 @@ INSTALL(TARGETS roboptim-core-plugin-dummy-sparse DESTINATION ${PLUGINDIR})
# Dummy-laststate plug-in.
ADD_LIBRARY(roboptim-core-plugin-dummy-laststate MODULE dummy-laststate.cc)
ADD_DEPENDENCIES(roboptim-core-plugin-dummy-laststate roboptim-core)
PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-dummy-laststate liblog4cxx)
TARGET_LINK_LIBRARIES(roboptim-core-plugin-dummy-laststate roboptim-core)
SET_TARGET_PROPERTIES(roboptim-core-plugin-dummy-laststate PROPERTIES PREFIX "")

Expand All @@ -126,7 +122,6 @@ ENDIF()
# Dummy-laststate plug-in for differentiable sparse functions.
ADD_LIBRARY(roboptim-core-plugin-dummy-d-sparse-laststate MODULE dummy-d-sparse-laststate.cc)
ADD_DEPENDENCIES(roboptim-core-plugin-dummy-d-sparse-laststate roboptim-core)
PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-dummy-d-sparse-laststate liblog4cxx)
TARGET_LINK_LIBRARIES(roboptim-core-plugin-dummy-d-sparse-laststate roboptim-core)
SET_TARGET_PROPERTIES(roboptim-core-plugin-dummy-d-sparse-laststate PROPERTIES PREFIX "")

Expand All @@ -138,7 +133,6 @@ ENDIF()
# Dummy-td plug-in.
ADD_LIBRARY(roboptim-core-plugin-dummy-td MODULE dummy-td.cc)
ADD_DEPENDENCIES(roboptim-core-plugin-dummy-td roboptim-core)
PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-dummy-td liblog4cxx)
TARGET_LINK_LIBRARIES(roboptim-core-plugin-dummy-td roboptim-core)
SET_TARGET_PROPERTIES(roboptim-core-plugin-dummy-td PROPERTIES PREFIX "")

Expand Down
1 change: 0 additions & 1 deletion src/generic-solver.cc
Expand Up @@ -18,7 +18,6 @@
#include "debug.hh"

#include <cassert>
#include <log4cxx/logger.h>
#include "roboptim/core/generic-solver.hh"

namespace roboptim
Expand Down
1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Expand Up @@ -66,7 +66,6 @@ MACRO(ROBOPTIM_CORE_TEST NAME)
GENERATE_MSVC_DOT_USER_FILE(${NAME})

TARGET_LINK_LIBRARIES(${NAME} roboptim-core)
PKG_CONFIG_USE_DEPENDENCY(${NAME} liblog4cxx)
IF(NOT LTDL_FOUND)
TARGET_LINK_LIBRARIES(${NAME} ltdl)
ELSE()
Expand Down
2 changes: 1 addition & 1 deletion tests/shared-tests
Submodule shared-tests updated 6 files
+0 −10 common.hh
+8 −5 fixture.hh
+1 −1 roboptim/CMakeLists.txt
+126 −0 roboptim/simple-square.cc
+10 −4 tests.cmake
+47 −18 util.hh

0 comments on commit c5ce607

Please sign in to comment.