GoogleTest provided with C/C++test CT can be easily integrated with modern C++ build systems. Quick-start guides for integrating GoogleTest with popular build systems are available in the GoogleTest documentation. To access the documentation, extract the contents of the <INSTALL_DIR>/googletest/googletest.zip package.
See docs/quickstart-bazel.md in the provided GoogleTest documentation for a quick-start guide.
See docs/quickstart-cmake.md in the provided GoogleTest documentation for a quick-start guide.
To integrate the provided GoogleTest package with your project, consider one of the following options:
<INSTALL_DIR>/googletest/googletest.zip package and build the GoogleTest framework locally.<INSTALL_DIR>/googletest/googletest.zip package location.Example:
For CMake projects, you can add the following snippet to your CMakeLists.txt file to access the GoogleTest package provided with C/C++test CT:
FetchContent_Declare( googletest # Assuming C/C++test CT is installed in /opt/parasoft/cpptest-ct URL /opt/parasoft/cpptest-ct/googletest/googletest.zip ) |
For an example integration, see the <INSTALL_DIR>/examples/CovGoogleTest/CMakeLists.txt file.