Changeset View
Standalone View
build/premake/premake5.lua
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | elseif os.istarget("linux") then | ||||
if link_errorCode ~= 0 then | if link_errorCode ~= 0 then | ||||
link_execinfo = true | link_execinfo = true | ||||
end | end | ||||
end | end | ||||
-- Set up the Workspace | -- Set up the Workspace | ||||
workspace "pyrogenesis" | workspace "pyrogenesis" | ||||
targetdir(rootdir.."/binaries/system") | targetdir(rootdir.."/binaries/system") | ||||
libdirs(rootdir.."/binaries/system") | libdirs(rootdir.."/binaries/system") | ||||
if not _OPTIONS["outpath"] then | if not _OPTIONS["outpath"] then | ||||
error("You must specify the 'outpath' parameter") | error("You must specify the 'outpath' parameter") | ||||
end | end | ||||
vladislavbelov: Why `boost` is not linked? Also is it guaranteed that it's installed to that point? | |||||
Done Inline Actions
boost::lockfree::queue<bool> queue(128); clang++ -MMD -MP -DNDEBUG -DCONFIG_FINAL=1 -DCONFIG2_AUDIO=0 -DCONFIG2_LOBBY=0 -DCONFIG2_MINIUPNPC=0 -DLIB_STATIC_LINK -DCONFIG_ENABLE_PCH=1 -I../../../source/pch/network -I../../../source -isystem ../../../libraries/source/spidermonkey/include-unix-release -isystem /usr/include/SDL2 -O3 -g -Wall -Wextra -fno-rtti -std=c++17 -Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fno-omit-frame-pointer -fpch-preprocess -fPIC -march=pentium3 -mtune=generic -fvisibility=hidden -D_REENTRANT -include obj/network_Release/precompiled.h -o "obj/network_Release/NetSession.o" -MF "obj/network_Release/NetSession.d" -c "../../../source/network/NetSession.cpp"
I'll test it. Perhaps the screen will be full of errors nwtour: >Why boost is not linked?
boost::lockfree::queue<bool> queue(128);
It is not a call to the… | |||||
Not Done Inline Actions
Technically it calls the queue constructor, which is also a function. And the question "is it header-only or not" is its implementation detail. vladislavbelov: > boost::lockfree::queue<bool> queue(128);
> It is not a call to the boost function and does… | |||||
Done Inline Actions
queue this is the name of the variable. I can change on boost::lockfree::queue<bool> testtest(128);
Code from extern_libs5.lua: unix_names = { os.findlib("boost_filesystem-mt") and "boost_filesystem-mt" or "boost_filesystem", os.findlib("boost_system-mt") and "boost_system-mt" or "boost_system" } It is strange to add it for still non-existent functionality of boost::lockfile::queue nwtour: > Technically it calls the `queue` constructor, which is also a function.
queue this is the… | |||||
Not Done Inline Actions
The name doesn't matter. The constructor will be called anyway.
I only need guarantees that it won't be false positive. I suppose https://www.boost.org/doc/libs/1_76_0/more/getting_started/windows.html#header-only-libraries should be a guarantee. vladislavbelov: > queue this is the name of the variable. I can change on
The name doesn't matter. The… | |||||
Done Inline Actions
I could be wrong, but the constructor is what is called to create the first instance. If this behavior is scary, I can add a link to boost nwtour: > > queue this is the name of the variable. I can change on
> The name doesn't matter. The… | |||||
Not Done Inline Actions
In the boost::lockfree::queue<bool> queue(128); line you've already created the first instance (and you passed 128 to the constructor). vladislavbelov: > I could be wrong, but the constructor is what is called to create the first instance.
In the… | |||||
Done Inline Actions
Sorry, my bad. In theory, the task was just to scare the compiler and do not call code from the boost. nwtour: > > I could be wrong, but the constructor is what is called to create the first instance.
>
>… | |||||
Done Inline Actions
Must not be: nwtour: > I only need guarantees that it won't be false positive.
Must not be:
os.outputof - With any… | |||||
location(_OPTIONS["outpath"]) | location(_OPTIONS["outpath"]) | ||||
configurations { "Release", "Debug" } | configurations { "Release", "Debug" } | ||||
source_root = rootdir.."/source/" -- default for most projects - overridden by local in others | source_root = rootdir.."/source/" -- default for most projects - overridden by local in others | ||||
-- Rationale: projects should not have any additional include paths except for | -- Rationale: projects should not have any additional include paths except for | ||||
-- those required by external libraries. Instead, we should always write the | -- those required by external libraries. Instead, we should always write the | ||||
-- full relative path, e.g. #include "maths/Vector3d.h". This avoids confusion | -- full relative path, e.g. #include "maths/Vector3d.h". This avoids confusion | ||||
▲ Show 20 Lines • Show All 467 Lines • ▼ Show 20 Lines | function setup_all_libs () | ||||
source_dirs = { | source_dirs = { | ||||
"network", | "network", | ||||
} | } | ||||
extern_libs = { | extern_libs = { | ||||
"spidermonkey", | "spidermonkey", | ||||
"enet", | "enet", | ||||
"sdl", | "sdl", | ||||
"boost", -- dragged in via server->simulation.h->random and NetSession.h->lockfree | "boost", -- dragged in via server->simulation.h->random and NetSession.h->lockfree | ||||
"atomic", | |||||
"fmt", | "fmt", | ||||
} | } | ||||
if not _OPTIONS["without-miniupnpc"] then | if not _OPTIONS["without-miniupnpc"] then | ||||
table.insert(extern_libs, "miniupnpc") | table.insert(extern_libs, "miniupnpc") | ||||
end | end | ||||
setup_static_lib_project("network", source_dirs, extern_libs, {}) | setup_static_lib_project("network", source_dirs, extern_libs, {}) | ||||
source_dirs = { | source_dirs = { | ||||
▲ Show 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | used_extern_libs = { | ||||
"libcurl", | "libcurl", | ||||
"tinygettext", | "tinygettext", | ||||
"icu", | "icu", | ||||
"iconv", | "iconv", | ||||
"libsodium", | "libsodium", | ||||
"fmt", | "fmt", | ||||
"valgrind", | "valgrind", | ||||
"atomic", | |||||
} | } | ||||
if not os.istarget("windows") and not _OPTIONS["android"] and not os.istarget("macosx") then | if not os.istarget("windows") and not _OPTIONS["android"] and not os.istarget("macosx") then | ||||
-- X11 should only be linked on *nix | -- X11 should only be linked on *nix | ||||
table.insert(used_extern_libs, "x11") | table.insert(used_extern_libs, "x11") | ||||
end | end | ||||
if not _OPTIONS["without-audio"] then | if not _OPTIONS["without-audio"] then | ||||
▲ Show 20 Lines • Show All 500 Lines • Show Last 20 Lines |
Why boost is not linked? Also is it guaranteed that it's installed to that point?