From 664e43acff7dd8a540d908a08adb100ce0eadc1a Mon Sep 17 00:00:00 2001 From: Stephen Roderick Date: Mon, 25 Apr 2011 20:02:25 -0400 Subject: [PATCH] deployment: Cope with boost filesystem v3 changes --- deployment/ComponentLoader.cpp | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/deployment/ComponentLoader.cpp b/deployment/ComponentLoader.cpp index d79ec27..9011593 100644 --- a/deployment/ComponentLoader.cpp +++ b/deployment/ComponentLoader.cpp @@ -39,6 +39,13 @@ #include #endif +// deal with boost v2/v3 filename differences +#if (3==BOOST_FILESYSTEM_VERSION) +# define FILENAME() filename().string() +#else +# define FILENAME() filename() +#endif + using namespace RTT; using namespace std; using namespace boost::filesystem; @@ -140,7 +147,7 @@ void ComponentLoader::import( std::string const& path_list ) { log(Debug) << "Scanning file " << itr->path().string() << " ..."; if (is_regular_file(itr->status()) && itr->path().extension() == SO_EXT ) - loadInProcess( itr->path().string(), makeShortFilename(itr->path().filename() ), true); + loadInProcess( itr->path().string(), makeShortFilename(itr->path().FILENAME() ), true); else { if (!is_regular_file(itr->status())) log(Debug) << "not a regular file: ignored."<path().string() << " ..."; if (is_regular_file(itr->status()) && itr->path().extension() == SO_EXT ) - loadInProcess( itr->path().string(), makeShortFilename(itr->path().filename() ), true); + loadInProcess( itr->path().string(), makeShortFilename(itr->path().FILENAME() ), true); else { if (!is_regular_file(itr->status())) log(Debug) << "not a regular file: ignored."<::iterator it = paths.begin(); it != paths.end(); ++it) { -- 1.7.4.4