In cmake how do you do a conditional preprocessor #ifdef #endif
.
For example there is a #ifdef #endif
below in a soruce file and I want to include this file during compliation?
How would you do that?
#ifdef LWM2M_WITH_LOGS
#include <inttypes.h>
#define LOG(STR) lwm2m_printf("[%s:%d] " STR "\r\n", __func__ , __LINE__)
#endif
The full source file is located here: Source file on github
And the CMakeLists.txt file is located here: CMakeLists.txt