-
Notifications
You must be signed in to change notification settings - Fork 0
/
.lgtm.yml
20 lines (20 loc) · 966 Bytes
/
.lgtm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# By default, C/C++ extraction from LGTM.com uses Python 2
# Add this file to make it use Python 3
# Build protobuf from source with -fPIC is required here to prevent protobuf symbol error
extraction:
cpp:
before_index:
# Always use Python 3
- cp `which python3` $LGTM_WORKSPACE/python
- PATH=$LGTM_WORKSPACE:$PATH
# Build protobuf from source with -fPIC
- git clone https://github.com/protocolbuffers/protobuf.git
- cd protobuf
- git checkout v3.16.0
- git submodule update --init --recursive
- mkdir build_source && cd build_source
# Cannot use sudo so install locally at $HOME/protobuffers
- cmake ../cmake -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=$HOME/protobuffers -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release
- make -j$(nproc)
- make install
- PATH=$HOME/protobuffers/bin:$PATH