| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
If threading is added, I think we need something like this in CMake: option(SIMDUTF_ENABLE_THREADS "thread support" ON)
if(SIMDUTF_ENABLE_THREADS)
find_package(Threads REQUIRED)
target_add_library(something_that_requires_threads PRIVATE Threads::Threads)
target_compile_definitions(something_that_requires_threads PRIVATE SIMDUTF_THREADS_ENABLED=1)
endif()Right? If we now require multithreading support for building simdutf, this requires changes to... https://github.com/simdutf/simdutf/blob/master/cmake/simdutf-config.cmake.in E.g., we should add... include(CMakeFindDependencyMacro)
if("@ SIMDUTF_ENABLE_THREADS@")
find_dependency(Threads)
endif()
Otherwise, this will break some builds. |
Sorry, something went wrong.
We can parallelize the builds with an additional flag... cmake --build build ▶️ cmake --build build -j (we could do even more so by configuring with Ninja). |
Sorry, something went wrong.
I tested this approach. We provide the same set of command line arguments as GTest and can use gtest_discover_tests. I think it's way better solution, as we can freely use all ctest facilities and do not clutter our code with threads and related stuff. |
Sorry, something went wrong.
A single test program may run multiple tests. This change modifies test programs to handle GTests command line options required by CMake/CTest to discover tests[1]. Thanks to that we may use CTest facilites, especially parallel running. [1] https://cmake.org/cmake/help/git-master/module/GoogleTest.html#command:gtest_discover_tests.
| Back | FazBrowse Home | New Git URL |
single test program may run multiple tests. This change modifies test programs to handle GTests command line options required by CMake/CTest to discover tests[1]. Thanks to that we may use CTest facilites, especially parallel running.
[1] https://cmake.org/cmake/help/git-master/module/GoogleTest.html#command:gtest_discover_tests.
On my machine ctest -j on master takes 31 second, while on this branch only 22 seconds.