diff options
author | Tobias Markmann <tm@ayena.de> | 2017-02-17 17:15:41 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-02-22 10:54:22 (GMT) |
commit | eea861301be0bf3e3f5db6cfc3cada38d133fef2 (patch) | |
tree | 3c2aa07ce3724a73ce2124832bee6b8c7884c9df /Swiften/SConscript | |
parent | 80801aaeba2d29e3a375a01d782cf081e778dfaf (diff) | |
download | swift-eea861301be0bf3e3f5db6cfc3cada38d133fef2.zip swift-eea861301be0bf3e3f5db6cfc3cada38d133fef2.tar.bz2 |
Add LRUCache utility class to Swiften
This implements a simple lookup cache with least recently used
replacement strategy.
This also adds Boost.MultiIndex from version 1.56 to 3rdParty.
Test-Information:
Added some unit tests for LRUCache, which pass on macOS 10.12.3
with clang-5.0
Change-Id: I0567945b1197d3fe786bf9d82fdb5e755743b975
Diffstat (limited to 'Swiften/SConscript')
-rw-r--r-- | Swiften/SConscript | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Swiften/SConscript b/Swiften/SConscript index a8fb88a..1103362 100644 --- a/Swiften/SConscript +++ b/Swiften/SConscript @@ -341,60 +341,61 @@ if env["SCONS_STAGE"] == "build" : myenv.Append(LINKFLAGS = ["-Wl,-install_name,${SHLIBPREFIX}Swiften.${SWIFTEN_VERSION_MAJOR}${SHLIBSUFFIX}", "-Wl,-compatibility_version,${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}", "-Wl,-current_version,${SWIFTEN_VERSION_MAJOR}.${SWIFTEN_VERSION_MINOR}"]) elif myenv["PLATFORM"] == "win32" : res_env = myenv.Clone() res_env.Append(CPPDEFINES = [ ("SWIFTEN_LIBRARY_FILE", "\"\\\"${SWIFTEN_LIBRARY_FILE}\\\"\""), ("SWIFTEN_COPYRIGHT_YEAR", "\"\\\"2010-%s\\\"\"" % str(time.localtime()[0])), ("SWIFTEN_VERSION_MAJOR", "${SWIFTEN_VERSION_MAJOR}"), ("SWIFTEN_VERSION_MINOR", "${SWIFTEN_VERSION_MINOR}"), ("SWIFTEN_VERSION_PATCH", "${SWIFTEN_VERSION_PATCH}"), ]) res = res_env.RES("Swiften.rc") # For some reason, SCons isn't picking up the dependency correctly # Adding it explicitly until i figure out why res_env.Depends(res, "Version.h") sources += res swiften_lib = myenv.SwiftenLibrary(swiften_env["SWIFTEN_LIBRARY_FILE"], sources + swiften_env["SWIFTEN_OBJECTS"]) def symlink(env, target, source) : if os.path.exists(str(target[0])) : os.unlink(str(target[0])) os.symlink(source[0].get_contents(), str(target[0])) for alias in myenv["SWIFTEN_LIBRARY_ALIASES"] : myenv.Command(myenv.File(alias), [myenv.Value(swiften_lib[0].name), swiften_lib[0]], symlink) env.Append(UNITTEST_SOURCES = [ File("Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp"), File("Avatars/UnitTest/VCardAvatarManagerTest.cpp"), File("Avatars/UnitTest/CombinedAvatarProviderTest.cpp"), File("Avatars/UnitTest/AvatarManagerImplTest.cpp"), File("Base/UnitTest/IDGeneratorTest.cpp"), + File("Base/UnitTest/LRUCacheTest.cpp"), File("Base/UnitTest/SimpleIDGeneratorTest.cpp"), File("Base/UnitTest/StringTest.cpp"), File("Base/UnitTest/DateTimeTest.cpp"), File("Base/UnitTest/ByteArrayTest.cpp"), File("Base/UnitTest/URLTest.cpp"), File("Base/UnitTest/PathTest.cpp"), File("Chat/UnitTest/ChatStateNotifierTest.cpp"), # File("Chat/UnitTest/ChatStateTrackerTest.cpp"), File("Client/UnitTest/ClientSessionTest.cpp"), File("Client/UnitTest/NickResolverTest.cpp"), File("Client/UnitTest/ClientBlockListManagerTest.cpp"), File("Client/UnitTest/BlockListImplTest.cpp"), File("Compress/UnitTest/ZLibCompressorTest.cpp"), File("Compress/UnitTest/ZLibDecompressorTest.cpp"), File("Component/UnitTest/ComponentHandshakeGeneratorTest.cpp"), File("Component/UnitTest/ComponentConnectorTest.cpp"), File("Component/UnitTest/ComponentSessionTest.cpp"), File("Disco/UnitTest/CapsInfoGeneratorTest.cpp"), File("Disco/UnitTest/CapsManagerTest.cpp"), File("Disco/UnitTest/DiscoInfoResponderTest.cpp"), File("Disco/UnitTest/EntityCapsManagerTest.cpp"), File("Disco/UnitTest/FeatureOracleTest.cpp"), File("Disco/UnitTest/JIDDiscoInfoResponderTest.cpp"), File("Elements/UnitTest/IQTest.cpp"), File("Elements/UnitTest/StanzaTest.cpp"), File("Elements/UnitTest/FormTest.cpp"), File("EventLoop/UnitTest/EventLoopTest.cpp"), File("EventLoop/UnitTest/SimpleEventLoopTest.cpp"), # File("History/UnitTest/SQLiteHistoryManagerTest.cpp"), File("JID/UnitTest/JIDTest.cpp"), |