Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

betterC flag enabled in generated visuald project file. Fixes #2024 #2025

Merged
merged 1 commit into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/betterc-generated-in-visuald.dd
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions source/dub/generators/visuald.d
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ class VisualDGenerator : ProjectGenerator {
// Unittests
ret.formattedWrite(" <useUnitTests>%s</useUnitTests>\n", buildsettings.options & BuildOption.unittests ? "1" : "0");

// Better C
ret.formattedWrite(" <betterC>%s</betterC>\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) {
Expand Down