Skip to content

Commit 39777ca

Browse files
Fix the BoostTestDiscoverTests module for special case of no tests
The former commit contained a minor error which is fixed by this commit.
1 parent c66a5ce commit 39777ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/BoostTestAddTests.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ function(boosttest_discover_tests_impl)
159159
list(POP_BACK hierarchy)
160160
endforeach()
161161
endif()
162+
if (former_level STREQUAL NaN)
163+
set(hierarchy "") # Clear hierarchy because we have at least one test.
164+
endif()
162165
set(former_level ${next_level}) # Store depth-level for next loop-run.
163166

164167
# Extract the name of the next test suite/case and determine if enabled.

0 commit comments

Comments
 (0)