Skip to content

Possibility of migrating to CMake and GoogleTest #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wdhongtw opened this issue Mar 21, 2025 · 0 comments
Open

Possibility of migrating to CMake and GoogleTest #4

wdhongtw opened this issue Mar 21, 2025 · 0 comments

Comments

@wdhongtw
Copy link

wdhongtw commented Mar 21, 2025

As Virgil already addressed in README, it's good to use GoogleTest and CMake.

I have a working example here https://github.com/wdhongtw/JSLikePromise/tree/feat-gtest .
One commit for migrate the testing framework to GoogleTest, and another for using CMake to do build automation / generation.

There are still some parts that not look good.

  • The test case/suite need to be prefix by All/Any/Valued..., since that the macro for GoogleTest seems to not support same name in different C++ namespace.
  • Trying to keep indentations and minimize the line of changes, but anonymous namespaces are introduced in test files.
  • The main target, the header-only library itself is not represented as a project in generated VS solution file.
  • GoogleTest is included by CMake FetchContent, so there is two 3rd target gtest and gtest_main in the generated solution file.

If this looks appealing, maybe I can submit PR and/or discuss how can we enhance this. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant