Special build instructions

SlicerRT embedded build

  1. Build plastimatch in reduced mode with special flags:

    cmake \
     -DDCMTK_DIR:STRING=/path/to/Slicer-build/DCMTK-build \
     -DITK_DIR:STRING=/path/to/Slicer-build/ITKv4-build \
  2. Then, when building SlicerRT, tell it where the plastimatch build is located:

    cmake \
     -DSlicer_DIR:STRING=/path/to/Slicer-build/Slicer-build \
     -DPlastimatch_DIR:STRING=/path/to/plastimatch-build \

Coverage (gcov) build

  1. Build plastimatch in debug mode, with special flags:

    CMAKE_CXX_FLAGS:STRING=-fprofile-arcs -ftest-coverage
  2. To run standalone, go to the build directory, and run:

  3. To run an entire test suite, do this:

    ctest -D NightlyCoverage

Profile (gprof) build

  1. Set CMAKE_BUILD_TYPE to “Debug”
  2. Set CMAKE_C_FLAGS to “-pg”
  3. Set CMAKE_CXX_FLAGS to “-pg”
  4. Set CMAKE_EXE_LINKER_FLAGS to “-pg”
  5. Run “program args”
  6. Run “gprof program”

Memcheck (valgrind) build

  1. Build ITK in debug mode (optional, but recommended).

  2. Build plastimatch in debug mode.

  3. To run an individual test case, do this:

    valgrind --leak-check=yes plastimatch [options]
  4. To run an entire test suite, normally, you would do something like this:

    ctest -D ExperimentalMemCheck

    However, this doesn’t work, because ctest prepends valgrind directly to the test command, which in our case is a script.