From c929f5c967cd8347719e8377142a7f01557c3d64 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Thu, 10 Oct 2019 19:55:25 -0700 Subject: [PATCH] Error if profiling disabled and -pprof specifed. --- rtiow/src/bin/tracer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtiow/src/bin/tracer.rs b/rtiow/src/bin/tracer.rs index 293b3cb..9c3e3e6 100644 --- a/rtiow/src/bin/tracer.rs +++ b/rtiow/src/bin/tracer.rs @@ -97,6 +97,9 @@ fn main() -> Result<(), std::io::Error> { let opt = Opt::from_args(); let scene = opt.model.scene(&opt); fs::create_dir_all(&opt.output)?; + if opt.pprof.is_some() && !cfg!(feature = "profile") { + panic!("profiling disabled at compile time, but -pprof specified"); + } if let Some(ref pprof_path) = opt.pprof { PROFILER .lock()