This commit is contained in:
veypi 2021-07-17 10:25:21 +08:00
parent ddeb96737d
commit 34f959eb0e
5 changed files with 66 additions and 0 deletions

1
.gitignore vendored
View File

@ -201,3 +201,4 @@ fabric.properties
# Android studio 3.1+ serialized cache file # Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser .idea/caches/build_file_checksums.ser
vperf

15
CMakeLists.txt Normal file
View File

@ -0,0 +1,15 @@
cmake_minimum_required (VERSION 2.8)
# veypi
# projectname is the same as the main-executable
project(vperf)
add_definitions('-g')
add_definitions('-Wall')
#add_definitions('-std=c++11')
add_executable(${PROJECT_NAME} main.c test.c)
#add_custom_target(${PROJECT_NAME}-symlink ALL ln --force -s ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/${PROJECT_NAME} DEPENDS ${PROJECT_NAME})
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME})

17
include/test.h Normal file
View File

@ -0,0 +1,17 @@
/*
* test.h
* Copyright (C) 2021 light <light@lightdeMBP>
*
* Distributed under terms of the MIT license.
*/
#ifndef TEST_H
#define TEST_H
#include<math.h>
double get_sqrt(double var1);
#endif /* !TEST_H */

19
main.c Normal file
View File

@ -0,0 +1,19 @@
/*
* main.c
* Copyright (C) 2021 light <light@lightdeMBP>
*
* Distributed under terms of the MIT license.
*/
#include<stdio.h>
#include"./include/test.h"
int main()
{
double b=25.0;
double a=0.0;
a=get_sqrt(b);
printf("a is %lf, b is %lf\n",a,b);
return 0;
}

14
test.c Normal file
View File

@ -0,0 +1,14 @@
/*
* test.c
* Copyright (C) 2021 light <light@lightdeMBP>
*
* Distributed under terms of the MIT license.
*/
#include "./include/test.h"
double get_sqrt(double var1)
{
return sqrt(var1);
}