Envelope task #1606: === Manual and Examples ===
Revise user example demonstrating BornAgain usage from C++
|Status:||Resolved||Start date:||17 Jun 2016|
We have in the directory ./Examples/cpp an example demonstrating how to simulate from C++.
It has to be repaired/revised, including CMakeList.txt which comes along.
The suggestion is to combine this with the major restructuring of our header files.
- Define minimal amount of header files which goes in the <installation>/header directory.
- Make sure that none of these files refer to gsl/boost/fftw headers.
- Use this opportunity to remove unnecessary headers along the whole code base.
- Include validation of cpp example in the release procedure.
#6 Updated by wuttke almost 4 years ago
- Status changed from Sprint to Resolved
Resolved in 33e970a: Example can be compiled, and generates simulated detector image that can be visualized with our standard Python script. README files are updated.
The files CylindersAndPrisms/CMakeLists.txt and modules/FindROOT.cmake demonstrate how to link with the installed BornAgain library (typically located at /usr/local/include/BornAgain-<version>).
Note that the BornAgain version number is hard-coded in modules/FindROOT.cmake; this is unsatisfactory, and needs to be addressed together with the entire installation and versioning scheme.
For the time being, this example is not put under continuous testing. There is no obvious way to do so, because we do not want to link with the »build« version of the BornAgain library, but with the installed version.