Skip to content

Commit 31eb89d

Browse files
authored
Merge pull request #1 from ECASLab/feature/build-system
Feature/build system
2 parents bf9f1d9 + cb6ef02 commit 31eb89d

File tree

13 files changed

+169
-0
lines changed

13 files changed

+169
-0
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### VisualStudioCode ###
2+
.vscode/
3+
!.vscode/settings.json
4+
!.vscode/tasks.json
5+
!.vscode/launch.json
6+
!.vscode/extensions.json
7+
*.code-workspace
8+
9+
## Logs ##
10+
logs/
11+
12+
## Assets ##
13+
assets/
14+
15+
# Objects #
16+
*.so
17+
*.o

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
repos:
2+
- repo: https://github.com/bmorcos/pre-commit-hooks-cpp
3+
rev: 9a5aa38207bf557961110d6a4f7e3a9d352911f9
4+
hooks:
5+
- id: clang-format
6+
args: [--style=google]
7+
- id: cpplint
8+
args: [--filter=-build/include_order]
9+
- id: cppcheck
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v4.1.0
12+
hooks:
13+
- id: check-merge-conflict
14+
- repo: https://github.com/jorisroovers/gitlint
15+
rev: v0.17.0
16+
hooks:
17+
- id: gitlint

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# cynq
22
PYNQ bindings for C and C++ to avoid requiring Python or Vitis to execute hardware acceleration.
3+
4+
# Dependencies
5+
1. meson 1.2.3
6+
2. Python 3.8.10
7+
3. C++17

examples/main.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* See LICENSE for more information about licensing
3+
*
4+
* Copyright 2023
5+
* Author: Luis G. Leon-Vega <luis.leon@ieee.org>
6+
* Diego Arturo Avila Torres <diego.avila@uned.cr>
7+
*
8+
*/
9+
#include "cynq/cynq.hpp"
10+
11+
int main(){
12+
return 0;
13+
}

examples/meson.build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# See LICENSE for more information about licensing
3+
# Copyright 2023
4+
#
5+
# Author: Diego Arturo Avila Torres <diego.avila@uned.cr>
6+
# Luis G. Leon Vega <luis.leon@ieee.org>
7+
#
8+
#
9+
10+
executable('example','main.cpp',include_directories: [projectinc])

include/cynq/cynq.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* See LICENSE for more information about licensing
3+
*
4+
* Copyright 2023
5+
* Author: Luis G. Leon-Vega <luis.leon@ieee.org>
6+
* Diego Arturo Avila Torres <diego.avila@uned.cr>
7+
*
8+
*/
9+
#pragma once
10+
11+
namespace cynq {
12+
13+
}

meson.build

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# See LICENSE for more information about licensing
3+
# Copyright 2023
4+
#
5+
# Author: Diego Arturo Avila Torres <dandida95@gmail.com>
6+
# Luis G. Leon Vega <luis.leon@ieee.org>
7+
#
8+
9+
10+
project('cynq','cpp',version : '0.1.0',
11+
default_options : ['warning_level=3',
12+
'cpp_std=c++17',
13+
'cpp_args=-Werror'])
14+
15+
add_global_arguments(
16+
'-Wno-ignored-qualifiers',
17+
language : 'cpp'
18+
)
19+
20+
#############################
21+
## Dependencies definition ##
22+
#############################
23+
24+
# options
25+
26+
build_tests = get_option('build_tests')
27+
28+
# directories
29+
projectinc = include_directories('.',
30+
'include')
31+
32+
subdir('examples')
33+
34+
# Testing suite
35+
if build_tests
36+
gtest_proj = subproject('gtest')
37+
gtest_dep = gtest_proj.get_variable('gtest_dep')
38+
gmock_dep = gtest_proj.get_variable('gmock_dep')
39+
subdir('tests')
40+
endif

meson.options

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# See LICENSE for more information about licensing
3+
# Copyright 2023
4+
#
5+
# Author: Diego Arturo Avila Torres <dandida95@gmail.com>
6+
# Luis G. Leon Vega <luis.leon@ieee.org>
7+
#
8+
#
9+
10+
option('build_tests', type: 'boolean', value: false)

src/cynq.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* See LICENSE for more information about licensing
3+
*
4+
* Copyright 2023
5+
* Author: Luis G. Leon-Vega <luis.leon@ieee.org>
6+
* Diego Arturo Avila Torres <diego.avila@uned.cr>
7+
*
8+
*/
9+
10+
#include "cynq.hpp"

src/meson.build

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# See LICENSE for more information about licensing
3+
# Copyright 2023
4+
#
5+
# Author: Diego Arturo Avila Torres <dandida95@gmail.com>
6+
# Luis G. Leon Vega <luis.leon@ieee.org>
7+
#

0 commit comments

Comments
 (0)