clangmetatool fails if it can't find gtest
LegalizeAdulthood opened this issue · 2 comments
Describe the bug
Missing gtest causes clangmetatool to fail to build
To Reproduce
Steps to reproduce the behavior:
- Clone clangmetatool
- Configure a build with cmake without gtest on your system
- clangmetatool fails to configure
Expected behavior
I should be able to build and install clangmetatool without building and running the gtest test suite
Environment (please complete the following information):
- Happens on both Windows and Linux
Additional context
The workaround is to simply comment out the bottom of the CMakeLists.txt
where it looks for gtest and adds the test subdirectory.
Suggested fix is to look for gtest as a non-required package and if found add the test directory.
How about something like -DBUILD_TESTING=ON/OFF
to enable/disable testing. Rather than just have tests turn themselves off, if you build with testing on then you need to have gtest installed, if testing is off then it won't try to build them