cmake 入门编程之打印信息或者变量

mian.c

#include <stdio.h>

int main()

{

printf(“hello world\n”);

return 0;

}

CMakeLists.txt

project(HELLO)

set(SRC_LISTS main.c)

message(“hello”)

message(“$PROJECT_SOURCE_DIR”)

message(“$PROJECT_BINARY_DIR”)

add_executable(main ${SRC_LISTS})

    原文作者:谢文浩
    原文地址: https://blog.csdn.net/xiewenhao12/article/details/78481036
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞