Development - smacklib/dev_smack_cpp GitHub Wiki

This describes the setup for development of smack_cpp. This information is not needed if smack_cpp is consumed by a project.

Project preparation for development of smack

The common setup for development is to activate the build of the tests and the examples.

For each of the platforms used for the implementation of smack a dedicated configuration script exists. These necessarily reflect biased settings for the different platforms. If something does not work for you, adapt the script to your needs.

Mac

Source the cmakeMac.src script to generate a Makefile-based project. Note that due to the age of my Mac (MacBook Pro (15 inch, mid 2010)) this project uses the gcc compiler installed by brew install gcc. Here is the rest of the story. On newer Macs with XCode installed remove the overrides of the C++ and C compiler.

Windows

Execute the cmakeWindowsVc.bat script to generate a Visual C++ project.

Cmake options

  • set( CMAKE_INSTALL_PREFIX "./dist" CACHE STRING "Default." )

By default the install target installs the generated artifacts into the directory dist in the build directory. This is only required in advanced build integration scenarios where the recommended way to consume smack_cpp based on CMake's FetchContent function cannot be used. In a standard consumer setup this target is not required.

  • option( ENABLE_TESTS "Enable testing" OFF )

Allows to activate building the tests. For smack_cpp development this should be activated.

  • option( ENABLE_EXAMPLES "Enable building examples" OFF )

Allows to activate building the examples. For smack_cpp development this should be activated.

General setup

  • Source file encoding is utf-8.