Commit c5add9e3 authored by Francois Bleibel's avatar Francois Bleibel
Browse files

Port Olivier's changes in SOT commit eacfd9544ca

parent 547c0b81
......@@ -54,6 +54,7 @@ IF(\"${CMAKE_BUILD_TYPE}\" STREQUAL \"\" )
ELSE(\"${CMAKE_BUILD_TYPE}\" STREQUAL \"\" )
IF(${CMAKE_BUILD_TYPE} STREQUAL DEBUG)
SET(${PROJECT_NAME}_CXXFLAGS ${CMAKE_CXX_FLAGS_DEBUG}) # Useless since CXX_FLAGS, not CXXFLAGS.
ADD_DEFINITIONS(-DVP_DEBUG -DVP_DEBUG_MODE=15)
ENDIF(${CMAKE_BUILD_TYPE} STREQUAL DEBUG)
IF(${CMAKE_BUILD_TYPE} STREQUAL RELEASE)
SET(${PROJECT_NAME}_CXXFLAGS ${CMAKE_CXX_FLAGS_RELEASE}) # Same here.
......
......@@ -2,14 +2,15 @@
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Relative path conversion top directories.
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/blue/sot-devel/dynamicGraph")
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/blue/sot-devel/dynamicGraph")
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/blue/sot-devel/dg")
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/blue/sot-devel/dg")
# Force unix paths in dependencies.
SET(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file search paths:
SET(CMAKE_C_INCLUDE_PATH
"/usr/local/include"
)
SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})
SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})
......
......@@ -3,6 +3,12 @@ SET(CMAKE_DEPENDS_LANGUAGES
)
# The set of files for implicit dependencies of each language:
# Preprocessor definitions for this target.
SET(CMAKE_TARGET_DEFINITIONS
"HAVE_LIBBOOST_THREAD"
"HAVE_PTHREAD"
)
# Targets to which this target links.
SET(CMAKE_TARGET_LINKED_INFO_FILES
)
......@@ -38,19 +38,19 @@ RM = /usr/bin/cmake -E remove -f
CMAKE_EDIT_COMMAND = /usr/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/blue/sot-devel/dynamicGraph
CMAKE_SOURCE_DIR = /home/blue/sot-devel/dg
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/blue/sot-devel/dynamicGraph
CMAKE_BINARY_DIR = /home/blue/sot-devel/dg
# Utility rule file for documentation.
doc/CMakeFiles/documentation: doc/html/index.html
doc/html/index.html:
$(CMAKE_COMMAND) -E cmake_progress_report /home/blue/sot-devel/dynamicGraph/CMakeFiles $(CMAKE_PROGRESS_1)
$(CMAKE_COMMAND) -E cmake_progress_report /home/blue/sot-devel/dg/CMakeFiles $(CMAKE_PROGRESS_1)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold "Generating html/index.html"
cd /home/blue/sot-devel/dynamicGraph/doc && /usr/bin/doxygen "/home/blue/sot-devel/dynamicGraph/doc/package.dox"
cd /home/blue/sot-devel/dg/doc && /usr/bin/doxygen "/home/blue/sot-devel/dg/doc/package.dox"
documentation: doc/CMakeFiles/documentation
documentation: doc/html/index.html
......@@ -62,10 +62,10 @@ doc/CMakeFiles/documentation.dir/build: documentation
.PHONY : doc/CMakeFiles/documentation.dir/build
doc/CMakeFiles/documentation.dir/clean:
cd /home/blue/sot-devel/dynamicGraph/doc && $(CMAKE_COMMAND) -P CMakeFiles/documentation.dir/cmake_clean.cmake
cd /home/blue/sot-devel/dg/doc && $(CMAKE_COMMAND) -P CMakeFiles/documentation.dir/cmake_clean.cmake
.PHONY : doc/CMakeFiles/documentation.dir/clean
doc/CMakeFiles/documentation.dir/depend:
cd /home/blue/sot-devel/dynamicGraph && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/blue/sot-devel/dynamicGraph /home/blue/sot-devel/dynamicGraph/doc /home/blue/sot-devel/dynamicGraph /home/blue/sot-devel/dynamicGraph/doc /home/blue/sot-devel/dynamicGraph/doc/CMakeFiles/documentation.dir/DependInfo.cmake --color=$(COLOR)
cd /home/blue/sot-devel/dg && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/blue/sot-devel/dg /home/blue/sot-devel/dg/doc /home/blue/sot-devel/dg /home/blue/sot-devel/dg/doc /home/blue/sot-devel/dg/doc/CMakeFiles/documentation.dir/DependInfo.cmake --color=$(COLOR)
.PHONY : doc/CMakeFiles/documentation.dir/depend
......@@ -42,10 +42,10 @@ RM = /usr/bin/cmake -E remove -f
CMAKE_EDIT_COMMAND = /usr/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/blue/sot-devel/dynamicGraph
CMAKE_SOURCE_DIR = /home/blue/sot-devel/dg
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/blue/sot-devel/dynamicGraph
CMAKE_BINARY_DIR = /home/blue/sot-devel/dg
#=============================================================================
# Targets provided globally by CMake.
......@@ -111,16 +111,26 @@ rebuild_cache:
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# Special rule for the target test
test:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
/usr/bin/ctest --force-new-ctest-process $(ARGS)
.PHONY : test
# Special rule for the target test
test/fast: test
.PHONY : test/fast
# The main all target
all: cmake_check_build_system
cd /home/blue/sot-devel/dynamicGraph && $(CMAKE_COMMAND) -E cmake_progress_start /home/blue/sot-devel/dynamicGraph/CMakeFiles /home/blue/sot-devel/dynamicGraph/doc/CMakeFiles/progress.marks
cd /home/blue/sot-devel/dynamicGraph && $(MAKE) -f CMakeFiles/Makefile2 doc/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/blue/sot-devel/dynamicGraph/CMakeFiles 0
cd /home/blue/sot-devel/dg && $(CMAKE_COMMAND) -E cmake_progress_start /home/blue/sot-devel/dg/CMakeFiles /home/blue/sot-devel/dg/doc/CMakeFiles/progress.marks
cd /home/blue/sot-devel/dg && $(MAKE) -f CMakeFiles/Makefile2 doc/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/blue/sot-devel/dg/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/blue/sot-devel/dynamicGraph && $(MAKE) -f CMakeFiles/Makefile2 doc/clean
cd /home/blue/sot-devel/dg && $(MAKE) -f CMakeFiles/Makefile2 doc/clean
.PHONY : clean
# The main clean target
......@@ -129,22 +139,22 @@ clean/fast: clean
# Prepare targets for installation.
preinstall: all
cd /home/blue/sot-devel/dynamicGraph && $(MAKE) -f CMakeFiles/Makefile2 doc/preinstall
cd /home/blue/sot-devel/dg && $(MAKE) -f CMakeFiles/Makefile2 doc/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/blue/sot-devel/dynamicGraph && $(MAKE) -f CMakeFiles/Makefile2 doc/preinstall
cd /home/blue/sot-devel/dg && $(MAKE) -f CMakeFiles/Makefile2 doc/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/blue/sot-devel/dynamicGraph && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
cd /home/blue/sot-devel/dg && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
doc/CMakeFiles/documentation.dir/rule:
cd /home/blue/sot-devel/dynamicGraph && $(MAKE) -f CMakeFiles/Makefile2 doc/CMakeFiles/documentation.dir/rule
cd /home/blue/sot-devel/dg && $(MAKE) -f CMakeFiles/Makefile2 doc/CMakeFiles/documentation.dir/rule
.PHONY : doc/CMakeFiles/documentation.dir/rule
# Convenience name for target.
......@@ -153,7 +163,7 @@ documentation: doc/CMakeFiles/documentation.dir/rule
# fast build rule for target.
documentation/fast:
cd /home/blue/sot-devel/dynamicGraph && $(MAKE) -f doc/CMakeFiles/documentation.dir/build.make doc/CMakeFiles/documentation.dir/build
cd /home/blue/sot-devel/dg && $(MAKE) -f doc/CMakeFiles/documentation.dir/build.make doc/CMakeFiles/documentation.dir/build
.PHONY : documentation/fast
# Help Target
......@@ -169,6 +179,7 @@ help:
@echo "... install/strip"
@echo "... list_install_components"
@echo "... rebuild_cache"
@echo "... test"
.PHONY : help
......@@ -180,6 +191,6 @@ help:
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/blue/sot-devel/dynamicGraph && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
cd /home/blue/sot-devel/dg && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
# Install script for directory: /home/blue/sot-devel/dynamicGraph/doc
# Install script for directory: /home/blue/sot-devel/dg/doc
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
......@@ -12,7 +12,7 @@ IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
ELSE(BUILD_TYPE)
SET(CMAKE_INSTALL_CONFIG_NAME "RELEASE")
SET(CMAKE_INSTALL_CONFIG_NAME "")
ENDIF(BUILD_TYPE)
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
......@@ -33,14 +33,14 @@ IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
FILE(INSTALL DESTINATION "/home/blue/sot-lib/share/doc/dynamic-graph" TYPE DIRECTORY FILES "/home/blue/sot-devel/dynamicGraph/doc/html")
FILE(INSTALL DESTINATION "/home/blue/sot-lib/share/doc/dynamic-graph" TYPE DIRECTORY FILES "/home/blue/sot-devel/dg/doc/html")
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
FILE(INSTALL DESTINATION "/home/blue/sot-lib/share/doc/dynamic-graph/html" TYPE FILE FILES "/home/blue/sot-devel/dynamicGraph/doc/dynamicGraph.doxytag")
FILE(INSTALL DESTINATION "/home/blue/sot-lib/share/doc/dynamic-graph/html" TYPE FILE FILES "/home/blue/sot-devel/dg/doc/dynamic-graph.doxytag")
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
FILE(INSTALL DESTINATION "/home/blue/sot-lib/share/doc/dynamic-graph/html" TYPE DIRECTORY FILES "/home/blue/sot-devel/dynamicGraph/doc/pictures")
FILE(INSTALL DESTINATION "/home/blue/sot-lib/share/doc/dynamic-graph/html" TYPE DIRECTORY FILES "/home/blue/sot-devel/dg/doc/pictures")
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
......@@ -162,7 +162,7 @@ TAGFILES = \
/html/dynamicsJRLJapan.doxytag=/html \
/html/hrp2Dynamics.doxytag=/html \
/html/walkGenJrl.doxytag=/html
GENERATE_TAGFILE = dynamicGraph.doxytag
GENERATE_TAGFILE = dynamic-graph.doxytag
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
......@@ -180,7 +180,7 @@ SEARCHENGINE = YES
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "dynamicGraph library"
PROJECT_NAME = "dynamic-graph library"
PROJECT_NUMBER = 1.0.0
#---------------------------------------------------------------------------
......@@ -210,13 +210,13 @@ SHOW_DIRECTORIES = NO
#---------------------------------------------------------------------------
FILE_PATTERNS = *.h *.idl
EXCLUDE_PATTERNS =
INPUT = /home/blue/sot-devel/dynamicGraph/src \
/home/blue/sot-devel/dynamicGraph/doc/additionalDoc
INPUT = /home/blue/sot-devel/dg/include \
/home/blue/sot-devel/dg/doc/additionalDoc
#---------------------------------------------------------------------------
# configuration options related to inserting images
#---------------------------------------------------------------------------
IMAGE_PATH = /home/blue/sot-devel/dynamicGraph/doc/figures
IMAGE_PATH = /home/blue/sot-devel/dg/doc/figures
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
......@@ -233,9 +233,9 @@ VERBATIM_HEADERS = NO
# configuration options related to the HTML output
#---------------------------------------------------------------------------
HTML_OUTPUT = html
HTML_STYLESHEET = /home/blue/sot-devel/dynamicGraph/doc/package.css
HTML_HEADER = /home/blue/sot-devel/dynamicGraph/doc/header.html
HTML_FOOTER = /home/blue/sot-devel/dynamicGraph/doc/footer.html
HTML_STYLESHEET = /home/blue/sot-devel/dg/doc/package.css
HTML_HEADER = /home/blue/sot-devel/dg/doc/header.html
HTML_FOOTER = /home/blue/sot-devel/dg/doc/footer.html
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
......
......@@ -104,7 +104,7 @@ class DYNAMICGRAPH_EXPORT Interpreter
bool deregisterFunction( const std::string& funname );
/*! \brief Return the reference to the plugin loader. */
/*! \brief Set the reference of the plugin loader. */
void referencePluginLoader( PluginLoader* dl__ )
{ dlPtr = dl__; }
......
......@@ -97,7 +97,12 @@ class DYNAMICGRAPH_EXPORT PluginLoader
void addPlugin( const std::string& name, const std::string& dir="" );
/*! \brief Load the plugins previously added */
void loadPlugins( void );
/*! \brief Remove from the user memory the dynamic library related to the plugin. */
void unloadPlugin( const std::string& plugname );
/*! \brief Remove all the dynamic libraries related to the plugins.
For non-re-entrant plugins this method HAS TO be called. */
void unloadAllPlugins();
const std::map< std::string,std::string > getLoadedPluginNames( void )
{ return loadedPluginNames; }
......
......@@ -194,7 +194,7 @@ cmdLoadPlugin( const std::string& cmdLine, std::istringstream& cmdArg, std::ostr
dgDEBUG(25)<<"sotShell.dlPtr ="<< this->dlPtr <<endl;
dlPtr->loadPlugins();
dgDEBUG(25)<<"sotShell.dlPtr ="<< this->dlPtr <<endl;
}catch( ExceptionAbstract& e ) { dgDEBUG(5) << e << endl; throw e; }
}catch( ExceptionAbstract& e ) { dgDEBUG(5) << "ExceptionAbstract " << e << endl; throw e; }
}
else { os << "!! Dynamic loading functionalities not accessible through the shell." <<endl; }
}
......
......@@ -261,3 +261,51 @@ searchPlugin( const std::string& plugname )
return *plugFullName;
}
void PluginLoader::
unloadAllPlugins()
{
dgDEBUGIN( 15 );
PluginRefMap::KeyMap::iterator plugkey = pluginRefs->keyMap.begin();
while( plugkey!=pluginRefs->keyMap.end() )
{
#ifndef WIN32
const int errCode = dlclose(plugkey->second);
#else
const int errCode = FreeLibrary(plugkey->second);
#endif
if( errCode )
{
#ifndef WIN32
dgDEBUG(1) << "Error while unloading <" << plugkey->first <<"> : "
<< dlerror() <<endl;
#else
// Retrieve the system error message for the last-error code
LPTSTR pszMessage;
DWORD dwLastError = GetLastError();
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
dwLastError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&pszMessage,
0, NULL );
dgDEBUG(1) << "Error while unloading <" << plugkey->first <<"> : "
<< pszMessage <<endl;
LocalFree(pszMessage);
#endif
}
plugkey++;
}
//pluginRefs.erase( plugkey );
dgDEBUGOUT( 15 );
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment