Distribution of RIO is included with ROSS as a git-submodule.1 The RIO package itself can be turned on or off through CMake. Thus, there should be no performance impact on those users who do not use RIO.

Getting RIO

To download the RIO submodule simply load the submodule. From your ROSS repository type:

    git submodule init
    git submodule update

Adding RIO in CMake

Adding the RIO package requires a CMake include and link command. Note that when linking libraries for your target, link with ROSS before RIO.

    INCLUDE_DIRECTORIES(${ROSS_SOURCE_DIR} ${ROSS_BINARY_DIR})
    INCLUDE_DIRECTORIES(${RIO_SOURCE_DIR} ${RIO_BINARY_DIR})
    ADD_EXECUTABLE(model.exe model.h model.c)
    TARGET_LINK_LIBRARIES(model.exe ROSS RIO m)

Note that this model now requires the RIO package. See the dpholdio target within PHOLD-IO for an example how to make RIO a CMake-configurable, optional package.

Turning on RIO

RIO has some direct modifications to the ROSS code. To keep the ROSS core functionality as lean as possible, the RIO code has been surrounded by #ifdef USE_RIO pragmas. Thus, the user must remember to turn on the RIO package within CMake when compiling and building the ROSS library.

This can be done either within the ccmake editor or through the cmake command line option -DUSE_RIO=ON.


  1. More information on Git submodules can be found here