Skip to content

Commit

Permalink
Merge pull request #209 from DrylandEcology/bugfix_206
Browse files Browse the repository at this point in the history
- adjustments so that the clang compiler works
- set submodule googletest to specific commit
- specify specific warnings in the makefile to be ignored (instead of propagated to errors)
- more consistent CI across compilers on `travis`
  • Loading branch information
dschlaep authored Jul 12, 2018
2 parents 20cf67e + 94000a5 commit d90151f
Show file tree
Hide file tree
Showing 6 changed files with 371 additions and 219 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "googletest"]
path = googletest
url = https://github.com/google/googletest
branch = master
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
language: c
language: cpp

compiler:
- clang
- gcc

script:
- export CPPFLAGS=-DSWDEBUG && make cleaner bint_run
- make cleaner cov test_run
- make cleaner

after_success:
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
- make cleaner
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
[11]: https://img.shields.io/github/downloads/DrylandEcology/SOILWAT2/total.svg
[12]: https://github.com/DrylandEcology/SOILWAT2

<br>

# SOILWAT2

Expand All @@ -38,6 +39,7 @@ Some recent references
* Schlaepfer, D. R., W. K. Lauenroth, and J. B. Bradford. 2012. Ecohydrological
niche of sagebrush ecosystems. Ecohydrology 5:453-466.

<br>

## How to contribute
You can help us in different ways:
Expand Down Expand Up @@ -68,7 +70,9 @@ __Tests, documentation, and code__ form a trinity
but don't push them to the repository
- Code tests
* Use [GoogleTest](https://github.com/google/googletest/blob/master/googletest/docs/Documentation.md)
to add unit tests to the existing framework
to add unit tests to the existing framework in the folder `test/` where
each unit test file uses the naming scheme `test/test_*.cc`.
* Note: `SOILWAT2` is written in C whereas `GoogleTest` is a C++ framework.
* Run unit tests locally on the command-line with
```
make test # compiles the unit-test binary/executable (with `-DSWDEBUG`)
Expand Down Expand Up @@ -116,13 +120,19 @@ __Tests, documentation, and code__ form a trinity
```
make cleaner bint_run CPPFLAGS=-DSWDEBUG
```
* The "makefile" also contains pre-configured debugging targets including
`bin_debug`, `bind`, and `bind_valgrind` (see description in `makefile`).
If **valgrind** is installed, then for example
* Alternatively, you can use the pre-configured debugging targets
`bin_debug` and `bind`, for instance, with
```
make cleaner bind bint_run
```
* If **valgrind** is installed, then you can call the target `bind_valgrind`
(see description in `makefile`) with
```
make cleaner bind_valgrind
```
<br>
## Notes
__Version numbers__
Expand Down
Loading

0 comments on commit d90151f

Please sign in to comment.