// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using Flax.Build;
using Flax.Build.NativeCpp;
///
/// Profiling tools module.
///
public class Profiler : EngineModule
{
///
/// Determinates whenever performance profiling tools should be enabled for a given build.
///
/// The options.
/// True if use profiler, otherwise false.
public static bool Use(BuildOptions options)
{
return options.Configuration != TargetConfiguration.Release || options.Target.IsEditor;
}
///
public override void Setup(BuildOptions options)
{
base.Setup(options);
// Don't ref Core module
options.PrivateDependencies.Clear();
options.PublicDefinitions.Add("COMPILE_WITH_PROFILER");
}
}