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

Visual Studio dependencies and the provided CustomBuildRules #78

Open
ArcaneTourist opened this issue Jun 22, 2021 · 3 comments
Open

Visual Studio dependencies and the provided CustomBuildRules #78

ArcaneTourist opened this issue Jun 22, 2021 · 3 comments

Comments

@ArcaneTourist
Copy link

ArcaneTourist commented Jun 22, 2021

Leaving this here for now, but please see update.

Many thanks for this project!

Maybe the CustomBuildRules instructions need an update for allowing compiling based on dependency timestamp handling?

This is the first time I'm using winflexbison or Visual Studio (I mostly do linux/unix), so perhaps I'm missing something, but I was surprised that VS only half-way handled dependencies for the bison outputs:

I was having an issue in Visual Studio 2019. VS would run bison if the *.tab.* files did not exist, but would not run bison if the *.y bison file had been changed. The issue turned out that the *.tab.* files (and all other source/header files) by default had a property of properties/general/exclude-from-build. Setting that property to "no" caused VS to understand that it needed to run bison whenever the *.y file changed (and also invoke the compiler for the *.tab.cpp and other source files).

I don't know if default exclude-from-build=yes is a recent change to VS, or if I somehow unexpectedly changed the stock defaults, or if the bison/flex rules could be updated to somehow set exclude-from-build=no when adding the *.tab.* files to a project. If this is normal VS behavior and the custom rules can't help with the exclude-from-build settings, then I suggest the instructions on the CustomBuildRules be updated to advise people to reset the exclude-from-build property when adding the *.tab.* files to a project.

@ArcaneTourist
Copy link
Author

OK.... The original issue report is all wrong. But, I don't know what the heck is going on. VS is intermittently ignoring my updates to the *.y file even when nothing else changes and regardless of the settings of exclude-from-build. I really can't imagine how that is happening, but if someone has a clue, I'd love to hear it.

@lexxmark
Copy link
Owner

I will try to reproduce your problem and get back to you with possible solution.

@lexxmark
Copy link
Owner

I have created a new project, added win_flex_bison custom build rules and added some *.y file to project.

There is an empty ExcludeFromBuild option there by default and I was able to successfully build 1.y and then added 1.tab.cpp/h files and after that any change in 1.y leads to rebuilding 1.y and thus regenerating 1.tab.cpp/h files.

image

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

No branches or pull requests

2 participants