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

Header dependencies #156

Open
jimon opened this issue May 23, 2016 · 3 comments
Open

Header dependencies #156

jimon opened this issue May 23, 2016 · 3 comments

Comments

@jimon
Copy link
Member

jimon commented May 23, 2016

In some cases I write something like build objects(build/**/*): auto src/**/*.c | src/**/*.h which have makes problems : every source file depends on every header file, so if you change a header file all source files are recompiled.

Would be nice to figure out how to depend on header so we can add them to the generated ide projects.

@jimon jimon added this to the v0.3 release milestone May 23, 2016
@jimon
Copy link
Member Author

jimon commented May 30, 2016

This is mostly needed for IDE project generation (CMake also requires you to add header files to target by yourself if you want them to end-up in ide project).

One idea - we can parse include dependencies from ninja itself, which should be awesome in a way, but kinda requires #154 and you need to build a project before you can generate ide project files ...

@den-mentiei
Copy link
Contributor

Full recompile on any header change is even a bigger problem than IDE project generation :rage1:

Shouldn't we just use deps feature of ninja? We can just build it once before generating the project and then parse it for header list.

@jimon
Copy link
Member Author

jimon commented Jun 12, 2016

If you write it like this build objects(build/**/*): auto src/**/*.c || src/**/*.h then it works just fine because we already are using ninja deps feature. The only thing - it's not that obvious.

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

No branches or pull requests

2 participants