simdutf icon indicating copy to clipboard operation
simdutf copied to clipboard

👷‍♀️ CMake: Guard Tests/Examples Behind CMake Variables

Open ThePhD opened this issue 3 years ago • 5 comments

This pull requests's goal is to make it easier to pull in the simdutf/simdutf dependency using CMake's FetchContent and add_subdirectory style. It simply gates the tests and demo/example code behind the SIMDUTF_TESTS flag, and does the same for the benchmarks.

It is on-by-default to preserve the same behavior users had when they were using the CMake previously.

The reason the current behavior without this pull request does not work well is because CTest does not understand when higher-level projects that include this change the layout of e.g. the binary output directory. This can lead to hard errors when tests are attempted to be run but cannot be found.

Another reason the current behavior also does not work well is there are, in many cases, times when running the tests of this repository is not desirable or wanted. Therefore, it should have some way of being controlled.

ThePhD avatar Jul 13 '22 05:07 ThePhD

It does seem reasonable. Let us run the tests.

lemire avatar Jul 13 '22 13:07 lemire

Awesome! Looks like all 17 checks pass. Anything else I need to do or run locally / on specific platforms to make sure this one's all set and square?

ThePhD avatar Jul 13 '22 22:07 ThePhD

Looks good to me. I expect that we shall merge prior to our next release!

lemire avatar Jul 13 '22 22:07 lemire

The tests may need to run again, but I think I've done everything properly. Thanks for all the feedback.

ThePhD avatar Aug 10 '22 20:08 ThePhD

Running.

lemire avatar Aug 10 '22 21:08 lemire