https://github.com/bast/gtest-demo.git
[sxy@DESKTOP-SXY gtest-demo_new]$ tree . └── gtest-demo ├── cmake #测试环境构建 │ ├── googletest.cmake │ └── googletest-download.cmake ├── CMakeLists.txt ├── LICENSE ├── README.md ├── src #待测试的模块 │ ├── CMakeLists.txt │ ├── example.cpp │ └── example.h └── test #测试代码 ├── CMakeLists.txt ├── example_add.cpp ├── example_subtract.cpp └── main.cpp
- GNUInstallDirs:gnu安装目录 - include:获取某一文件中的cmake代码 - macro(<name> [arg1 [arg2 [arg3 ...]]]):定义一个宏,后面是宏名和参数 - configure_file:复制input文件中的内容到output,复制过程中替换某些值 - execute_process:执行进程,指定WORKING_DIRECTORY后在该子目录下执行命令 - add_library
root_dir - lib - sublib0 - sublib2 - src - test_module - application - doc - gtest_demo - build - scripts to build application - scripts to all