From 835c4663c833f0b044584e48dc871b49067c3f12 Mon Sep 17 00:00:00 2001
From: Marcel Koch <marcel.koch@uni-muenster.de>
Date: Wed, 20 Feb 2019 12:22:56 +0000
Subject: [PATCH] set full path without which

using which only works, if `generate_operators` is in `PATH`, otherwise cmake fails. This is especially the case if dune-codegen is configured completely new.
---
 cmake/modules/DuneCodegenMacros.cmake | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/cmake/modules/DuneCodegenMacros.cmake b/cmake/modules/DuneCodegenMacros.cmake
index bd3f9649..73ab6a5b 100644
--- a/cmake/modules/DuneCodegenMacros.cmake
+++ b/cmake/modules/DuneCodegenMacros.cmake
@@ -174,11 +174,8 @@ function(add_generated_executable)
 
   if(DUNE_CODEGEN_PROFILING)
     # This is a bit silly, but cProfile only finds entry point scripts
-    # if their full path is provided. So we resort to using which.
-    dune_execute_process(COMMAND which generate_operators
-                         OUTPUT_VARIABLE fullcommand
-                         OUTPUT_STRIP_TRAILING_WHITESPACE
-                         )
+    # if their full path is provided. 
+    set(fullcommand "${DUNE_PYTHON_VIRTUALENV_PATH}/bin/generate_operators")
   endif()
 	
   # Define build rules for all operator header files and gather a list of them
-- 
GitLab