CTEST_CUSTOM_COVERAGE_EXCLUDE is not work

Hi everyone, I’m new to cmake, now I can run ctest -T Coverage to get my code coverage, then I want to exclude ./test/*.c, so I execute -fprofile-exclude-files= . /test/* and added list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE ".*test.*") in ./build/CTestCustom.cmake, but gcov still tries to find ./test/*.c and returns error 5 .

I try delete build/* then it’s work :ok_hand:

so close it