[PATCH] CMake: Enable building clang-format's Visual Studio plugin
Alp Toker
alp at nuanti.com
Thu Nov 21 17:55:13 PST 2013
Hi Hans,
Impressed that you've coaxed cmake into building and bundling the VS
package..
However not so convinced it's the right deployment model:
1) The installer gets copied into Program Files -- then what? Does the
user have look for and install it separately, or is it the site
administrator's job? When the main uninstaller is run, does the
extension get left behind? If the main LLVM install is upgraded, what
happens the the extension, and which clang-format.exe version will it
end up calling into post-upgrade?
2) The target audiences are fairly distinct. Most clang-format Visual
Studio extension users likely don't want or need an LLVM installation.
This is the crowd who'd benefit most from a single click installation on
the download page that works the same way as other VS extensions.
Wouldn't it make more sense to offer the Visual Studio extension as a
separate download?
Alp.
On 22/11/2013 00:38, Hans Wennborg wrote:
> Hi klimek, rnk,
>
> This is pretty hacky, but it's hidden away in a corner behind a flag that's off by default.
>
> Having this flag enables us to build and include the plugin in the installer, which is nice.
>
> The .csproj changes were necessary for building the project on my machine. I don't really know what they mean.
>
> http://llvm-reviews.chandlerc.com/D2248
>
> Files:
> tools/CMakeLists.txt
> tools/clang-format-vs/CMakeLists.txt
> tools/clang-format-vs/ClangFormat/ClangFormat.csproj
>
> Index: tools/CMakeLists.txt
> ===================================================================
> --- tools/CMakeLists.txt
> +++ tools/CMakeLists.txt
> @@ -2,6 +2,7 @@
> add_subdirectory(driver)
> if(CLANG_ENABLE_REWRITER)
> add_subdirectory(clang-format)
> + add_subdirectory(clang-format-vs)
> endif()
>
> if(CLANG_ENABLE_ARCMT)
> Index: tools/clang-format-vs/CMakeLists.txt
> ===================================================================
> --- /dev/null
> +++ tools/clang-format-vs/CMakeLists.txt
> @@ -0,0 +1,6 @@
> +option(CLANG_FORMAT_BUILD_VS_PLUGIN "Build clang-format VS plugin" OFF)
> +if (CLANG_FORMAT_BUILD_VS_PLUGIN)
> + add_custom_target(CLANG_FORMAT_VSIX ALL
> + COMMAND devenv "${CMAKE_CURRENT_SOURCE_DIR}/ClangFormat.sln" /Build Release)
> + install(FILES ClangFormat/bin/Release/ClangFormat.vsix DESTINATION tools/)
> +endif()
> Index: tools/clang-format-vs/ClangFormat/ClangFormat.csproj
> ===================================================================
> --- tools/clang-format-vs/ClangFormat/ClangFormat.csproj
> +++ tools/clang-format-vs/ClangFormat/ClangFormat.csproj
> @@ -13,7 +13,7 @@
> <AssemblyName>ClangFormat</AssemblyName>
> <SignAssembly>true</SignAssembly>
> <AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
> <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
> <FileUpgradeFlags>
> </FileUpgradeFlags>
> @@ -35,6 +35,7 @@
> <IsWebBootstrapper>false</IsWebBootstrapper>
> <UseApplicationTrust>false</UseApplicationTrust>
> <BootstrapperEnabled>true</BootstrapperEnabled>
> + <TargetFrameworkProfile />
> </PropertyGroup>
> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
> <DebugSymbols>true</DebugSymbols>
> @@ -44,6 +45,7 @@
> <DefineConstants>DEBUG;TRACE</DefineConstants>
> <ErrorReport>prompt</ErrorReport>
> <WarningLevel>4</WarningLevel>
> + <Prefer32Bit>false</Prefer32Bit>
> </PropertyGroup>
> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
> <DebugType>pdbonly</DebugType>
> @@ -53,6 +55,7 @@
> <ErrorReport>prompt</ErrorReport>
> <WarningLevel>4</WarningLevel>
> <RunCodeAnalysis>true</RunCodeAnalysis>
> + <Prefer32Bit>false</Prefer32Bit>
> </PropertyGroup>
> <ItemGroup>
> <Reference Include="Microsoft.CSharp" />
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
--
http://www.nuanti.com
the browser experts
More information about the cfe-commits
mailing list