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

CMAKE: doctest_discover_tests() error when ADD_LABELS is not specified #524

Closed
ArcEarth opened this issue Jul 22, 2021 · 2 comments
Closed

Comments

@ArcEarth
Copy link

Description

Regression introduced by #464
When doctest_discover_tests(<target>) does not have ADD_LABELS ... options, test discovery breaks with the following error:

[build] CMake Error at doctest/2.4.6/lib/cmake/doctestAddTests.cmake:60 (if):
[build]   if given arguments:
[build] 
[build]     "EQUAL" "1"
[build] 
[build]   Unknown arguments specified

Steps to reproduce

Building anything with doctest_discover_tests(<target>) without extra options.

  • doctest version: v2.4.6
  • cmake version: v3.19.4
  • Operating System: OSX 11.4
  • Compiler+version: Clang 11.0.4
@jharmer95
Copy link
Contributor

I have encountered this as well. Particularly annoying because I can't easily change the file for my CI/CD
Line 60 can be changed to either

if (add_labels EQUAL 1)

or

if (${add_labels})

I can prepare a PR for this fix

@onqtam
Copy link
Member

onqtam commented Nov 4, 2021

should be fixed in dev!

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

3 participants