diff --git a/cmake/modules/DuneCodegenMacros.cmake b/cmake/modules/DuneCodegenMacros.cmake
index 6a02c01633260e251d0516024acf29efebb27b88..787f9d48399d35ae25062f59d8d2343cce2f9607 100644
--- a/cmake/modules/DuneCodegenMacros.cmake
+++ b/cmake/modules/DuneCodegenMacros.cmake
@@ -116,7 +116,7 @@ function(add_generated_executable)
   if(NOT GEN_UFLFILE)
     message(FATAL_ERROR "Need to specify the UFLFILE parameter for add_generated_executable")
   endif()
-  if(NOT IS_ABSOLUTE GEN_UFLFILE)
+  if(NOT IS_ABSOLUTE ${GEN_UFLFILE})
     set(GEN_UFLFILE ${CMAKE_CURRENT_SOURCE_DIR}/${GEN_UFLFILE})
   endif()
   if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${GEN_INIFILE})