On Thu, 30 Aug 2018 14:48:38 +0300 "Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote: > On 30.08.2018 05:43, Steven Rostedt wrote: > >> set(PLUGIN_LIST "") > >> > >> +ADD_PLUGIN(NAME sched_events > >> + SOURCE sched_events.c SchedEvents.cpp) > > Do all plugins need to be added like this? Is there a way to make a > > default rule for a "plugin" directory, that we add source files of this > > type and have them created automatically just by adding in the source > > files? > > > >> + > >> +# list(APPEND PLUGIN_LIST "sched_events default") # This plugin will be loaded by default > >> +list(APPEND PLUGIN_LIST "sched_events") # This plugin isn't loaded by default > >> + > > Yes, in order to add a plugin you have to do two things. First you have > call the ADD_PLUGIN function. Second, you have to add the plugin to the > list of plugin names, specifying if the plugin will be loaded by default. > > It is possible to make it working just by adding the source files but I > am not a big fan of this approach. If we go this way we have to enforce > very strict rules for naming the files. Note that this plugin is build > form one .c file and one .cpp file, however the plugin for renamed > threads will have only one .c file. And in the future we may have > plugins having .py files. > OK, we'll just have to revisit this in the future. For now this is fine. Thanks Yordan! -- Steve