alliedmodders / ambuild

AlliedModders C++ Build System
BSD 3-Clause "New" or "Revised" License
61 stars 32 forks source link

add header file support for Visual Studio project files #48

Closed thewavelength closed 4 years ago

thewavelength commented 7 years ago

More convenient use for Visual Studio users.

Example line for AMBuilder file below the sourceFiles-variable:

# header files
project.headers = [os.path.join('smsdk_config.h')]
# add all headers we added as source
project.headers += [os.path.splitext(source)[0] + '.h' for source in sourceFiles if os.path.splitext(source)[1] != '.rc']
dvander commented 4 years ago

Getting to this way too late, my apologies - I'm trying to check in or close out old PRs that affect the API (so when I fork to the next API version, bugs don't carry over).

But I'm conflicted over this one. It's a totally reasonable idea, but I don't like having hidden parameters, they'd need to be documented. And when I tried writing the documentation for this PR, it struck me as odd that headers were visual only. They don't create a source dependency and don't even need to be a valid file.

So I think to take this, we'd need a different name ("include_hotlist"?). Or, we should fully integrate "headers" into the dependency graph. I might sneak this in as part of the upcoming 2.2 API, but until then, I'll leave this open as a reminder/feature request.

dvander commented 4 years ago

As of PR #115 we now have full support for this.

dvander commented 4 years ago

Whoops, wrong PR, sorry.

dvander commented 4 years ago

I ran with include_hotlist, this is merged with PR #118.