As usual however, the answer's not that simple.
The problem with this question is the specificity of the scenario. Usually when CPR is performed on a cardiac arrest victim, it is followed by a full emergency response. Paramedics give the victim electric shock, deliver medications and fluid, and place an artificial airway to complete the resuscitation effort.
In the case of a victim in a remote location miles from civilization, emergency help can be so far away it is excluded from the survival equation.
CPR all by itself with no other treatment has been enough to resuscitate victims in some studies, but the evidence is slim. Most emergency healthcare providers will tell you that in our experiences, CPR is just one part of successful resuscitation. Even if the victim wakes up with CPR only, he'll have some sort of heart muscle damage that requires quick treatment to prevent another cardiac arrest.
In some cases where CPR works without any other treatments, the victim's heart hadn't really stopped. In those cases victims may have had syncope, which to the untrained eye can seem like cardiac arrest. The blood pressure can get so low during syncope that CPR for a short time could actually be beneficial. Whether syncope or something else, in one study as many as 75% of victims resuscitated successfully with only CPR were not actually in cardiac arrest.
There have been cases of cardiac arrest brought on by a sudden blow to the chest. These are unusual, but they respond well to CPR (especially with a defibrillator handy) and there's a good chance no permanent damage was done to the heart. This is the best case scenario for successfully resuscitating a victim who fell while rock climbing or had some other hard hit by only doing CPR.
Lightning strikes often cause cardiac arrest as well, and these patients should get CPR right away. Unlike a sudden hit to the chest, lightning strikes come with lots of damage to the heart and other organs.
I couldn't find anything to suggest how long CPR should be performed before the rescuer gives up. This is an important issue when you're miles from the nearest help, especially since the rescuer may be alone with the victim. Doing CPR until completely exhausted is likely to leave you vulnerable to exposure or fatigue out in the elements, which could have disastrous consequences. It's reasonable to try CPR for a victim in cardiac arrest, but it's also reasonable for the rescuer to stop before becoming so exhausted that she puts herself in danger.
This is a judgment call that no current research can answer for you. Here's hoping you'll never have to try.
Sources:
De Maio, V.J., et al."CPR-only survivors of out-of-hospital cardiac arrest: implications for out-of-hospital care and cardiac arrest research methodology." Annals of emergency medicine. Jun 2001.
Gallagher, E.J., Lombardi, G. and Gennis, P. "Effectiveness of bystander cardiopulmonary resuscitation and survival following out-of-hospital cardiac arrest." JAMA. 27 Dec 1995.
Herlitz, J., et al."Characteristics and outcome in out-of-hospital cardiac arrest when patients are found in a non-shockable rhythm." Resuscitation. Jan 2008.
Herlitz, J., et al."Factors associated with an increased chance of survival among patients suffering from an out-of-hospital cardiac arrest in a national perspective in Sweden." American heart journal. Jan 2005.
Lockey, D., Crewdson, K. and Davies, G. "Traumatic cardiac arrest: who are the survivors?." Annals of emergency medicine. Sep 2006.
O'Keefe Gatewood, M., and Zane, R.D. "Lightning injuries." Emergency medicine clinics of North America. May 2004.
Sanna, T., et al."Cardiopulmonary resuscitation alone vs. cardiopulmonary resuscitation plus automated external defibrillator use by non-healthcare professionals: a meta-analysis on 1583 cases of out-of-hospital cardiac arrest." Resuscitation. Feb 2008.
Willis, C.D., et al."Cardiopulmonary resuscitation after traumatic cardiac arrest is not always futile." Injury. May 2006.

