CMake: include(CTest) only when building tests.
This is needed in order to support usage of this library as a subdirectory in a parent project. In that situation, prior to this change, the inclusion of CTest would unconditionally enable BUILD_TESTING which would then bleed into other parts of the project. Also added some comments explaining how this logic works.
Showing
Please
register
or
sign in
to comment