From a14ac6cd4ec7ddaac64db651e2276bf6edeefa5f Mon Sep 17 00:00:00 2001 From: MrZoraman Date: Tue, 13 Oct 2020 17:20:13 -0700 Subject: [PATCH] betterC flag enabled in generated visuald project file. Fixes #2024 --- changelog/betterc-generated-in-visuald.dd | 4 ++++ source/dub/generators/visuald.d | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 changelog/betterc-generated-in-visuald.dd diff --git a/changelog/betterc-generated-in-visuald.dd b/changelog/betterc-generated-in-visuald.dd new file mode 100644 index 000000000..f4917728b --- /dev/null +++ b/changelog/betterc-generated-in-visuald.dd @@ -0,0 +1,4 @@ +Add support for -betterC compiler flag to the visuald project generator + +If betterC is specified in the buildOptions, visuald project files will also be +configured to use betterC. diff --git a/source/dub/generators/visuald.d b/source/dub/generators/visuald.d index 2fce35646..17ec093be 100644 --- a/source/dub/generators/visuald.d +++ b/source/dub/generators/visuald.d @@ -313,6 +313,9 @@ class VisualDGenerator : ProjectGenerator { // Unittests ret.formattedWrite(" %s\n", buildsettings.options & BuildOption.unittests ? "1" : "0"); + // Better C + ret.formattedWrite(" %s\n", buildsettings.options & BuildOption.betterC ? "1" : "0"); + // compute directory for intermediate files (need dummy/ because of how -op determines the resulting path) size_t ndummy = 0; foreach (f; buildsettings.sourceFiles) {