I am not sure how far this works for VS2013 solutions. With Visual Studio 2015 I am using Project User Templates (*.vcxproj.user) with something along the following lines:
C:\MyProject\Template.USERNAME.user
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<CodeAnalysisRuleSet>@CMAKE_SOURCE_DIR@\SecurityRecommended.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
</Project>
You will probably have to change a few things like the ToolsVersion to 12.x.
The @CMAKE_SOURCE_DIR@
will automatically get replaced by cmake when you use the CONFIGURE_FILE
function to generate the actual PROJECT.vcxproj.user file. I have the following line in the CMakeLists.txt of my projects:
SET(USER_NAME $ENV{USERNAME} CACHE STRING UserName)
SET(USER_FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.vcxproj.user)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/Template.${USER_NAME}.user ${USER_FILE} @ONLY)
In the end, I would assume you could user-define anything that's in the PROJECT.vcxproj with those templates.