Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Hans Wennborg 4ae9fc5880 clang-format vs plugin: set version number from cmake (PR20307)
Previously it was hard-coded to 1.0, which meant the installer would
not install the plugin over previous versions.

This commit makes us use LLVM's major.minor.patch version from cmake,
or whatever CLANG_FORMAT_VS_VERSION is set to when configuring the build.

It's pretty dirty to update a configuration file in the source directory
from the cmake build like this. However, the plugin build is already
dirty in this regard since it builds in the source dir when visual studio,
and then copies out the resulting vsix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213584 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-21 21:48:06 +00:00
Hans Wennborg 355a05cafa clang-format vsix cmake build: use ${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}
as the location for grabbing clang-format.exe, and also output the .vsix here.

This allows us to find clang-format.exe when building from a MSVC Solution.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196512 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-05 17:49:58 +00:00
Hans Wennborg ea654c32d9 CMake: enable building the clang-format vs plugin
This makes it possible to build the clang-format vs plugin from the cmake build.
It is a hack, as it shells out to "devenv" to actually build it, but it's hidden
away in a corner behind a flag, and it provides a convenient way of building the
plug-in from the command-line together with the rest of clang.

Differential Revision: http://llvm-reviews.chandlerc.com/D2310

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196299 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03 18:02:51 +00:00
Hans Wennborg c410ddbaca ClangFormatPackage.cs: fix inconsistent line endings
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196131 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 18:57:12 +00:00
Hans Wennborg f67b9ed867 clang-format vs plugin: use Alp's suggestion for getting the path
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196124 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 17:40:46 +00:00
Hans Wennborg f6de081f6b clang-format vs plugin: bake clang-format.exe into the vsix
This makes the clang-format plugin self-contained. Instead of
requiring clang-format.exe to be available on the PATH, this
includes it in the plugin's installer (.vsix file) and runs it
from the install directory.

Differential Revision: http://llvm-reviews.chandlerc.com/D2281

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196122 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 17:31:52 +00:00
Hans Wennborg 60c254c098 Clang format VS plugin: update build prerequisites in the README
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195690 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-25 21:42:06 +00:00
Alp Toker 6d7d0231c5 Add txt file extension to VS solution's README
This matches other README.txt files in LLVM and makes things more obvious on
Windows where it's likely to be read. CRLFs are retained for the same reason.

Also fix Visual Studio product name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195420 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22 08:00:20 +00:00
Manuel Klimek 43c2ec5448 Upgrade the VS solution to 2012.
Now we can compile a VSPackage that works with VS 2010-2013 from within VS 2012.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194488 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12 17:01:53 +00:00
Manuel Klimek 4fba6ae921 Fix key bindings for VS 2010.
Set the default key-binding only in the text editor; the
global binding of ctrl-r,ctrl-f was already taken in VS 2010.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194482 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12 15:25:18 +00:00
Manuel Klimek 701c45a6ff Recreated the ClangFormat VSPackage with VS 2010.
The generated package is now compatible with VS 2010 - 2013.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194480 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12 15:02:53 +00:00
Manuel Klimek 556af5cb0d Revert unintentional commit from r194477.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194478 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12 13:56:36 +00:00
Manuel Klimek 8f2b52be1f git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194477 91177308-0d34-0410-b5e6-96231b3b80d8 2013-11-12 13:54:22 +00:00
Hans Wennborg 9a7a50eef7 Allow _clang-format as alternative to .clang-format config filename
Dotfiles are impractical on Windows. This makes clang-format search
for the style configuration file as '_clang-format' in addition to
the usual '.clang-format'. This is similar to how VIM searches for
'_vimrc' on Windows.

Differential Revision: http://llvm-reviews.chandlerc.com/D1629

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190413 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-10 15:41:12 +00:00
Manuel Klimek 22d58ddc9e Make error text if clang-format is not on the system PATH more helpful,
as this is going to be a common mistake (installing LLVM defaults to not putting
the tools onto the PATH).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 08:31:48 +00:00
Manuel Klimek 15852fc162 Adds a VSPackage project that builds a VS extension to run clang-format over a selection / the line at the cursor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189955 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-04 16:11:46 +00:00