I am trying to enable code analysis for my CMake driven project. I generate Visual Studio 2013 solutions, and would like to enable code analysis with a specific rule set. I know that I can enable the code analysis by specifying add\_definitions("/analyze") in my CMake file, but how do I control which rule set is used?

As far as I can see, the only way to control the ruleset used is via the xml element CodeAnalysisRuleSet in the project file, but I cannot access this from CMake.