diff options
Diffstat (limited to 'Documentation/SwiftenDevelopersGuide')
3 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/.gitignore b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/.gitignore index 91c939b..aca6fe1 100644 --- a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/.gitignore +++ b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/.gitignore @@ -2,3 +2,4 @@ EchoBot? *.cpp.xml *.h.xml EchoComponent +Swiften.cpp diff --git a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot2.cpp b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot2.cpp index deeb852..8b81489 100644 --- a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot2.cpp +++ b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/EchoBot2.cpp @@ -12,7 +12,7 @@ using namespace Swift; using namespace boost; -Client* client; +static Client* client; void handleConnected(); void handleMessageReceived(Message::ref message); diff --git a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript index b267e80..aa9f691 100644 --- a/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript +++ b/Documentation/SwiftenDevelopersGuide/Examples/EchoBot/SConscript @@ -4,6 +4,13 @@ example_env = env.Clone() example_env.UseFlags(example_env["SWIFTEN_FLAGS"]) example_env.UseFlags(example_env["SWIFTEN_DEP_FLAGS"]) +# Precompile Swiften header +# This is useful to slightly speed up compilation. +if example_env["PLATFORM"] == "win32": + example_env.WriteVal("Swiften.cpp", example_env.Value("#include <Swiften/Swiften.h>\n")) + example_env["PCH"] = example_env.PCH("Swiften.cpp")[0] + example_env["PCHSTOP"] = "Swiften/Swiften.h" + for i in range(1,7) : example_env.Program("EchoBot" + str(i), ["EchoBot" + str(i) + ".cpp"]) example_env.Program("EchoComponent", "EchoComponent.cpp") |