From 06579a46ed81ef5e6fbe6bf19bff3ff32c7f0bb0 Mon Sep 17 00:00:00 2001 From: armink Date: Mon, 17 Feb 2020 21:51:48 +0800 Subject: [PATCH] [tools] change the cpp eclipse project check function. --- tools/eclipse.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/eclipse.py b/tools/eclipse.py index 916041019a..0f001b8bb8 100644 --- a/tools/eclipse.py +++ b/tools/eclipse.py @@ -20,6 +20,8 @@ from utils import xml_indent import xml.etree.ElementTree as etree from xml.etree.ElementTree import SubElement +from building import * + MODULE_VER_NUM = 0 source_pattern = ['*.c', '*.cpp', '*.cxx', '*.s', '*.S', '*.asm'] @@ -139,11 +141,7 @@ def IsRttEclipsePathFormat(path): def IsCppProject(): - with open('.project', mode = 'r') as f: - for line in f.readlines(): - if line.find('org.eclipse.cdt.core.ccnature') != -1: - return True - return False + return GetDepend('RT_USING_CPLUSPLUS') def HandleToolOption(tools, env, project, reset): -- GitLab