| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
When using the Ninja or Makefile generator with MSVC on Windows
we invoke the linker through a `cmake -E vs_link_{exe,dll}` wrapper.
Preserve the linker output encoding to match `link.exe` behavior
instead of forcing UTF-8.
|
|
|
|
|
|
|
| |
When using the Ninja or Makefile generator with MSVC on Windows
we invoke the resource compiler (`rc.exe`) to compile a manifest
resource. CMake generates the file with UTF-8 encoding so we
need to add a pragma to inform the resource compiler.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using ccache with clang-tidy, ccache needs to wrap compiler
invocation, rather than cmake invocation. But it needs to do it without
affecting the command line that iwyu-like tools are receiving.
With this fix, if __run_co_compile is used, compile launcher is passed
using the new --launcher option, but if __run_co_compile is not needed,
compiler launcher is prepended to the command line as before.
To better illustrate the change: with this fix if running clang-tidy
with CXX_COMPILER_LAUNCHER set to "/usr/bin/time;-p;ccache" (time -p
added strictly for illustration purposes), the command line changes
from:
/usr/bin/time -p ccache cmake -E __run_co_compile \
--tidy=clang-tidy ... -- g++ ...
to:
cmake -E __run_co_compile \
--launcher="/usr/bin/time;-p;ccache" \
--tidy=clang-tidy ... -- g++ ...
This allows the compiler to be run via the launcher, but leaves tidy
(& friends) invocations unaffected.
Fixes: #16493
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Change some functions to take `std::string` instead of
`const char*` in the following classes: `cmMakeFile`, `cmake`,
`cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator`
and a few others.
* Greatly reduce using of `const char*` overloads for
`cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
|
|
|
|
|
|
|
|
| |
This commit continues the changes made in CTest to support std::chrono
by
applying it throughout every component where a duration was used.
No functional change intended.
|
| |
|
|
|
|
|
|
|
|
| |
With the Ninja generator we may invoke `cmake_symlink_library` with
different slash conventions (`/` versus `\`) for different arguments.
Fix comparison of the paths/names given to tolerate this.
Fixes: #17579
|
|
|
|
|
|
|
|
| |
This commit makes cpplint act like the other compiler mirroring tools. It
will always return 0 even if it reports warnings and will only return non
zero if there is a problem running the command. In addition, it will now
add some extra text to allow CTest to recognize the warnings and report
them correctly to CDash.
|
| |
|
|
|
|
|
|
|
|
|
| |
Introduces the standalone RCC generator class `cmQtAutoGeneratorRcc`.
Every instance of `cmQtAutoGeneratorRcc` class handles the
`rcc` invocation for a single `.qrc` file.
The class will be used in the future to allow parallel `.qrc` file
processing by calling `cmake -E cmake_autorcc <INFO_FILE> <CONFIG>`.
|
|\
| |
| |
| |
| |
| |
| | |
5c07d390 cmcmd: Fix typo in RunCommand logic
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1473
|
| |
| |
| |
| |
| |
| |
| | |
Fix logic added by commit 18eae3f04d (Windows: Do not report manifest
tool update notification as failure, 2017-11-09).
Issue: #17444
|
|\ \
| |/
| |
| |
| |
| |
| | |
18eae3f0 Windows: Do not report manifest tool update notification as failure
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1470
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A diagnostic message added in commit v3.10.0-rc1~59^2 (Windows: Improve
link-time error messages when rc or mt fail, 2017-09-22) incorrectly
reports the `mt /notify_update` special return code as a failure.
Fix the logic to consider the special return codes as success.
Fixes: #17444
|
|\ \
| |/
| |
| |
| | |
Resolve a logical conflict by replacing `cmArray{Begin,End}` from
the their side with `cm::{cbegin,cend}` from our side.
|
| |
| |
| |
| |
| |
| |
| | |
Refactoring in commit v3.10.0-rc1~115^2 (Clean up iwyu code to not be
one big if statement, 2017-08-28) incorrectly changed the logic to run
only one lint tool at a time. Restore support for running all tools
specified on the command-line.
|
| |
| |
| |
| | |
These do not need to be declared in the header.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
std::{begin,end} are part of C++11, std::{cbegin,cend} are part of C++14
and an standard compliant implementation has been introduced within the
'cm' namespace: cm::{cbegin,cend}.
std::size is only part of C++17, hence exposing a compliant implementation
within namespace cm (cm::size).
where possible, the standard implementations are reused.
|
| |
|
|
|
|
|
|
|
| |
Fix issues diagnosed by clang-tidy by pre-allocating the vector capacity
before the loop [performance-inefficient-vector-operation].
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
|
|
|
| |
Signed-off-by: Matthias Maennich <matthias@maennich.net>
|
|
|
|
|
|
| |
We run extra tools during linking on Windows to deal with manifests.
Report more information when these tools fail. For example, if the
Windows SDK is not installed with VS then `rc.exe` will be missing.
|
|
|
|
|
| |
Fix remaining diagnostics by this lint and remove it from our list of
disabled lints.
|
|\
| |
| |
| |
| |
| |
| | |
3bbe95f5 Clean up iwyu code to not be one big if statement.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1247
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This
is used for co-compile commands. These are tools that want to mirror the
compiler. For each compiler invocation the tool will be invoked first. This
started as a way to implement include what you use (iwyu), but has expanded
to include cpplint, cppcheck and others. Likely there will be more in the
future as well. This commit implements each one in its own function and
provides a way to add additional ones in the future with less work.
|
|/
|
|
|
|
| |
Changes done via `clang-tidy` with some manual fine-tuning
for the variable naming and `auto` type deduction
where appropriate.
|
|
|
|
|
|
| |
Create a `<LANG>_CPPCHECK` target property (initialized by a
`CMAKE_<LANG>_CPPCHECK` variable) to specify a `cppcheck` command line
to be run along with the compiler.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
27d87fbd CTestCustom: Suppress exception loosening warning
7f29bbe6 server: always enable server
4614a3b2 server: backport to C++11
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1149
|
| | |
|
|/
|
|
| |
Also remove `#include "cmConfigure.h"` from most source files.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
cf0ae55d server: Add support for connections that aren't event based
5ddfb6a4 server: Add connection as part of a request
d4f5d35c server: Refactor to make the event loop owned by server object
5acbf08b Tests: Teach Server test to forward exit code from server process
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !552
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
* Use a parameter to select hash algorithm
* Return a std::string as result or an empty
string if it fails
* Avoids unnecessary copy of hash value
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
| |
|
|
|
|
|
|
| |
Create a `<LANG>_CPPLINT` target property (initialized by a
`CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker
command line to be run along with the compiler.
|
| |
|
|
|
|
|
|
|
|
| |
When using `<LANG>_CLANG_TIDY` our internal launcher for the tool must
capture its return code and stderr and report them on failure.
Otherwise incorrect command lines silently fail.
Closes: #16435
|
| |
|
|
|
|
|
|
|
|
| |
The include-what-you-use tool always returns non-zero to indicate that
it did not actually produce an object file as Clang would from the same
command line. Add a comment explaining that this is why we ignore its
return code. Also update our `pseudo_iwyu` test suite tool to always
exit with an error too.
|
| |
|