gtest-config - Google’s framework for writing C++ test
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
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
--help display this help message
overrides the installation prefix
overrides the executable installation prefix
overrides the library installation prefix
overrides the header file installation prefix
executable installation prefix
library installation directory
header file installation directory
the version of the Google Test installation
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
--libs libraries for linking
The full documentation for gtest-config is maintained as a Texinfo
manual. If the info and gtest-config programs are properly installed
at your site, the command
should give you access to the complete manual.
gtest is Copyright 2008, Google Inc.
This manual page was written by Giuseppe Iuculano
<firstname.lastname@example.org>, for the Debian project (but may be used by