MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _apply_global_options

Method _apply_global_options

tools/ng/project.py:108–129  ·  view source on GitHub ↗

Apply global options to environment.

(self, env)

Source from the content-addressed store, hash-verified

106 env.AppendUnique(CPPDEFINES=self.local_defines)
107
108 def _apply_global_options(self, env) -> None:
109 """Apply global options to environment."""
110 # These options affect dependent groups too
111 if self.include_paths:
112 paths = [os.path.abspath(p) for p in self.include_paths]
113 env.AppendUnique(CPPPATH=paths)
114
115 if self.defines:
116 env.AppendUnique(CPPDEFINES=self.defines)
117
118 if self.cflags and 'CFLAGS' not in env:
119 env['CFLAGS'] = self.cflags
120
121 if self.cxxflags and 'CXXFLAGS' not in env:
122 env['CXXFLAGS'] = self.cxxflags
123
124 if self.libs:
125 env.AppendUnique(LIBS=self.libs)
126
127 if self.lib_paths:
128 paths = [os.path.abspath(p) for p in self.lib_paths]
129 env.AppendUnique(LIBPATH=paths)
130
131 def get_info(self) -> Dict[str, Any]:
132 """

Callers 1

buildMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected