A repost from my old baking blog.
1 14.5 oz. can tart cherries (not cherry pie filling)
water if necessary
1/2 cup sugar
1 1/2 tablespoon cornstarch
Drain cherries, reserving liquid. Set cherries aside. Measure liquid — you need 1/2 cup; add water if necessary. Add sugar and cornstarch to liquid and whisk until dissolved. Transfer to a small saucepan and cook over medium heat, or until thickened. Remove from heat and fold in cherries. Refrigerate until needed, up to 24 hours.
This cherry filling can be used for cakes or pies. I prefer this method to buying ready-made pie filling because I’m trying to avoid food coloring and other artificial ingredients. If canned cherries are unavailable you can use dried cherries instead. Rehydrate them, then make this filling. The texture will be a different, but the flavor will be excellent nonetheless.
You can also use canned sweet bing cherries instead of the tart Montmorency or Morello, but certain preparations call for the sour cherry, e.g., traditional Schwarzwalder Kirschtorte or Black Forest Cake, coming soon.