From f9cf5de57c0a86923690f2c9484ba86600a21c99 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sat, 19 Nov 2011 20:01:06 -0500 Subject: [PATCH] Fix cache when include files are present. --- pyopencl/cache.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyopencl/cache.py b/pyopencl/cache.py index 1388e325..5dde1e9d 100644 --- a/pyopencl/cache.py +++ b/pyopencl/cache.py @@ -123,7 +123,7 @@ class ModuleCacheDirManager(CleanupBase): # {{{ #include dependency handling -C_INCLUDE_RE = re.compile(r'^\s*\#\s*include\s+[<"]([^">]+)[">]', +C_INCLUDE_RE = re.compile(r'^\s*\#\s*include\s+[<"](.+)[">]\s*$', re.MULTILINE) def get_dependencies(src, include_path): @@ -158,7 +158,9 @@ def get_dependencies(src, include_path): _inner(included_src) result[included_file_name] = ( - checksum.hexdigest(), os.stat(included_file_name).st_mtime) + os.stat(included_file_name).st_mtime, + checksum.hexdigest(), + ) found = True break # stop searching the include path -- GitLab