Build gtest targets when building standalone only if LLDB_INCLUDE_TESTS
is true. Prior to this change, they were built whenever
LLVM_MAIN_SRC_DIR was available, independently whether tests themselves
would be run.
Details
Diff Detail
Event Timeline
lldb/CMakeLists.txt | ||
---|---|---|
20 | To be honest, I don't exactly like moving this option. The alternative I can think of is moving gtest and LLVMTestingSupport logic from LLDBStandalone into unittests. |
lldb/CMakeLists.txt | ||
---|---|---|
20 | So, how does this work in non-standalone builds? Is gtest built unconditionally, or is it guarded by something else (LLVM_INCLUDE_TESTS perhaps?) |
lldb/CMakeLists.txt | ||
---|---|---|
20 | It's guarded by LLVM_INCLUDE_UTILS + LLVM_INCLUDE_TESTS. |
lldb/CMakeLists.txt | ||
---|---|---|
20 | Ok, I think that's fine. I'm not particularly upset by that. Doing this work in the unittest directory would probably be fine too... |
To be honest, I don't exactly like moving this option. The alternative I can think of is moving gtest and LLVMTestingSupport logic from LLDBStandalone into unittests.