特牛生活网

多目录工程的CmakeLists.txt编写(自动添加多目录下的文件)-CSDN博客

网友收藏
文章浏览阅读6.3w次,点赞27次,收藏99次。实现类似于vs中工程的CMakeLists.txt的编写。功能为main.cpp调用hello.cpp 的hello()函数,world.cpp的world()函数。使用自动添加多目录下的文件1.工程目录如下2.主函数main.cpp#include #include "hello.h"#include "world.h"int main(){ hello();