Skip to content

Disable Introspection resources in compile time

Daniel Adam edited this page Sep 6, 2023 · 2 revisions

Version: 2.2.5.7

There are two introspection resources available:

  • /oc/wk/introspection
  • /oc/introspection

Both resources can be queried using a GET request and return introspection data for the queried device. Previously, these resources were always compiled into the library. However, now they can be disabled, and the corresponding code will not be compiled into the archive, and its public headers will not be installed with the rest of the IoTivity-lite library.

Disabling with CMake

To disable the compilation of the entire introspection feature when building with CMake, use the OC_INTROSPECTION_ENABLED switch. By default, it is turned on. To disable it, add -DOC_INTROSPECTION_ENABLED=OFF to your CMake invocation.

mkdir build && cd build
cmake .. -DOC_INTROSPECTION_ENABLED=OFF

Disabling with make

To disable the compilation of the entire introspection feature when building with make, use the INTROSPECTION switch. By default, it is turned on. To disable it, add INTROSPECTION=0 to your make invocation or environment.

cd port/linux
make INTROSPECTION=0