From 3a794e75be8c7d9196757fc043e0a1c3a73a7db4 Mon Sep 17 00:00:00 2001 From: John Ralls <jralls@ceridwen.us> Date: Tue, 10 Jan 2017 14:08:20 -0800 Subject: [PATCH] Add note about setting GTEST cmake variables. Because I keep forgetting them... --- cmake/README_CMAKE.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/README_CMAKE.txt b/cmake/README_CMAKE.txt index c9249e14c6..4ad582d451 100644 --- a/cmake/README_CMAKE.txt +++ b/cmake/README_CMAKE.txt @@ -107,6 +107,11 @@ Then decide what cmake command line options you will need: the top-level `CMakeLists.txt` file. For example, you can disable SQL using these options. + * Google Test will work without setting options in most Linux distros, but if + it doesn't you may need to set GMOCK_ROOT or GTEST_ROOT to the root of the + respective sources. Set GTEST_DISABLE to prevent Google Test based tests from + running. + Some examples: * Build on Linux, don't want to install, use the Makefile generator: @@ -125,6 +130,11 @@ Some examples: $ cmake -D CMAKE_INSTALL_PREFIX=/tmp/gnucash -D CMAKE_PREFIX_PATH=$HOME/gnucash-unstable -G Xcode ../gnucash + * Again, this time pointing to a gmock-1.7.0 source directory: + + $ cmake -D CMAKE_INSTALL_PREFIX=/tmp/gnucash -D + CMAKE_PREFIX_PATH=$HOME/gnucash-unstable -D GMOCK_ROOT=$HOME/gmock-1.7.0 -D GTEST_ROOT=$HOME/gmock-1.7.0/gtest -G Xcode ../gnucash + === Building The Xcode, Ninja and Makefile generators all support parallel builds,