This change puts the natvis files in the project for VS2015 but it appears to use the none tag
<?xml version="1.0" encoding="UTF-8"?> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <CustomBuild Include="D:\t2\llvm\tools\clang\CMakeLists.txt" /> </ItemGroup> <ItemGroup> <None Include="D:\t2\llvm\tools\clang\utils\clang.natvis" /> </ItemGroup> <ItemGroup> </ItemGroup> </Project> It does seem to work correctly though... Whaddaya think?
Hmmm, I just tried adding set_source_files_properties(utils/clang.natvis LANGUAGE natvis) similar to what you suggest in http://lists.llvm.org/pipermail/llvm-dev/2016-January/093887.html, but it still produces the None tag in the .vcxproj file.
Edit: Reading the link more carefully, it looks like CMake would need to be modified to support Natvis as a language, which seems out-of-scope for Clang (plus, forcing people to get a new version of CMake just for this might be overkill). I think leaving the change the way it is is probably best as it doesn't cause VS2015 any trouble. Is that ok?
Yea, CMake doesn't actually support natvis files. You'd have to actually
patch CMake to make it work.
Can you make the vs2015 and vs2013 paths the same? It will still work for
2015 i think, just that 2015 also supports putting them in the project file
I'm not sure I understand. I'm not installing anything for VS2013. You still have to manually copy into Documents\Visual Studio 2013\Visualizers. The purpose of this change is to eliminate this manual step for VS2015 by leveraging the new Natvis project support. Am I missing something?
If it's not using a natvis tag in the vcxproj (which it isn't since CMake
doesn't support it during generation) then the new natvis project file
support won't work right? In which case the files would need to be copied
into documents\vs2015, otherwise it won't work, unless I'm misunderstanding
I understand your concerns, but on balance, I don't see a better course of action than what I've done. If I have some time, I'll submit a CMake change so we can eventually migrate to having CMake generate a Natvis tag, but that will take a long time to propagate, so I don't want to delay this operationally semantically equivalent change. Sound ok?
Assuming everything builds correctly, LGTM.
Your CMake is better than mine, so I'm not sure if there're better ways to do this ;)
Obsessive nit: Use a period after the "want", like want.
Is it just me, or is this a dead link?
Will do. Note that unfortunately, the CMakeLists.txt files are already inconsistent on that score...
It's not a link, it's an XML namespace. The idea is that you use a URL that you control as a namespace identifier to avoid collisions.
This is still showing as "Needs review" Are there any further changes required or can someone accept it? I installed both VS2015 and VS2013 on my laptop and saw the correct solution files built by cmake.