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

Add addIncludeDir to TestStep + fix build template #833

Closed
wants to merge 1 commit into from

Conversation

tiehuis
Copy link
Member

@tiehuis tiehuis commented Mar 14, 2018

Closes #794.

std/build.zig Outdated
@@ -1648,6 +1648,10 @@ pub const TestStep = struct {
self.verbose = value;
}

pub fn addIncludeDir(self: &TestStep, path: []const u8) void {
self.builder.include_paths.append(path) catch unreachable;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does fix the issue, but it adds the include directory globally. I think it should add the directory for only this build artifact.

@tiehuis
Copy link
Member Author

tiehuis commented Mar 15, 2018

It would be good to merge this before the 0.2.0 to fix the default build template else any new user would encounter an error there.

@andrewrk
Copy link
Member

Oops, I'm so sorry. I saw this just after creating the tag.

@andrewrk
Copy link
Member

This looks good. I'm going to add a test to test/standalone/ and then merge.

@andrewrk andrewrk closed this Mar 17, 2018
@andrewrk andrewrk deleted the issue-794 branch March 17, 2018 22:20
@andrewrk
Copy link
Member

andrewrk commented Mar 17, 2018

Merged. Thanks!

I'm thinking maybe in the future instead of --init we can have --init-lib and --init-exe which can be actual working examples. Then the build template can be tested in the main test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants