diff --git a/README.md b/README.md
index df3598c4376762f9933c89acc0a6b1efb27a5bcb..f23438ea118c648acf1ec2a20f2135b8dc96013f 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,9 @@ generating high-performance integration kernels for dune-pdelab.
 a lot and there is no guarantee for interface stability ;).
 
 
+[![pipeline status](https://gitlab.dune-project.org/dominic/dune-perftool/badges/master/pipeline.svg)](https://gitlab.dune-project.org/dominic/dune-perftool/commits/master)
+
+
 ## Dependencies
 
 dune-perftool depends on the following software packages:
diff --git a/cmake/modules/DunePerftoolMacros.cmake b/cmake/modules/DunePerftoolMacros.cmake
index 074b5e5e22810ea2ac433c008244b5b751dafa60..66d0b4d7537b4ba44c69bfa4ebfd6b8fe9aae2c4 100644
--- a/cmake/modules/DunePerftoolMacros.cmake
+++ b/cmake/modules/DunePerftoolMacros.cmake
@@ -64,8 +64,14 @@ add_custom_target(generation)
 if(CMAKE_PROJECT_NAME STREQUAL dune-perftool)
   set(UFL2PDELAB_GLOB_PATTERN "${CMAKE_SOURCE_DIR}/python/*.py")
 else()
-  # TODO: How do we get to the source here???
-  message(WARNING "You are using dune-perftool from a downstream module. This may cause insufficient retriggers of code generation")
+  dune_module_path(MODULE dune-perftool
+                   RESULT perftool_path
+                   CMAKE_MODULES)
+  dune_execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env python ${perftool_path}/perftool_sourcepath.py
+                       OUTPUT_VARIABLE perftool_source
+                       OUTPUT_STRIP_TRAILING_WHITESPACE
+                       )
+  set(UFL2PDELAB_GLOB_PATTERN "${perftool_source}/*.py")
 endif()
 file(GLOB_RECURSE UFL2PDELAB_SOURCES ${UFL2PDELAB_GLOB_PATTERN})