Skip to content
Snippets Groups Projects
Commit fb3702cd authored by Ying Hsu's avatar Ying Hsu Committed by Ying Hsu
Browse files

floss: removing googletest manual build steps

* googletest packages (libgtest-dev and libgmock-dev) have pkg-config
  files now. So, the build and installation steps are no longer
  required.

* Here are the installation information about these packages:
  $ $ apt list --installed libgtest-dev libgmock-dev
  Listing... Done
  libgmock-dev/glinux-rodete-base-20220316.03.07,now 1.11.0-3 amd64
  [installed]
  libgtest-dev/glinux-rodete-base-20220316.03.07,now 1.11.0-3 amd64
  [installed]

  $dpkg -L libgtest-dev | grep gtest.pc
  /usr/lib/x86_64-linux-gnu/pkgconfig/gtest.pc

  $ dpkg -L libgmock-dev | grep gmock.pc
  /usr/lib/x86_64-linux-gnu/pkgconfig/gmock.pc

* Adding libabsl-dev package as it's required by libchrome.

Bug: 227287284
Tag: #floss
Test: ./biuld.py --target docs and ./build.py
Change-Id: I46c9f16ce328041c8953c5ad2b513719997fb096
parent e86f9d26
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,8 @@ sudo apt-get install repo git-core gnupg flex bison gperf build-essential \
libprotobuf-dev ninja-build generate-ninja protobuf-compiler \
libre2-9 debmake \
llvm libc++abi-dev \
libre2-dev libdouble-conversion-dev
libre2-dev libdouble-conversion-dev \
libgtest-dev libgmock-dev libabsl-dev
```
You will also need a recent-ish version of Rust and Cargo. Please follow the
......@@ -89,26 +90,6 @@ popd
sudo dpkg -i outdir/libchrome/*.deb
```
The googletest packages provided by Debian/Ubuntu (libgmock-dev and
libgtest-dev) do not provide pkg-config files, so you can build your own
googletest using the steps below:
```sh
git clone https://github.com/google/googletest.git -b release-1.10.0
cd googletest # Main directory of the cloned repository.
mkdir build # Create a directory to hold the build output.
cd build
cmake .. # Generate native build scripts for GoogleTest.
sudo make install -DCMAKE_INSTALL_PREFIX=/usr
# Optional steps if pkgconfig isn't installed to desired location
# Modify the source (/usr/lib/x86_64-linux-gnu) and target (/usr/lib) based on
# your local installation.
for f in $(ls /usr/lib/x86_64-linux-gnu/pkgconfig/{gtest,gmock}*); do \
ln -sf $f /usr/lib/pkgconfig/$(basename $f);
done
```
### Rust dependencies
**Note**: Handled by `--run-bootstrap` option.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment