Skip to content
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

Integration with CMake #111

Open
bracketttc opened this issue Jul 12, 2021 · 2 comments
Open

Integration with CMake #111

bracketttc opened this issue Jul 12, 2021 · 2 comments

Comments

@bracketttc
Copy link

Is there any interest in integrating with CMake in the same way that GoogleTest is integrated?

So, you write something like this:

greatest_add_tests( TARGET testDriver
    SOURES ${test_sources}
    )

instead of:

add_test( greatest_tests
    COMMAND testDriver
    )

And get:

$ make test
Running tests...
Test project /path/to/project/build
     Start 1: greatest_test1
 1/3 Test #1: greatest_test1 ..............    Passed    0.1 sec
     Start 2: greatest_test2
 2/3 Test #2: greatest_test2 ..............    Passed    0.3 sec
     Start 3: greatest_test3
 3/3 Test #3: greatest_test3 ..............    Passed    0.1 sec

100% tests passed, 0 tests failed out of 3

Total Test time (real) =   0.51 sec
$

instead of:

$ make test
Running tests...
Test project /path/to/project/build
     Start 1: greatest_tests
 1/1 Test #1: greatest_tests ..............    Passed    0.5 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.51 sec
$

100% willing to write up the CMake module for it.

@silentbicycle
Copy link
Owner

I don't use CMake, so I wouldn't maintain it, but something could go in contrib/.

If you post a PR with CMake integration, please target the develop branch.

@silentbicycle
Copy link
Owner

Work in progress PR: #112.

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

2 participants