-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
83 lines (63 loc) · 2.4 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Howto build:
~~~~~~~~~~~~
In order to sucessfully build the gr-out-of-tree-project module you will need:
* cmake > 2.8
* swig
* libgnuradio-core
After checking out the code from the repository, change to the
gr-out-of-tree-project directory.
If you want to build with a different compiler such as clang
you might have to do something like:
export CXX=clang++
export CC=clang
before.
Create a new directory e.g. 'build' to do an out of source build:
mkdir build
cd build
cmake ../
make
make install
For more information refer to the cmake documentation.
How to create your own project using this example:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Checkout the code from the repository
* Rename the directory from gr-out-of-tree-project
to something like gr-myproject
$ mv gr-out-of-tree-project gr-myproject
* Replace all the occurences of "out_of_tree" with
"myproject"
$ cd gr-myproject
$ sed -i -e 's/out_of_tree/myproject/g' $(find . -type f)
* Rename all the files accordingly using e.g. zmv
$ zmv -v '*/*' '$f:s/out_of_tree/myproject/g'
Howto add your own blocks:
~~~~~~~~~~~~~~~~~~~~~~~~~~
* Your C++ or Fortran code goes into lib/
* Your Python code and your Python unittests go into python/
* Your swig stuff goes into swig/
Adding a new C++ file:
----------------------
* As stated above, C++ code goes into lib/
* Your QA code goes into qa_specest_yourblockname.{h,cc}
respectively qa_specesti_yourblockname.{h,cc} if it is an
implementation block
* Your code for the actual block goes (usually) into
specest_yourblock.{h,cc}
* To include your files in the buildsystem add them to the file
lib/CMakeLists.txt by editing the following variables:
* CXX_SRCS (Sourcecode)
* CXX_QA_SRCS and CXX_QA (QA source and names of tests (i.e. your class name))
Adding a new Python file:
--------------------------
* As stated above, Python code goes into python/
* If it's a QA/test file, add it to python/CMakeLists.txt
in the PYTHON_QA variable
* If it's a file that contains code that needs to be installed later, add it to python/CMakeLists.txt
in the SPECEST_PY_SRCS variable
Swig integration:
-----------------
This works basically the same as with the autotools based build system
* Drop your *.i files into swig/ directory
* include them into the specest.i as it has been with the others
Enjoy, and please report any bugs or improvements to:
moritz dot fischer at student dot kit dot edu