From bcda69c1e5c4e281d7b5b2c56648fe15a38209ce Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 16 Nov 2016 22:10:04 +0100 Subject: [PATCH] Extended the Build.PL to understand an environment variable SLIC3R_PROFILE to set the C++ symbol of the same name to enable Shiny profiler. --- xs/Build.PL | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xs/Build.PL b/xs/Build.PL index 0eed91c61..98af40ead 100644 --- a/xs/Build.PL +++ b/xs/Build.PL @@ -46,6 +46,12 @@ if ($ENV{SLIC3R_GUI}) # push @early_includes, qw(slic3r/GUI/wxinit.h); } +if ($ENV{SLIC3R_PROFILE}) +{ + print "Slic3r will be built with a Shiny invasive profiler\n"; + push @cflags, qw(-DSLIC3R_PROFILE); +} + if ($ENV{SLIC3R_HAS_BROKEN_CROAK}) { # Some Strawberry Perl builds (mainly the latest 64bit builds) have a broken mechanism