cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

CMake: make PACKETFORMATS configurable and properly define CCNL_RIOT #348

Closed cgundogan closed 5 years ago

cgundogan commented 5 years ago

Contribution description

This contribution includes two changes

  1. it properly defines CCNL_RIOT as a cmake option. Without this change, cmake complains about CCNL_RIOT not being set/ignored by cmake. I set the default value to OFF for CCNL_RIOT. It can be turned on with -DCCNL_RIOT=ON when cmake is invoked.
  2. Existing packet formats are not easily configurable from the command line with the current solution. The proposed change defines options for each packet format.

You can look at the output of cmake -DCCNL_RIOT=OFF .. && make and cmake -DCCNL_RIOT=ON .. && make to see how the build system chooses the correct packet format.

Issues/PRs references

none

cgundogan commented 5 years ago

I added a second commit that removes the header files from the add_library call. It's not necessary, since the include directory is specified in the include_directories call above.

mfrey commented 5 years ago

@cgundogan We probably should update the (build) documentation. Also, do you care to open a PR for RIOT which introduces the changes on the RIOT side of things?