Conversation
|
From the perspective of some package managers, they tend to avoid using vendored dependencies. For example, in vcpkg, all dependencies of liblsl (asio, boost, pugixml) are installed as separate packages: Therefore, if pugixml is obtained via |
Unfortunately, pugixml 1.15 is not available in ubuntu package managers so this isn't an option unless we keep the
I guess this is a step in the right direction because we're getting rid of the pugixml directory in our source tree. Additionally, some of the concerns raised in that article don't apply here because with this PR we are statically linking pugixml and all of its symbols are hidden. If we must keep the option of using system pugixml then I'd prefer to delay merging #253 . |
…ACE:...> because pugixml and lslobj are not needed in the export set
a33e2a2 to
0f7bdc2
Compare
|
Converting to draft because there are still some build scenarios where internet access won't be available on the target device. I'm thinking of the following:
|
|
FWIW the latest ubuntu will package pugixml >=1.15 in three months and conda might already to this. One other way to make this shorter would be a function/macro that converts a #if defined(PUGIXML_HAS_STRING_VIEW)
node.append_child(name).append_child(node_pcdata).set_value(value);
#else
node.append_child(name).append_child(node_pcdata).set_value(value.c_str());
#endifthen becomes #if PUGIXML_VERSION >= 1150
std::string_view pugi_str(const std::string&) { return value; }
#else
const char* pugi_str(const std::string&) { return value.c_str(); }
#endif
// [..]
node.append_child(name).append_child(node_pcdata).set_value(pugi_str(value));That way, the |
…stem pugixml is used. This requires supporting pugixml older than 1.15 (for now)
…o we know it works, but ultimately not what we want in the published packages.
|
I added a new CMake option But I don't want to actually keep it that way (because then some liblsl release artifacts require pugixml and others don't), so I changed the config back to fetch pugixml. |
Use FetchContent for pugixml; link privately to hide symbols
Why?
pugixml 1.15 has some desirable updates, but it is not available in ubuntu via apt-get
Are there any objections to this? The cons that I can think of:
I think these aren't major concerns, especially because platforms where we might be concerned about resources typically do not have an easy-to-install pugixml anyway.
Is there anything else to be worried about?
@tstenner