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

[CMake] Fix regex to find directories "test" with all sub dirs.

The regex wrongly matched directories ending in "test",
cf. FS#1553.
parent 406a091b
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ cmake_policy(SET CMP0009 NEW)
file(GLOB_RECURSE makefiles RELATIVE ${RELPATH} "CMakeLists.txt")
foreach(_file ${makefiles})
# path contains "/test" or is directly "test"
string(REGEX MATCH "(.*/)*test" _testdir ${_file})
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)
......
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