Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8066


Ignore:
Timestamp:
Mar 12, 2011, 11:54:35 PM (13 years ago)
Author:
landauf
Message:

added support for boost 1.46 and adjusted code to work with the 3rd version of boost::filesystem

Location:
code/branches/kicklib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/cmake/LibraryConfig.cmake

    r8057 r8066  
    143143
    144144##### Boost #####
    145 # Expand the next statement if newer boost versions than 1.36.1 are released
     145# Expand the next statement if newer boost versions are released
    146146SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0 1.38 1.38.0 1.39 1.39.0 1.40 1.40.0
    147                               1.41 1.41.0 1.42 1.42.0 1.43 1.43.0 1.44 1.44.0)
     147                              1.41 1.41.0 1.42 1.42.0 1.43 1.43.0 1.44 1.44.0
     148                              1.45 1.45.0 1.46 1.46.0 1.46.1)
    148149IF( NOT TARDIS )
    149150  FIND_PACKAGE(Boost 1.35 REQUIRED thread filesystem system date_time)
  • code/branches/kicklib/src/libraries/core/CorePrereqs.h

    r7960 r8066  
    258258namespace boost
    259259{
    260 #if (BOOST_VERSION < 104400)
     260#if BOOST_VERSION < 104400
    261261    namespace filesystem
    262262    {
     
    265265        typedef basic_path<std::string, path_traits> path;
    266266    }
    267 #else
     267#elif BOOST_VERSION < 104600
    268268    namespace filesystem2
    269269    {
     
    277277        using filesystem2::path_traits;
    278278        using filesystem2::path;
     279    }
     280#else
     281    namespace filesystem3
     282    {
     283        class path;
     284    }
     285    namespace filesystem
     286    {
     287        using filesystem3::path;
    279288    }
    280289#endif
  • code/branches/kicklib/src/libraries/core/GraphicsManager.cc

    r7948 r8066  
    243243        // Use backslash paths on Windows! file_string() already does that though.
    244244        for (unsigned int i = 0; i < plugins.size(); ++i)
     245#if BOOST_FILESYSTEM_VERSION < 3
    245246            ogreRoot_->loadPlugin((folder / plugins[i]).file_string());
     247#else
     248            ogreRoot_->loadPlugin((folder / plugins[i]).string());
     249#endif
    246250    }
    247251
  • code/branches/kicklib/src/libraries/core/PathConfig.cc

    r8058 r8066  
    5959#if (BOOST_VERSION == 103600)
    6060#  define BOOST_LEAF_FUNCTION filename
     61#elif (BOOST_FILESYSTEM_VERSION < 3)
     62#  define BOOST_LEAF_FUNCTION leaf
    6163#else
    62 #  define BOOST_LEAF_FUNCTION leaf
     64#  define BOOST_LEAF_FUNCTION path().filename().string
    6365#endif
    6466
     
    282284                    // We've found a helper file
    283285                    const std::string& library = filename.substr(0, filename.size() - moduleextensionlength);
     286#if BOOST_FILESYSTEM_VERSION < 3
    284287                    modulePaths.push_back((modulePath_ / library).file_string());
     288#else
     289                    modulePaths.push_back((modulePath_ / library).string());
     290#endif
    285291                }
    286292            }
  • code/branches/kicklib/src/libraries/core/command/ArgumentCompletionFunctions.cc

    r7401 r8066  
    5050#if (BOOST_VERSION == 103600)
    5151#  define BOOST_LEAF_FUNCTION filename
     52#  define BOOST_DICTIONARY_ENTRY_NAME string
     53#elif (BOOST_FILESYSTEM_VERSION < 3)
     54#  define BOOST_LEAF_FUNCTION leaf
     55#  define BOOST_DICTIONARY_ENTRY_NAME string
    5256#else
    53 #  define BOOST_LEAF_FUNCTION leaf
     57#  define BOOST_LEAF_FUNCTION path().filename().string
     58#  define BOOST_DICTIONARY_ENTRY_NAME path().string
    5459#endif
    5560
     
    257262                {
    258263                    if (boost::filesystem::is_directory(*file))
    259                         dirlist.push_back(ArgumentCompletionListElement(file->string() + '/', getLowercase(file->string()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
     264                        dirlist.push_back(ArgumentCompletionListElement(file->BOOST_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));
    260265                    else
    261                         filelist.push_back(ArgumentCompletionListElement(file->string(), getLowercase(file->string()), file->BOOST_LEAF_FUNCTION()));
     266                        filelist.push_back(ArgumentCompletionListElement(file->BOOST_DICTIONARY_ENTRY_NAME(), getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()), file->BOOST_LEAF_FUNCTION()));
    262267                    ++file;
    263268                }
Note: See TracChangeset for help on using the changeset viewer.