Reference

gtest-config(1)

Google's framework for writing C++ test

NAME

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

SYNOPSIS

gtest-config [OPTIONS...]

DESCRIPTION

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.

Examples:

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" ...) ...

Help:

--usage

brief usage information

--help

display this help message

Installation Overrides:

--prefix=<dir>

overrides the installation prefix

--exec-prefix=<dir>

overrides the executable installation prefix

--libdir=<dir>

overrides the library installation prefix

--includedir=<dir>

overrides the header file installation prefix

Installation Queries:

--prefix

installation prefix

--exec-prefix

executable installation prefix

--libdir

library installation directory

--includedir

header file installation directory

--version

the version of the Google Test installation

Version Queries:

--min-version=VERSION

return 0 if the version is at least VERSION

--exact-version=VERSION

return 0 if the version is exactly VERSION

--max-version=VERSION

return 0 if the version is at most VERSION

Compilation Flag Queries:

--cppflags

compile flags specific to the C-like preprocessors

--cxxflags

compile flags appropriate for C++ programs

--ldflags

linker flags

--libs

libraries for linking

SEE ALSO

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

info gtest-config

should give you access to the complete manual.

AUTHOR

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).