[Openmp-commits] [openmp] [OpenMP][omptest] Improve CMake and address review comments (PR #159416)
Michael Halkenhäuser via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 15 09:37:46 PST 2026
mhalk wrote:
> If would propose some simple code such which should work in all build modes.
>
> ```
> if (NOT TARGET default_gtest)
> add_subdirectory(${CMAKE_CURRENT_SOURCE_DIRECTORY}/../../../third-party/unittest)
> endif ()
> target_link_libraries(omptest PUBLIC default_gtest)
> ```
First off: sorry for the radio-silence, and thank you for the feedback!
After some thinking and discussions we decided that we currently only want to support "bootstrap" builds.
Also, I actually faced issues when trying to support other build modes, but that's another story entirely.
Ultimately, I *think* we are the only users of this unit testing library as of now.
Now, with the recent changes, we're fully reliant on `default_gtest` and also accommodate already set definitions from that target, which results in a much cleaner structure.
Since we are in bootstrapped mode, this target should be available anyways, if not: there are likely other issues as well.
As suggested I've tested that builds succeed in the following 8 configs:
`(bootstrapped) x (BUILD_SHARED_LIBS=ON/OFF) x (LLVM_BUILD_LLVM_DYLIB=ON/OFF) x (LIBOMPTEST_BUILD_STANDALONE=ON/OFF)`
Please, let me know if there's something else I should fix, change or check -- thanks again!
https://github.com/llvm/llvm-project/pull/159416
More information about the Openmp-commits
mailing list