Advertisement

CMake2:版本与头文件生成

阅读量:

1.基础测试设计与实施

其最基础的作用在于通过源代码文件生成对应的可执行程序。

复制代码
>       1. cmake_minimum_required ( VERSION 3.5)

>  
>       2. project (Tutorial)
>  
>       3. add_executable(Tutorial tutorial.c)
>  
>  
>  
>  
> ```

>
> Tutorial.c:
>
>
>
>
复制代码
  1. // A simple program that computes the square root of a number
复制代码
  2. #include <stdio.h>

  3. #include <stdlib.h>

  4. #include <math.h>

  5.  

  6. int main (int argc, char *argv[])

  7. {

  8.   double inputValue = 4;

  9.   double outputValue = sqrt(inputValue);

全部评论 (0)

还没有任何评论哟~