travisqmakegcccpp98rcpp
May 4, 2017 ยท View on GitHub
| Branch | ![]() |
|---|---|
| master | |
| develop |
This GitHub is part of
The goal of this project is to have a clean Travis CI build, with specs:
- Build system:
qmake - C++ compiler:
gcc - C++ version:
C++98 - Libraries:
STLandRcpp - Code coverage: none
- Source: one single file,
main.cpp
Less complex builds:
- Use STL only: travis_qmake_gcc_cpp98
- No
Rcpp: travis_r_minimal
Architecture
This setup allows for independent C++ and R development. The C++ function do_magic_cpp is used
by both the C++ project and the R package.
The C++ project
domagic.pro:qmakeproject filemain.cpp: contains themainfunctionsrc/do_magic_cpp.h: header file with thedo_magic_cppfunction declarationsrc/do_magic_cpp.cpp: source file with thedo_magic_cppfunction definition
Note that the C++ code is not tested directly. The R package does this.
The R package
domagic.Rproj: RStudio project fileR/do_magic_r.R: defines thedo_magic_rfunction, which calls thedo_magic_cppfunction/tests/testthat/test-do_magic.R: tests thedo_magic_rfunction
