You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, thanks for providing and maintaining this library!
I noticed that GoogleTests is checked in as a part of the source and I'd like to suggest that CMake's ExternalProject feature could be used instead. It would allow cppfs to checkout and include it in the configure process. Additionally, this could become optional based on if find_package() cannot find an already installed GTest library on the host.
Please see GoogleTest readme for more information: Incorporating Into An Existing CMake Project (https://github.com/google/googletest/blob/4f4c01d8c86659f587ea0bc27c815ffa94fc9f72/googletest/README.md)
Main benefits include
3rd party code is not checked in
cppfs no longer need to update GoogleTest them self.
cppfs could easily point to specific git tag or branch of GoogleTest
GoogleTests source is not included if OPTION_ for tests is ON
If installed on host, Linking is easy as find_package(GTest WANTED_VERSION EXACT) and target_link_libraries with GTest::GTest and GTest::Main
If GoogleTests is downloaded and added to the project like suggested, just call target_link_libraries with gtest and gtest_main
If this sounds reasonable I would be happy to help out by sending a PR or further instructions.
Best regards
The text was updated successfully, but these errors were encountered:
Thanks for your interest in this project.
Within our cmake-init template, we currently examine alternative approaches to integrate googletest and googlemock. Our latest approach can be viewed in cginternals/cmake-init#97.
Hi!
First off, thanks for providing and maintaining this library!
I noticed that GoogleTests is checked in as a part of the source and I'd like to suggest that CMake's
ExternalProject
feature could be used instead. It would allowcppfs
to checkout and include it in the configure process. Additionally, this could become optional based on iffind_package()
cannot find an already installed GTest library on the host.Please see GoogleTest readme for more information: Incorporating Into An Existing CMake Project (https://github.com/google/googletest/blob/4f4c01d8c86659f587ea0bc27c815ffa94fc9f72/googletest/README.md)
Main benefits include
cppfs
no longer need to updateGoogleTest
them self.cppfs
could easily point to specific git tag or branch ofGoogleTest
GoogleTests
source is not included ifOPTION_
for tests is ONfind_package(GTest WANTED_VERSION EXACT)
andtarget_link_libraries
withGTest::GTest
andGTest::Main
target_link_libraries
withgtest
andgtest_main
If this sounds reasonable I would be happy to help out by sending a PR or further instructions.
Best regards
The text was updated successfully, but these errors were encountered: