diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-16 16:01:05 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-16 16:01:05 (GMT) |
commit | f483e48d2a2f3361dcf3c60096bbfe9975f90ddf (patch) | |
tree | 2909a53a3efb79bf633ba0be2fa93d7c7b68181f /Source/cmLoadCommandCommand.cxx | |
parent | 4102949bf95eee1ce88544fafdf80439aece85b2 (diff) | |
download | CMake-f483e48d2a2f3361dcf3c60096bbfe9975f90ddf.zip CMake-f483e48d2a2f3361dcf3c60096bbfe9975f90ddf.tar.gz CMake-f483e48d2a2f3361dcf3c60096bbfe9975f90ddf.tar.bz2 |
ENH: Cleanup DynamicLoader so that the symbols have more consistent names, start using dynamic loader from kwsys in CMake
Diffstat (limited to 'Source/cmLoadCommandCommand.cxx')
-rw-r--r-- | Source/cmLoadCommandCommand.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 4fc9b7f..4ade053 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -18,6 +18,9 @@ #include "cmCPluginAPI.h" #include "cmCPluginAPI.cxx" #include "cmDynamicLoader.h" + +#include <cmsys/DynamicLoader.hxx> + #include <signal.h> extern "C" void TrapsForSignalsCFunction(int sig); @@ -254,12 +257,13 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args) } // try loading the shared library / dll - cmLibHandle lib = cmDynamicLoader::OpenLibrary(fullPath.c_str()); + cmsys::DynamicLoader::LibraryHandle lib + = cmDynamicLoader::OpenLibrary(fullPath.c_str()); if(!lib) { std::string err = "Attempt to load the library "; err += fullPath + " failed."; - const char* error = cmDynamicLoader::LastError(); + const char* error = cmsys::DynamicLoader::LastError(); if ( error ) { err += " Additional error info is:\n"; @@ -276,14 +280,14 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args) std::string initFuncName = args[0] + "Init"; CM_INIT_FUNCTION initFunction = (CM_INIT_FUNCTION) - cmDynamicLoader::GetSymbolAddress(lib, initFuncName.c_str()); + cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str()); if ( !initFunction ) { initFuncName = "_"; initFuncName += args[0]; initFuncName += "Init"; initFunction = (CM_INIT_FUNCTION)( - cmDynamicLoader::GetSymbolAddress(lib, initFuncName.c_str())); + cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str())); } // if the symbol is found call it to set the name on the // function blocker |