From 48c1b518756c43989feb9702a0c91df130d48893 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Fri, 16 Nov 2012 12:59:44 +0100 Subject: [PATCH] Add new property indicating whether profiler is available --- src/Main/fg_commands.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 2230d7f3a..ac17b7eaa 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -1590,6 +1590,15 @@ fgInitCommands () typedef bool (*dummy)(); fgTie( "/command/view/next", dummy(0), do_view_next ); fgTie( "/command/view/prev", dummy(0), do_view_prev ); + + SGPropertyNode* profiler_available = + globals->get_props()->getNode("/sim/debug/profiler-available", true); +#ifdef FG_HAVE_GPERFTOOLS + profiler_available->setBoolValue(true); +#else + profiler_available->setBoolValue(false); +#endif + profiler_available->setAttributes(SGPropertyNode::READ); } // end of fg_commands.cxx -- 2.39.5