gtest-config(1) Google's framework for writing C++ test


gtest-config [OPTIONS...]


The `gtest-config' script provides access to the necessary compile and linking flags to connect with Google C++ Testing Framework, both in a build prior to installation, and on the system proper after installation. The installation overrides may be issued in combination with any other queries, but will only affect installation queries if called on a built but not installed gtest. The installation queries may not be issued with any other types of queries, and only one installation query may be made at a time. The version queries and compiler flag queries may be combined as desired but not mixed. Different version queries are always combined with logical "and" semantics, and only the last of any particular query is used while all previous ones ignored. All versions must be specified as a sequence of numbers separated by periods. Compiler flag queries output the union of the sets of flags when combined.
gtest-config --min-version=1.0 || echo "Insufficient Google Test version."
g++ $(gtest-config --cppflags --cxxflags) -o foo.o -c foo.cpp g++ $(gtest-config --ldflags --libs) -o foo foo.o
# When using a built but not installed Google Test: g++ $(../../my_gtest_build/scripts/gtest-config ...) ...
# When using an installed Google Test, but with installation overrides: export GTEST_PREFIX="/opt" g++ $(gtest-config --libdir="/opt/lib64" ...) ...
brief usage information
display this help message
Installation Overrides:
overrides the installation prefix
overrides the executable installation prefix
overrides the library installation prefix
overrides the header file installation prefix
Installation Queries:
installation prefix
executable installation prefix
library installation directory
header file installation directory
the version of the Google Test installation
Version Queries:
return 0 if the version is at least VERSION
return 0 if the version is exactly VERSION
return 0 if the version is at most VERSION
Compilation Flag Queries:
compile flags specific to the C-like preprocessors
compile flags appropriate for C++ programs
linker flags
libraries for linking


gtest is Copyright 2008, Google Inc.

This manual page was written by Giuseppe Iuculano <[email protected]>, for the Debian project (but may be used by others).