summaryrefslogtreecommitdiffstats
path: root/Source/cmcldeps.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmcldeps: Restore support for rc.exe path not fully GetShortPathName-dBrad King2023-10-231-1/+2
| | | | | | | | | | | | | 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
* cmcldeps: Avoid passing /nologo more than once to RC compilerBrad King2023-06-071-2/+11
| | | | | | | | | `rc /nologo /nologo ...` fails: fatal error RC1106: invalid option: -ologo Fixes: #24974 Inspired-by: Benjamin Buch <benjamin.buch@technoteam.de>
* cmcldeps: Do not pass linker flags to clBenjamin Buch2023-06-071-19/+5
| | | | | | | Avoid cl `Command line warning D9035`. Fixes: #24906 Co-authored-by: Brad King <brad.king@kitware.com>
* cmcldeps: Remove unused C and CXX supportBenjamin Buch2023-06-071-9/+4
| | | | We never set `CMAKE_NINJA_CMCLDEPS_{C,CXX}` anymore.
* MSVC: Recognize -XYZ as well as /XYZ when parsing MS tool command linesDubach, Joev2022-07-271-0/+1
| | | | Fixes: #23772
* cmcldeps: Suppress rc dummy outputOrgad Shaneh2021-11-291-1/+2
| | | | | Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384 Copyright (C) Microsoft Corporation. All rights reserved.
* cmcldeps: replace inefficient std::string::substr usageRolf Eike Beer2020-03-231-26/+24
|
* replace private startsWith() implementation with cmHasPrefix()Rolf Eike Beer2020-03-231-8/+4
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-3/+5
| | | | | 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.
* RC: Pass output file in a way that llvm-rc 7 and below understandZsolt Parragi2019-02-271-1/+1
| | | | | | | 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
* Using front() and back() instead of calculationsCengizhan Pasaoglu2018-11-061-1/+1
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-2/+2
| | | | | | | | | | | | | 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'
* cmcldeps: prefer the /TC flagBen Boeckel2016-10-141-6/+1
| | | | | 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.
* cmcldeps: append strings as stringsBen Boeckel2016-10-141-1/+1
|
* cmcldeps: search for single-byte strings as charactersBen Boeckel2016-10-141-2/+2
|
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-161-0/+1
|
* Prefer istringstream and ostringstream over stringstream.Daniel Pfeifer2016-06-141-1/+1
| | | | Use istringsream for parsing, ostringstream for generation.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-64/+66
| | | | | | | | | | | | | 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Source: Stabilize include orderBrad King2016-04-291-2/+2
| | | | | 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.
* cmSystemTools: Teach RunSingleCommand to separate stdout and stderrBrad King2015-04-201-2/+3
| | | | | | | 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.
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-1/+1
| | | | | | | | | | | 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.
* Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-1/+1
| | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* Windows: Use wide-character system APIsClinton Stimpson2013-12-091-3/+4
| | | | | Make CMake compile with -DUNICODE. Make it possible for the 8 bit encoding to eventually be UTF-8 instead ANSI.
* Ninja: Make cmcldeps depfile output more consistent with 'ninja -t msvc'Reid Kleckner2013-07-261-9/+24
| | | | | | | 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.
* Fix spelling and typos (product names)Andreas Mohr2013-05-071-1/+1
| | | | API, Borland, MinGW, UNIX, Mac OS X.
* Resolve warnings about shadowing parameters and local variables.Stephen Kelly2012-11-131-0/+4
|
* Ninja: don't suppress warning about compiler optionsPeter Kümmel2012-09-041-1/+3
| | | | | | 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.
* Ninja: readd quotes to src file path before patching itPeter Kümmel2012-07-161-0/+3
|
* Ninja: also stop when .rc's .d file couldn't be generatedPeter Kümmel2012-07-151-3/+6
| | | | | | prevents silent disappearing of .d files for resource files. cmcldeps changes directory for cl call, so relativ include paths do not work.
* Ninja: print error message when command failedPeter Kuemmel2012-06-281-17/+8
|
* Remove process execution code from cmcldeps and have it use cmake code.Bill Hoffman2012-06-271-482/+34
| | | | | This simplifies the code in cmcldeps and avoids having yet another set of process execution code.
* Ninja: disable cldeps for bcc32, it's too old, and ninja would also not buildPeter Kuemmel2012-06-181-6/+1
|
* Ninja: try work around for bcc32 bugPeter Kuemmel2012-06-171-1/+7
|
* Ninja: build server fixesPeter Kuemmel2012-06-171-3/+3
| | | | | Why does the other compiler give no error? Seems there is somewhere a "using".
* Ninja: maybe this fixes the bcc32 buildPeter Kuemmel2012-06-161-0/+1
|
* Ninja: msvc6 for-scopingPeter Kuemmel2012-06-161-7/+7
|
* Ninja: build with old msvc versionsPeter Kuemmel2012-06-161-20/+31
|
* Ninja: build server fixesPeter Kuemmel2012-06-161-52/+51
| | | | | - disable cldeps on cygwin - don't "use" namespace std
* Ninja: some bytes of the rc files couldn't be piped correctlyPeter Kuemmel2012-06-151-9/+18
| | | | Write to a file again but generate it in the object dir
* Ninja: don't remove space between command and parametersPeter Kuemmel2012-06-151-1/+1
|
* Ninja: build cmcldeps with mingwPeter Kuemmel2012-06-151-0/+2
|
* Ninja: but cl supports /nologo ...Peter Kuemmel2012-06-151-3/+4
|
* Ninja: no /nologo option in old rc.exePeter Kuemmel2012-06-151-3/+2
|
* Ninja: don't pollute build dir with preprocessed rc filesPeter Kuemmel2012-06-151-1/+1
|
* Ninja: ninja now also could read parentheses in .d filesPeter Kuemmel2012-06-141-8/+4
|
* Ninja: cmcldepsPeter Kuemmel2012-06-141-38/+39
| | | | | - don't depend on argument order - update help
* Ninja: suppress startup logosPeter Kuemmel2012-06-141-3/+5
| | | | | Having Ninja's smart printing we are more allergic on unneeded tool output.
* Ninja: onyl use pre processor for rc file parsingPeter Kuemmel2012-06-131-16/+12
|
* Ninja: extract dependencies for .rc files with msvc toolsPeter Kuemmel2012-06-131-20/+74
| | | | | | | | 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.