Skip to content
Snippets Groups Projects
Commit 2be3467b authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[CMake][Bugfix] Fix search for test directories.

The patch from ...fce82c7d5ee5 broke the script.
This is the intended behavior.
parent 7664adbc
No related branches found
No related tags found
No related merge requests found
......@@ -2,10 +2,13 @@
cmake_policy(SET CMP0009 NEW)
file(GLOB_RECURSE makefiles RELATIVE ${RELPATH} "CMakeLists.txt")
foreach(_file ${makefiles})
string(REGEX MATCH ".*/test$" _testdir ${_file})
if(_testdir)
# path contains "/test"
string(REGEX MATCH ".*/test" _testdir ${_file})
# path end with "/test" and not "/testFoo" or "/test/foo"
string(REGEX MATCH ".*/test/CMakeLists.txt$" _testdirensured ${_file})
if(_testdir AND _testdirensured)
list(APPEND _makefiles ${_testdir})
endif(_testdir)
endif(_testdir AND _testdirensured)
endforeach(_file ${makefiles})
if(_makefiles)
message("${_makefiles}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment