Skip to content

Commit f6dc641

Browse files
kaidegitRbb666
authored andcommitted
[tools][cmake] get some info from env to save time (#10062)
[tools][cmake] remove some code that is unnecessary but takes time, get them from env
1 parent e269098 commit f6dc641

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: tools/cmake.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
* 2024-07-04 kaidegit Let cmake generator get more param from `rtconfig.py`
1717
* 2024-08-07 imi415 Updated CMake generator handles private macros, using OBJECT and INTERFACE libraries.
1818
* 2024-11-18 kaidegit fix processing groups with similar name
19-
* 2024-11-18 kaidegit fix missing some flags added in Sconscript
19+
* 2025-02-22 kaidegit fix missing some flags added in Sconscript
20+
* 2025-02-24 kaidegit remove some code that is unnecessary but takes time, get them from env
2021
"""
2122

2223
import os
@@ -32,7 +33,6 @@ def GenerateCFiles(env, project, project_name):
3233
"""
3334
Generate CMakeLists.txt files
3435
"""
35-
info = utils.ProjectInfo(env)
3636

3737
PROJECT_NAME = project_name if project_name != "project" else "rtthread"
3838

@@ -177,14 +177,14 @@ def GenerateCFiles(env, project, project_name):
177177
cm_file.write('\n')
178178

179179
cm_file.write("INCLUDE_DIRECTORIES(\n")
180-
for i in info['CPPPATH']:
180+
for i in env['CPPPATH']:
181181
# use relative path
182182
path = _make_path_relative(os.getcwd(), i)
183183
cm_file.write( "\t" + path.replace("\\", "/") + "\n")
184184
cm_file.write(")\n\n")
185185

186186
cm_file.write("ADD_DEFINITIONS(\n")
187-
for i in info['CPPDEFINES']:
187+
for i in env['CPPDEFINES']:
188188
cm_file.write("\t-D" + i + "\n")
189189
cm_file.write(")\n\n")
190190

0 commit comments

Comments
 (0)