Made unit testing enhancements if HWY_TEST_STANDALONE is 1 #2323
+448
−40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added support for
--gtest_filter=
and--gtest_list_tests
command line arguments if HWY_TEST_STANDALONE is 1 to allow CMake to discover the Highway unit tests using the gtest_discover_tests action without actually running the unit tests and to allow CTest to execute only specific unit tests.Also added a HWY_TEST_STANDALONE option to CMakeLists.txt that will prevent CMake from downloading Google Test and that will add the
-DHWY_TEST_STANDALONE=1
option to the C++ compiler flags for the Google Highway unit tests if the HWY_TEST_STANDALONE CMake option is set to ON.The HWY_TEST_STANDALONE CMake option defaults to ON when compiling with MSVC and the HWY_TEST_STANDALONE option defaults to OFF when compiling with GCC or Clang.