Home‎ > ‎

Building

Building core-moos

Preparing :

To build the code you will need to have downloaded it. Instructions on how to do that are here. Let us start by assuming you have the source in a directory called src in a directory called core-moos.

Building

The documentation pdf for MOOS goes into some gory detail on the options available to you as you build MOOS and you are advised to look there. However the vast number of users will need something so vanilla it makes sense to quickly go through the simplest of cases here.

In-place builds are filthy things so we won't do it. Instead make a sibling directory so called "build" and move into it. So the source in is core-moos/src and we want to make core-moos/build

mkdir build; cd build

Then run ccmake pointing to ../src

ccmake ../src

You will presented with a simple screen of options. Keep pressing 'c' until the 'g' options occurs meaning "generate" make files. The default setting are fine but you are strongly recommended to turn on USE_ASYNC_COMMS. Your cmake screen will look something like this

CMAKE_BUILD_TYPE                 release
CMAKE_CXX_COMPILER               /usr/bin/c++
CMAKE_C_COMPILER                 /usr/bin/cc
CMAKE_INSTALL_PREFIX             /usr/local
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT
COMPRESSED_MOOS_PROTOCOL         OFF
DISABLE_NAMES_LOOKUP             OFF
ENABLE_CDASH_TARGETS             OFF
ENABLE_DOXYGEN                   OFF
ENABLE_EXPORT                    ON
ENABLE_V10_COMPATIBILITY         OFF
USE_ASYNC_COMMS                  ON


Press [enter] to edit option               CMake Version 2.8.11.1
Press [c] to configure
Press [h] for help           Press [q] to quit without generating
Press [t] to toggle advanced mode (Currently Off)



Then actually build the code. 

make

you should see an output like this:

Scanning dependencies of target MOOS
[  1%] Building CXX object Core/libMOOS/CMakeFiles/MOOS.dir/Thirdparty/PocoBits/src/Event.cpp.o
[  3%] Building CXX object Core/libMOOS/CMakeFiles/MOOS.dir/Thirdparty/PocoBits/src/Mutex.cpp.o
[  5%] Building CXX object Core/libMOOS/CMakeFiles/MOOS.dir/Thirdparty/PocoBits/src/Timestamp.cpp.o
[  6%] Building CXX object Core/libMOOS/CMakeFiles/MOOS.dir/Thirdparty/PocoBits/src/Exception.cpp.o
....
....

you should see no errors and no warnings. core-moos has built and goodies await you in the bin directory. We suggest you now have play and follow the first steps



Comments