From fe3b42d709a5aca74f5ba8a661ce5caee021ba2c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 13 Aug 2021 10:19:17 +0300 Subject: [PATCH] aedi: make cmake project name matching more strict --- aedi/target/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aedi/target/base.py b/aedi/target/base.py index d6a41ed4..0b7981ad 100644 --- a/aedi/target/base.py +++ b/aedi/target/base.py @@ -370,11 +370,11 @@ class CMakeTarget(BuildTarget): project_name = None # Try to get project name without whitespaces in it - match = re.search(r'project\s*\(\s*(\w[\w-]+)', line, re.IGNORECASE) + match = re.search(r'^\s*project\s*\(\s*(\w[\w-]+)', line, re.IGNORECASE) if not match: # Try to get project name that contains whitespaces - match = re.search(r'project\s*\(\s*"?(\w[\s\w-]+)"?', line, re.IGNORECASE) + match = re.search(r'^\s*project\s*\(\s*"?(\w[\s\w-]+)"?', line, re.IGNORECASE) if match: project_name = match.group(1)