mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Add gulrak/filesystem to auxil, expose via zeek::filesystem
This adds https://github.com/gulrak/filesystem as a submodule into auxil as a compiler-independent std::filesystem replacement. The ghc::filesystem namespace is exposed as zeek::filesystem in util.h. In the build directory, we add 3rdparty/ghc as a symlink to auxil in order to support building from the build tree. <build_dir>/src/3rdparty/ghc -> /path/to/zeek/src/auxil/filesystem/include/ghc In the installation tree, the headers are installed into include/zeek/3rdparty: <install_dir>/include/zeek/3rdparty/ghc Note, this differs from how we approached rapidjson which isn't included using a zeek/3rdparty and instead requires an additional include path of the following form for external plugins to find and use it. <install_dir>/include/zeek/3rdparty/rapidjson/include/ We diverge from this approach. Placing ghc directly into 3rdparty appears nicer and avoids changing external components (DynamicPlugin.cmake / spicyc)
This commit is contained in:
parent
d506806a22
commit
b77f5fa14c
7 changed files with 66 additions and 0 deletions
|
@ -75,6 +75,8 @@ extern "C"
|
|||
#include "zeek/3rdparty/modp_numtoa.h"
|
||||
}
|
||||
|
||||
#include "zeek/3rdparty/ghc/filesystem.hpp"
|
||||
|
||||
using bro_int_t = int64_t;
|
||||
using bro_uint_t = uint64_t;
|
||||
|
||||
|
@ -91,6 +93,10 @@ namespace zeek
|
|||
class ODesc;
|
||||
class RecordVal;
|
||||
|
||||
// Expose ghc::filesystem as zeek::filesystem until we can
|
||||
// switch to std::filesystem.
|
||||
namespace filesystem = ghc::filesystem;
|
||||
|
||||
namespace util
|
||||
{
|
||||
namespace detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue