Tencent / phxpaxos

The Paxos library implemented in C++ that has been used in the WeChat production environment.
Other
3.36k stars 863 forks source link

Support cmake and update some submodule #192

Open vermorth opened 3 years ago

vermorth commented 3 years ago

changes:

Maybe more tests are needed to confirm correctness and stability.

tencent-adm commented 3 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

vermorth commented 3 years ago

You can compile with the following command:

git clone --recurse-submodules https://github.com/vermorth/phxpaxos.git
cd phxpaxos

pushd third_party
./autoinstall.sh
popd

mkdir -p build
cd build

cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr/local/phxpaxos \
    -DPHXPAXOS_BUILD_TOOLS=ON \
    -DPHXPAXOS_BUILD_UT=ON \
    -DPHXPAXOS_BUILD_TEST=ON \
    -DPHXPAXOS_BUILD_BENCHMARK=ON \
    -DPHXPAXOS_BUILD_PLUGIN=ON \
    -DPHXPAXOS_BUILD_SAMPLE_ECHO=ON \
    -DPHXPAXOS_BUILD_SAMPLE_ELECTION=ON \
    -DPHXPAXOS_BUILD_SAMPLE_KV=ON \
    ..

make
make install
USTB-JXY commented 1 year ago

如遇见 image

可以将 phxpaxos/CMakeLists.txt 里的 "${PROJECT_SOURCE_DIR}/third_party/local_install/abseil/lib64/cmake/absl" 改为 "${PROJECT_SOURCE_DIR}/third_party/local_install/abseil/lib/cmake/absl"