ENH: remove code duplication and use cmVisualStudioGeneratorOptions for all versions of vs 7 and greater.