init c
This commit is contained in:
parent
ddeb96737d
commit
34f959eb0e
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
15
CMakeLists.txt
Normal 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
17
include/test.h
Normal 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
19
main.c
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user