| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Automate with:
git grep -l '#include <cm_' -- Source \
| xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g'
git grep -l '#include <cmsys/' -- Source \
| xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g'
git grep -l '#include <cm[A-Z]' -- Source \
| xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
|
|
|
|
|
| |
The /TC flag causes all source files to be processed as C source files.
We know that there is only one, so this is safe.
|
| |
|
| |
|
| |
|
|
|
|
| |
Use istringsream for parsing, ostringstream for generation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first). First
run `clang-format` with the config file:
---
SortIncludes: false
...
Commit the result temporarily. Then run `clang-format` again with:
---
SortIncludes: true
IncludeCategories:
- Regex: 'sys/types.h'
Priority: -1
...
Commit the result temporarily. Start a new branch and cherry-pick the
second commit. Manually resolve conflicts to preserve indentation of
re-ordered includes. This cleans up the include ordering without
changing any other style.
Use the following command to run `clang-format`:
$ git ls-files -z -- \
'*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
egrep -z -v '^Source/cm_sha2' |
egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
egrep -z -v '^Utilities/(KW|cm).*/' |
egrep -z -v '^Tests/Module/GenerateExportHeader' |
egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
xargs -0 clang-format -i
This selects source files that do not come from a third-party.
Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
|
|
|
|
|
| |
Each source file has a logical first include file. Include it in an
isolated block so that tools that sort includes do not move them.
|
|
|
|
|
|
|
| |
Extend the RunSingleCommand signature to capture stdout and stderr
separately. Allow both to be captured to the same std::string
to preserve existing behavior. Update all call sites to do this
so that this refactoring does not introduce functional changes.
|
|
|
|
|
|
|
|
|
|
|
| |
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.
The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
|
|
|
|
|
| |
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
|
|
|
|
|
| |
Make CMake compile with -DUNICODE. Make it possible for the 8 bit
encoding to eventually be UTF-8 instead ANSI.
|
|
|
|
|
|
|
| |
Ninja relies on the generator to produce paths that match up with the
paths used in the build.ninja file, which are spelled with backslashes.
Therefore, cmcldeps should canonicalize depfile paths to use backslashes
and relativize paths to the build directory.
|
|
|
|
| |
API, Borland, MinGW, UNIX, Mac OS X.
|
| |
|
|
|
|
|
|
| |
Warnings about invalid compiler options are printed first
by cl.exe, this line was suppressed when the source file
name didn't contain back slashes.
|
| |
|
|
|
|
|
|
| |
prevents silent disappearing of .d files for resource files.
cmcldeps changes directory for cl call, so relativ include paths do not work.
|
| |
|
|
|
|
|
| |
This simplifies the code in cmcldeps and avoids having yet another
set of process execution code.
|
| |
|
| |
|
|
|
|
|
| |
Why does the other compiler give no error?
Seems there is somewhere a "using".
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- disable cldeps on cygwin
- don't "use" namespace std
|
|
|
|
| |
Write to a file again but generate it in the object dir
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- don't depend on argument order
- update help
|
|
|
|
|
| |
Having Ninja's smart printing we are more allergic on
unneeded tool output.
|
| |
|
|
|
|
|
|
|
|
| |
rc.exe doesn't support /showIncludes.
Because .rc files also #include stuff we can
misuse cl.exe to get the included files.
Done one the fly by cmcldeps.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
cmcldeps wraps cl and adds /showInclude before calling cl.
It parses the output of cl for used headers, drops system
headers and writes them to a GCC like dependency file.
cmcldeps uses ATM ninja code for process handling,
but could be ported later to SystemTools.
TODO: Why needs ninja multiple calls in the BuildDepends test?
|