Here’s the conventional take on it, from the Catholic Encyclopedia:
newadvent.org/cathen/09736b.htm
The key sentence seems to be this one:
…a martyr, or witness of Christ, is a person who, though he has never seen nor heard the Divine Founder of the Church, is yet so firmly convinced of the truths of the Christian religion, that he gladly suffers death rather than deny it.
From the same article, Saint Cyprian is quoted as adding the following qualification:
…he cannot be a martyr who is not in the Church; he cannot attain unto the kingdom who forsakes that which shall reign there