68 lines
1.4 KiB
Markdown
68 lines
1.4 KiB
Markdown
# MyFirstUDRKit
|
|
|
|
|
|
|
|
### Setting up cmake
|
|
|
|
Run the cmake gui and fill in the path information. Set the source to the root of the location where you have cloned the repo. CMake looks for the file `CMakeLists.txt`. Binaries will be built under `build/x86_64-windows` and `build/x86_64-linux` for linux.
|
|
|
|
![cmake - pre-config](docs/cmake_before_config.png "cmake pre-config")
|
|
|
|
Click on Configure to generate the default config for the current platform. When prompted choose the `Unix makefiles` generator for linux and `Visual Studio 2019`or later for windows
|
|
|
|
You should then see a screen like this:
|
|
|
|
![cmake - config](docs/cmake_config.png "cmake config")
|
|
|
|
The only change needed at this stage is to set `CMAKE_BUILD_TYPE to `Debug`
|
|
|
|
|
|
|
|
If you want to start again be sure to click on `FILE|DELETE CACHE`
|
|
|
|
|
|
### Building the kit
|
|
|
|
```
|
|
cd builds
|
|
make
|
|
```
|
|
|
|
|
|
### Installation
|
|
|
|
#### run the sql on the target database
|
|
Decide whether to install the functions globally or as part of a package
|
|
|
|
|
|
|
|
### Testing
|
|
|
|
- create a test db
|
|
- add functions
|
|
- write some simple tests
|
|
|
|
|
|
### Stress testing
|
|
|
|
- compile fb for valgrind
|
|
- stress test for leakage
|
|
|
|
|
|
### When things go wrong
|
|
|
|
#### Errors when registering a function
|
|
|
|
```
|
|
Invalid index 1 in function IMetadataBuilder::setType
|
|
```
|
|
|
|
This error indicates that the parameters in the sql function declaration do not match the parameters in the actual function. Check your sql with the FB_UDR_MESSAGE declarations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### TODO
|