Skip to content

Instantly share code, notes, and snippets.

@bugorz
Last active November 16, 2019 10:31
Show Gist options
  • Save bugorz/40f1a47c40264dfddfb1506ca00ce63c to your computer and use it in GitHub Desktop.
Save bugorz/40f1a47c40264dfddfb1506ca00ce63c to your computer and use it in GitHub Desktop.

Prerequisite

brew install openssl
git clone https://github.com/google/googletest
# Note, there are 'googlemock' and 'googletest' under the root 'googletest' dir, please use 'googletest/googletest' as the GTEST_ROOT.
cd googletest/googletest
GTEST_ROOT=`pwd`

Build s2geometry

cmake -DOPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl/1.0.2q/include -DGTEST_ROOT=${GTEST_ROOT} ..
make
make test
sudo make install
make install

Run s2geometry tests in CLion

  • Please go to Preferences... -> Build, Execution, Deployment -> CMake
  • Select the Debug Profile, then add -DDOPENSSL_INCLUDE_DIR=${path_to_openssl_include} and -DGTEST_ROOT=${path_to_gtest_root} to CMake options.
  • Reload project in CLion then you should be able to run all unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment