SLAM在运行中的问题
问题一:安装gtest参考官方的安装文档
Generic Build Instructions
Setup
To build GoogleTest and your tests that use it, you need to tell your build
system where to find its headers and source files. The exact way to do it
depends on which build system you use, and is usually straightforward.
Build with CMake
GoogleTest comes with a CMake build script
(CMakeLists.txt)
that can be used on a wide range of platforms (“C” stands for cross-platform.).
If you don’t have CMake installed already, you can download it for free from
http://www.cmake.org/.
CMake works by generating native makefiles or build projects that can be used in
the compiler environment of your choice. You can either build GoogleTest as a
standalone project or it can be incorporated into an existing CMake build for
another project.
Standalone CMake Project
When building GoogleTest as a standalone project, the typical workflow starts
with
git clone https://github.com/google/googletest.git -b release-1.11.0
cd googletest # Main directory of the cloned repository.
mkdir build # Create a directory to hold the build output.
cd build
cmake .. # Generate native build scripts for GoogleTest.
The above command also includes GoogleMock by default. And so, if you want to
build only GoogleTest, you should replace the last command with
cmake .. -DBUILD_GMOCK=OFF
If you are on a *nix system, you should now see a Makefile in the current
directory. Just type make to build GoogleTest. And then you can simply install
GoogleTest if you are a system administrator.
make
sudo make install # Install in /usr/local/ by default
If you use Windows and have Visual Studio installed, a gtest.sln file and
several .vcproj files will be created. You can then build them using Visual
Studio.
On Mac OS X with Xcode installed, a .xcod

本文档介绍了如何使用CMake构建和安装GoogleTest库,包括作为独立项目和集成到现有CMake项目中。同时,针对在CSPARSE库中遇到的包名不匹配问题,提供了修改FindCSparse.cmake文件的解决方法,确保find_package结果变量遵循预期模式。
最低0.47元/天 解锁文章
2188

被折叠的 条评论
为什么被折叠?



