| Source directory | /data/lofarschool/data/Exercise-CR |
|---|---|
| Contact person | Andreas Horneffer, Lars Bähren |
This is “just” the setup for the following CR exercises.
At the same time this should serve as a first exposition to the configuration/build system used by the User Software Group – when expanding upon the existing code base, this will be the environment to work within.
tcsh as your shell, then source /app/scripts/doUSG
will do the trick.
Use a simple “build environment” with CMake to compile and build the exercise tools.
/data/lofarschool/data/Exercise-CR
|-- build
|-- 2006.02.23.04:02:50.283.event
`-- src
|-- CMakeLists.txt
|-- Exercise-CR1.cc
|-- Exercise-CR2.cc
`-- Exercise-CR3.cc
In this CMakeLists.txt is the input file used by cmake to configure the project. The directory src holds the source code of everything we want to compile into an executable binary and will remain untouched. The build itself is performed out-of-source from within the directory build; the main advantage of this is, that the staging area non-identical to the area where all the source code is located – therefore in order to redo everything from scratch a complete removal of everything within build is possible, without affecting the original code.
src and build directories to your local directory: cp /data/lofarschool/data/Exercise-CR/src . cp /data/lofarschool/data/Exercise-CR/build .
build directory: cd build
cmake ../src
That should end with the lines:
-- Configuring done -- Generating done -- Build files have been written to: ...
make
You should see something like this:
Scanning dependencies of target exercise_cr1 [ 33%] Building CXX object CMakeFiles/exercise_cr1.dir/Exercise-CR1.cc.o Linking CXX executable exercise_cr1 [ 33%] Built target exercise_cr1 Scanning dependencies of target exercise_cr2 [ 66%] Building CXX object CMakeFiles/exercise_cr2.dir/Exercise-CR2.cc.o Linking CXX executable exercise_cr2 [ 66%] Built target exercise_cr2 Scanning dependencies of target exercise_cr3 [100%] Building CXX object CMakeFiles/exercise_cr3.dir/Exercise-CR3.cc.o Linking CXX executable exercise_cr3 [100%] Built target exercise_cr3 Elapsed: 0:25.39 - CPU: 20.197u+2.924s = 91.0%
Nothing here
cmake is not found, then add /usr/local/bin to your PATH. (You are probably using bash…)export PATH=$PATH:/usr/local/bin
If you are experiencing trouble getting the exercise to work, this is the place to leave a note about it.