-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: make tests not build by default and improve example building
Also applied markdownlint to all markdown files (not the sphinx ones yet)
- Loading branch information
Showing
7 changed files
with
95 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,44 @@ | ||
# Examples | ||
|
||
The examples here can all be build from top level. | ||
Another approach, more akin to how most consumers would use it, is to install the ISO11783 CAN Stack library. | ||
Then, use a call to `find_package()` to find this package. | ||
This directory contains examples of how to use the AgIsoStack library. | ||
|
||
The same process can be used for all examples, however `diagnostic_protocol` is just shown as a reference. | ||
## Building all examples | ||
|
||
First, build AgIsoStack-plus-plus. | ||
The examples here can all be build simultaneously from the top level directory of the repository: | ||
|
||
```bash | ||
cmake -S . -B build -DBUILD_EXAMPLES=ON | ||
cmake --build build | ||
``` | ||
# Build the library like normal | ||
cd /path/to/root/directory/of/AgIsoStack-plus-plus | ||
|
||
## Building a single example | ||
|
||
Another approach, more akin to how most consumers would use the library, is to install the AgIsoStack first. | ||
And then, use a call to `find_package()` to find this installation. | ||
|
||
First, from the top level directory, build AgIsoStack-plus-plus normally | ||
|
||
```bash | ||
cmake -S . -B build | ||
cmake --build build | ||
# Install it locally in a directory called "install" | ||
cmake --install build --prefix install | ||
``` | ||
|
||
We install it to a known location, here we use `install` folder relative to the root of the repository as an example. | ||
|
||
Now, build an example of your choosing. | ||
```bash | ||
cmake --install build --prefix install | ||
``` | ||
# Now, go in and build the example | ||
|
||
Now, build an example of your choosing, here we use the `diagnostic protocol` as an example, but any of the examples will work. Note that we need to tell CMake where to find the installed package, which is two directories up from the example directory. Hence, the `../../install` argument to `CMAKE_PREFIX_PATH`. | ||
|
||
```bash | ||
cd examples/diagnostic_protocol | ||
# Here, because we installed locally, you must supply the path to install | ||
cmake -S . -B build -DCMAKE_PREFIX_PATH=../../install | ||
cmake --build build | ||
``` | ||
|
||
Finally, run the example. | ||
Then, run the example. The name of the executable will be different depending on which example you built. | ||
|
||
```bash | ||
./build/DiagnosticProtocolExample | ||
``` | ||
./build/DiagnosticProtocolExampleTarget | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
## 3rd Party Drivers | ||
# 3rd Party Drivers | ||
|
||
### PEAK PCAN Basic Driver | ||
## PEAK PCAN Basic Driver | ||
|
||
Please read the End User License Agreement of the company PEAK-System Technik GmbH at: | ||
www.peak-system.com/quick/eula | ||
<www.peak-system.com/quick/eula> | ||
|
||
Use of the PEAK driver libraries is governed by their EULA. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters