-
Notifications
You must be signed in to change notification settings - Fork 190
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
[cmake:]fix the dependence to avoid generate files every time, even though no changed #258
base: master
Are you sure you want to change the base?
Conversation
Thanks for this PR. There is an old PR that wasn't merged addressing the same issue. I asked for input, as per my mention above. Also, does this work with both Ninja and Make backends? The CI build works with both, but that does not test rebuilds. I had a lot of problems getting rebuilds to work reliably with Ninja. |
Yes, It works with both of them, include rebuild |
Thanks, that is good to hear. Just to be sure: have you tested that the rebuild works after modifying a single file, for example in a test .c file, or a .fbs file the test depends on, like monster_test.fbs? Also, .h files in two levels of inclusion can sometimes be a problem, and so can included .fbs files. I'll wait to see if some of the other contributors has something to comment on. |
b28c531
to
21dc0f2
Compare
21dc0f2
to
b640c08
Compare
I refixed it, updated the commit. you can test it again |
I did not test all cases, but it does seem to work for incremental builds now, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this will break builds when using an older CMake version,
like the minimum required version 2.8.12.2:
...
CMake Error at samples/reflection/CMakeLists.txt:19 (list):
list does not recognize sub-command TRANSFORM
CMake Error at samples/reflection/CMakeLists.txt:24 (add_custom_command):
add_custom_command Wrong syntax. A TARGET or OUTPUT must be specified.
...
If I checked correctly the TRANSFORM sub-command was added in 3.12 and the other issue might be a trailing error.
Maybe we should move/copy the CMake test-step from weekly to CI? ..and possibly only run it if a CMakeLists.txt has been changed. An issue like this would have been shown directly then.
Having it in CI too definitely wouldn't hurt (though we don't change CMake that often). The weekly builds are much faster than a feared, except possibly macOS, so we could be more aggressive with CI testing. The discussion in the following PR may also be of interest. Note that a bit down I complain about how I had problems getting incremental builds working with Ninja. |
I'm not opposed to upgrading CMake at this point in time. The question is only to which version. It needs to be installable on most systems and supported trivially on fairly recent Ubuntu LTS as a minimum, as a guiding principle. |
Hi, sorry for the delay. The github workflow build passes but the appveyor build fails because the CMake version is too new. This also happens on the cmake branch. The good news is that the pr works with github actions. The reason I chose 3.18.4 is that this is latest CMake supported by Debian stable. However, our CI build is not fully ported to github workflows even if it does have some windows builds, and I cannot be bothered to try to update the Appveyor build to a version that might support a more recent version of CMake. So I will probably let this PR sit until we get better windows support on github workflows. @bjosv do you have any opinion on this? |
One option could be to use 3.12 as the minimum required CMake version since that would be the oldest version a user can have to successfully generate build files, independently of OS/distribution. One thing to know is that the version set in |
I could look into adding some more Windows tests, but Github Actions only provides |
If your are willing to do so, I can dig into installing older MSVC back to 2013 I think. I may have to PM you on specifics as it is under some unreleased software. I don't mind dropping MSVC 2010, it is not even a C compiler, really. |
Heads up on this PR after finally getting some time to work on this. As to CMake versions, Ubuntu 20.04 LTS uses CMake 3.16, Debian just made a new stable 12 "bookwork" with CMake 3.25, and CMake generally tends to complain about CMake < 3.5 not being supported in the future. |
I am no CMake expert, but there may also be some good ideas in the PR #168 that I just closed, as I cannot have all these overlapping build changes. |
aeccd46
to
56d2559
Compare
No description provided.