Cannot have per config CTestCustom files

I would like to execute some scripts before starting ctest via the CTestCustom file and CTEST_CUSTOM_PRE_TEST. But I cannot differentiate between configurations meaning;

if I do “ctest -C RelWithDebInfo”, I would like to use either a config version of the file or CTEST_CUSTOM_PRE_TEST_ versions of the variables.

Maybe there is a way but I could not figure out.