On 09/17/2020 12:55 PM, Xiang Ma wrote:
Hi, Marucs,
I find this in the link you mentioned:
Using Logging in Out of Tree Modules
In order to use the logging interface in an out of tree module based
on a gr_modtool template module, several CMake modifications are
required. Without these changes, logging will be disabled.
GrMiscUtils.cmake module must be included in the OOT module top level
CMakeLists.Texts file, and the GR_LOGGING() function provided by
GrMiscUtils must be called from the same top level CMakeLists.txt
file. This will set the appropriate build environment and during that
process, attempt to find the log4cpp package using the
FindLog4Cpp.cmake module. This module is not included in the module by
gr_modtool, but is part of the GNU Radio codebase and can be copied
directly into the cmake/Modules/ directory of the OOT module.
Once these CMake changes are made, the GR logging interface will
function as documented on this page.
But I do not know how to do that.
Is it
include(GrMiscUtils.cmake)
GR_LOGGING()
?
Best,
I *think* that's correct, but I'm not a CMake expert. Somebody else
should probably comment on the correct procedure/syntax to get
this accomplished.