Skip to content

Commit 50fdbba

Browse files
authored
Merge pull request #48 from qmfrederik/fixes/cleanup-gnustep-base-defines
Limit the number of define exported from GNUstep
2 parents 9ac8c72 + 8f101e7 commit 50fdbba

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

gnustep-base/conanfile.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ def package(self):
169169
if value:
170170
pc_data["cflags"].append(value)
171171

172-
pc_data["defines"] = pkg_config.defines
172+
# Export the defines which influence the behavior of GNUstep, but prevent generic defines,
173+
# such as NDEBUG or GSWARN and GSDIAGNOSE from being exported here; the user should be in control of those.
174+
defines = ["GNUSTEP_RUNTIME", "_NONFRAGILE_ABI", "GNUSTEP_BASE_LIBRARY", "GNUSTEP_WITH_DLL", "_NATIVE_OBJC_EXCEPTIONS"]
175+
for define in defines:
176+
value = next((x for x in pkg_config.defines if x.startswith(define)),None)
177+
if value:
178+
pc_data["defines"].append(value)
173179

174180
mkdir(self, os.path.dirname(self._pc_data_path))
175181
save(self, self._pc_data_path, yaml.dump(pc_data))

0 commit comments

Comments
 (0)