👷♀️ CMake: Guard Tests/Examples Behind CMake Variables
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.
It does seem reasonable. Let us run the tests.
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?
Looks good to me. I expect that we shall merge prior to our next release!
The tests may need to run again, but I think I've done everything properly. Thanks for all the feedback.
Running.