-
Notifications
You must be signed in to change notification settings - Fork 205
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
Added an option for range-v3 to build tests #1535
base: master
Are you sure you want to change the base?
Conversation
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.
What's the advantage of the option? e.g. there aren't any external dependencies and you can restrict which tests to run by using the subproject name as a suite.
@@ -0,0 +1 @@ | |||
option('range_v3_tests', type : 'boolean', value : false) |
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.
- defaulting tests off means they aren't run in the wrapdb CI
- meson options are namespaces already, this option would get used as
-Drange-v3:range_v3_tests=true
. Don't include project names inside option names. Yes, I know you need it in cmake...
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.
i wanted to keep the variable name the same with the original repo (in upstream repo CMake configuration), but i agree having it just tests
would have a better ergonomics and also following the current conventions of the Wrap files.
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.
Still defaults to false?
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.
Umm, yes. Don't build the tests by default.
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.
Again, you need to make it build in CI. Previously it did so because it was enabled by default always.
See README.md.
The library files are header only which doesn't need to compile, enabled tests (400+ of them) need to compiled, waiting less and spending less CPU cycles would be some of the reason i guess :) |
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.
When fixing a review request in one commit, please use git commit --amend && git push --force
to update. :) It is one logical commit, not two.
Per README.md, the releases.json file contains information about the release, and should have the revision incremented when making changes to the meson.build files.
if get_option('tests') | ||
subdir('test') | ||
endif | ||
|
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.
There's stray whitespace at the end of the files you edited?
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.
Fixed :)
@@ -0,0 +1 @@ | |||
option('range_v3_tests', type : 'boolean', value : false) |
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.
Still defaults to false?
Ah right, those are still compiled by default even if the tests themselves don't run... |
Changed |
▹ grep -wl "'test'" subprojects/packagefiles/*/meson_options.txt | wc -l
4
▹ grep -wl "'tests'" subprojects/packagefiles/*/meson_options.txt | wc -l
45 |
585929d
to
9156bb4
Compare
Please do not have merge commits in your branch, keep your branch up to date using rebase instead. |
Thanks, will keep it in mind next time. |
There are two problems:
P.S. Sorry for not noticing the request to review. |
What does this mean??? |
Added `tests` build option and set it off by default.
Seems like something related with clang-cl version, the runner has version 16.0.6: range-v3| Project name: range-v3
range-v3| Project version: 0.12.0
range-v3| C++ compiler for the host machine: clang-cl (clang-cl 16.0.6) |
Added range_v3_tests build option and set it off by default.