mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
facebook.com/edencommon (#2257)
* package & test * modified: projects/github.com/facebookexperimental/edencommon/package.yml * boost for darwin * build deps * renamed: projects/github.com/facebookexperimental/edencommon/package.yml -> projects/facebook.com/edencommon/package.yml renamed: projects/github.com/facebookexperimental/edencommon/test.cc -> projects/facebook.com/edencommon/test.cc * modified: projects/facebook.com/edencommon/package.yml * modified: projects/facebook.com/edencommon/package.yml * -DBUILD_SHARED_LIBS=OFF * +openssl.org: ^1.1 * bump * bzip2 --------- Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
parent
f3a9516bec
commit
7ae694ad37
42
projects/facebook.com/edencommon/package.yml
Normal file
42
projects/facebook.com/edencommon/package.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
distributable:
|
||||
url: https://github.com/facebookexperimental/edencommon/archive/v2023.06.19.00.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: facebookexperimental/edencommon/tags
|
||||
|
||||
dependencies:
|
||||
facebook.com/folly: '*'
|
||||
gflags.github.io: '*'
|
||||
google.com/glog: '*'
|
||||
openssl.org: ^1.1
|
||||
sourceware.org/bzip2: ^1
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
tea.xyz/gx/make: '*'
|
||||
cmake.org: '*'
|
||||
google.com/googletest: '*'
|
||||
boost.org: ^1
|
||||
|
||||
script: |
|
||||
cmake -S . -B _build $ARGS
|
||||
cmake --build _build
|
||||
cmake --install _build
|
||||
env:
|
||||
ARGS:
|
||||
- -DBUILD_SHARED_LIBS=ON
|
||||
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
||||
- -DCMAKE_INSTALL_LIBDIR=lib
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
- -Wno-dev
|
||||
- -DBUILD_TESTING=OFF
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
script: |
|
||||
g++ -std=c++17 test.cc -o test -ledencommon_utils -lfolly
|
||||
./test | grep test
|
20
projects/facebook.com/edencommon/test.cc
Normal file
20
projects/facebook.com/edencommon/test.cc
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include <eden/common/utils/ProcessNameCache.h>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
using namespace facebook::eden;
|
||||
|
||||
ProcessNameCache& getProcessNameCache() {
|
||||
static auto* pnc = new ProcessNameCache;
|
||||
return *pnc;
|
||||
}
|
||||
|
||||
ProcessNameHandle lookupProcessName(pid_t pid) {
|
||||
return getProcessNameCache().lookup(pid);
|
||||
}
|
||||
|
||||
int main() {
|
||||
int pid = getpid();
|
||||
std::cout << lookupProcessName(pid).get() << std::endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue