| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases `GetShortPathNameW` may not remove all spaces. If that
happens with the path to `rc.exe`, cmcldeps needs to explicitly quote
the path in the command it runs.
This was exposed by commit 50a6e78a82 (cmSystemTools::RunSingleCommand():
Replace cmsysProcess with cmUVProcessChain, 2023-07-25, v3.28.0-rc1~138^2~4)
because the underlying process execution library no longer reconstructs the
command line without quotes around commands without spaces.
Fixes: #25355
|
|
|
|
|
|
|
|
|
| |
`rc /nologo /nologo ...` fails:
fatal error RC1106: invalid option: -ologo
Fixes: #24974
Inspired-by: Benjamin Buch <benjamin.buch@technoteam.de>
|
|
|
|
|
|
|
| |
Avoid cl `Command line warning D9035`.
Fixes: #24906
Co-authored-by: Brad King <brad.king@kitware.com>
|
|
|
|
| |
We never set `CMAKE_NINJA_CMCLDEPS_{C,CXX}` anymore.
|
|
|
|
| |
Fixes: #23772
|
|
|
|
|
| |
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.
|
| |
|
| |
|
|
|
|
|
| |
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`. Use `clang-format` version 6.0.
|
|
|
|
|
|
|
| |
Prior to LLVM 8.0, `llvm-rc` does not recognize `/fo` without a space
after it. Add the space unconditionally because MS `rc` accepts it too.
Issue: #18957
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|