summaryrefslogtreecommitdiffstats
path: root/Source
Commit message (Collapse)AuthorAgeFilesLines
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-2124-42/+43
|
* CMake Nightly Date StampKitware Robot2017-09-211-1/+1
|
* Merge topic 'CTest-cov-string'Brad King2017-09-202-11/+10
|\ | | | | | | | | | | | | 062776e7 CTest: pass std::string to cmCTestCoverageHandler::ShouldIDoCoverage() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1290
| * CTest: pass std::string to cmCTestCoverageHandler::ShouldIDoCoverage()Rolf Eike Beer2017-09-192-11/+10
| | | | | | | | Avoid needless conversion back and forth.
* | Merge topic 'ninja-performance'Brad King2017-09-203-32/+59
|\ \ | | | | | | | | | | | | | | | | | | | | | 7374cb85 Ninja: Cache ConvertToNinjaPath results to avoid repeat work ed19e813 Ninja: Improve performance with deeply-dependent custom targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1217
| * | Ninja: Cache ConvertToNinjaPath results to avoid repeat workMatthias Maennich2017-09-192-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calls to this method may dominate generation time in some cases. Measurements for configuring cmake itself show a cache hit rate of ~57% (7753 total calls, 4453 cache hits). For a larger project (that also makes use of custom targets as prerequisite for all compile targets), the measured cache hit ratio is ~96% (2530827 total calls, 2433124 cache hits). For this project the observable cmake runtime could be reduced from 40s to 30s. Signed-off-by: Matthias Maennich <matthias@maennich.net>
| * | Ninja: Improve performance with deeply-dependent custom targetsMatthias Maennich2017-09-193-27/+44
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit v3.7.0-rc1~339^2 (Ninja: Fix inter-target order-only dependencies of custom command, 2016-07-20) might cause performance degradations for larger projects. Especially when using custom commands as an input for each compilation rule (e.g. generated headers). For reference in the following I am referring to Source/cmGlobalNinjaGenerator.cxx: -> cmGlobalNinjaGenerator::AppendTargetDependsClosure -> cmGlobalNinjaGenerator::ComputeTargetDependsClosure It turned out that the mentioned commit is doing (indirectly) some redundant work that might impact performance when generating large projects. Imagine the dependency tree of custom targets: A \ C - D - E / B For each target the transitive closure is calculated recursively, but as the TargetDependsClosures are only cached on the top most level, everything downstream has to be recalculated. I.e. A->C->D->E B->C->D->E This ultimately leads to a lot of redundant calls to AppendTargetOutputs. The recursive nature of the algorithm itself is not significant to the problem, but reducing the work to actually to be done work, eliminates the performance problem. This patch changes the way, intermediate results are cached. Rather than caching the closure of targets, we cache the closure of outputs. Such that in the example above at B->C the cache already would kick in. Caching the outputs has one disadvantage that the patch takes care of. In case of such a structure A E \ / \ C - D G / \ / B F the calling order for A would be A->C->D->E->G (at which time G is seen to the recursion) then the recursion returns until it reaches A->C->D->F (at which the seen G would prevent to recurse down to G) But this would poison the cache for F with a wrong value (without G). Hence we use a local result set to ensure the cache is still consistently populated. For a large C++ project with around 25k targets this reduced the CMake configure / generate time from ~40s to ~29s. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* | Merge topic 'tidy-modernize-loop-convert'Brad King2017-09-204-14/+7
|\ \ | | | | | | | | | | | | | | | | | | 706b37b7 Enable clang-tidy modernize-loop-convert lint Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1287
| * | Enable clang-tidy modernize-loop-convert lintBrad King2017-09-194-14/+7
| |/ | | | | | | | | Fix remaining diagnostics by this lint and remove it from our list of disabled lints.
* | Merge topic 'cxx11-nullptr'Brad King2017-09-2014-67/+68
|\ \ | | | | | | | | | | | | | | | | | | a5279ae5 Use C++11 nullptr (cont.) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1283
| * | Use C++11 nullptr (cont.)Matthias Maennich2017-09-1914-67/+68
| | | | | | | | | | | | | | | | | | | | | Fix remaining occurrences of the issue addressed in commit 5962db4389 (Use C++11 nullptr, 2017-08-22) that are only showing up on macOS. Signed-off-by: Matthias Maennich <matthias@maennich.net>
* | | Merge topic 'cxx-checks-tolerate-unused-flag'Brad King2017-09-201-1/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 71b65abc C++ feature checks: Filter out warnings caused by user flags eb3abf8b C++ feature checks: Prepare for multiple check output filters Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1286
| * | | C++ feature checks: Filter out warnings caused by user flagsBrad King2017-09-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Filter out `-Winvalid-command-line-argument` warnings from Clang (that can be caused by user-specified flags) so that they do not break our checks for C++ feature availability.
| * | | C++ feature checks: Prepare for multiple check output filtersBrad King2017-09-191-1/+2
| | |/ | |/|
* | | Merge topic 'CTest-crash-missing-glob'Brad King2017-09-201-0/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 6db63012 CTest: fix crash if source file for coverage cannot be found Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1289
| * | | CTest: fix crash if source file for coverage cannot be foundRolf Eike Beer2017-09-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The opened XML elements were not closed, so an assert was triggered when the file was finally closed. If CMake is built with assertions disabled then an invalid XML file will be produced.
| * | | Merge branch 'backport-autogen-target-depends' into release-3.9Brad King2017-09-131-25/+60
| |\ \ \ | | | | | | | | | | | | | | | Merge-request: !1257
| | * | | Autogen: Backport autogen target dependency as file dependency fixSebastian Holtermann2017-09-131-25/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target dependencies of the origin target were mistakenly forwarded to the _autogen target as *file* dependencies. This patch introduces proper distinction between *target* and *file* dependencies of the _autogen target. This patch also changes when PRE_BUILD is used for AUTOGEN in the Visual Studio generator. Formerly PRE_BUILD was disabled when the origin target depended on *any* other target. Now PRE_BUILD is only disabled if a dependency of the _autogen target to an additional *file* is detected. Fixes: #17278, #17205
* | | | | CMake Nightly Date StampKitware Robot2017-09-201-1/+1
| |_|/ / |/| | |
* | | | Merge topic 'ranged-for'Brad King2017-09-1918-389/+246
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f43baf69 Meta: modernize old-fashioned loops to range-based `for` (CPack). Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1274
| * | | | Meta: modernize old-fashioned loops to range-based `for` (CPack).Pavel Solodovnikov2017-09-1918-389/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* | | | | Merge topic 'string-clear'Brad King2017-09-1970-212/+212
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5db3aac1 Meta: replace empty-string assignments with `clear()`. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1276
| * | | | | Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-1570-214/+214
| |/ / / /
* | | | | Merge topic 'vs-manifestuac-flag-map'Brad King2017-09-198-25/+111
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3232f84c VS: Fix MANIFESTUAC link flag map to .vcxproj elements Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !526
| * | | | | VS: Fix MANIFESTUAC link flag map to .vcxproj elementscomicfans2017-09-188-25/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add special parsing of the flags given in `/MANIFESTUAC:"..."` in order to map them correctly to `.vcxproj` elements. Keep the old incorrect flag table entries for `uiAccess` and `level` flags for compatibility even though they do not really exist. Fixes: #16563
* | | | | | CMake Nightly Date StampKitware Robot2017-09-191-1/+1
| |_|_|_|/ |/| | | |
* | | | | Merge topic 'ctest-runcommand'Brad King2017-09-183-26/+42
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67529aab Doc: document that CoverageExtraFlags will come first 69fac3c3 pass arguments as vector to cmCTest::RunCommand() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1261
| * | | | | pass arguments as vector to cmCTest::RunCommand()Rolf Eike Beer2017-09-153-26/+42
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | The only 2 callers took care to construct a properly escaped string, but not using the documented way, and that string was passed only to be immediately split into tokens again. Start with a vector and join it only for logging, avoiding needless quotes during that.
* | | | | Merge topic 'cmake-gui-high-dpi'Brad King2017-09-181-0/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6fb36572 cmake-gui: Enable High DPI scaling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1271
| * | | | | cmake-gui: Enable High DPI scalingLuis Caro2017-09-151-0/+4
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This Qt flag enables UI scaling based on scale factor provided by the operating system. Only supported on versions of Qt >= 5.6. The flag has no effect on macOS, where high DPI support is already enabled as a setting in the bundle's info.plist. Fixes: #17026
* | | | | Merge topic 'libuv-bootstrap'Brad King2017-09-181-3/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 714ce728 bootstrap: Make libuv available during bootstrap 6a2d967d bootstrap: Require compiler mode aware of C99 on Solaris Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1131
| * | | | | bootstrap: Make libuv available during bootstrapBrad King2017-09-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On UNIX, build only the parts of libuv we need for the filesystem, process, and poll abstractions using the POSIX poll() backend. This avoids many platform-specific conditions. On Windows, build all of libuv; there are no conditional alternatives anyway.
* | | | | | Merge topic 'cxx11-override'Brad King2017-09-18254-1164/+1090
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 98530d3c cm_codecvt: Tell IWYU to keep cmConfigure.h 4e14498f Drop now-unused definition of CM_OVERRIDE 0b33aee4 Use C++11 override instead of CM_OVERRIDE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1265
| * | | | | | cm_codecvt: Tell IWYU to keep cmConfigure.hBrad King2017-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer need it explicitly for `CM_OVERRIDE`, but we still need to include it first everywhere.
| * | | | | | Drop now-unused definition of CM_OVERRIDEBrad King2017-09-153-32/+0
| | | | | | |
| * | | | | | Use C++11 override instead of CM_OVERRIDEBrad King2017-09-15251-1131/+1089
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* | | | | | CMake Nightly Date StampKitware Robot2017-09-181-1/+1
| | | | | |
* | | | | | CMake Nightly Date StampKitware Robot2017-09-171-1/+1
| | | | | |
* | | | | | CMake Nightly Date StampKitware Robot2017-09-161-1/+1
|/ / / / /
* | | | | Merge topic 'refactor-iwyu-code'Brad King2017-09-157-233/+303
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3bbe95f5 Clean up iwyu code to not be one big if statement. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1247
| * | | | | Clean up iwyu code to not be one big if statement.Bill Hoffman2017-09-137-233/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Merge topic 'codeblocks-exclude-external'Brad King2017-09-151-0/+20
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fb19b778 CodeBlocks: add option to exclude external files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1159
| * | | | | | CodeBlocks: add option to exclude external filesAlexandr (Sagrer) Gridnev2017-09-141-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add variable `CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` to optionally exclude files from outside the project root from the project file written by the CodeBlocks extra generator. This optionally restores logic that had been removed by commit v2.8.3~40^2 (CodeBlocks Generator: Do not omit files in the project file listing, 2010-10-05) in response to QTCREATORBUG-2250. Issue: #12110 Fixes: #17188
* | | | | | | Merge topic 'ranged-for'Brad King2017-09-1533-869/+606
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63f6fd14 Meta: modernize old-fashioned loops to range-based `for` (CTest). Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1262
| * | | | | | | Meta: modernize old-fashioned loops to range-based `for` (CTest).Pavel Solodovnikov2017-09-1433-869/+606
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* | | | | | | Merge topic 'update-kwsys'Brad King2017-09-152-66/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f02eced5 Merge branch 'upstream-KWSys' into update-kwsys 38b8017f KWSys 2017-09-14 (d85b17e7) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1263
| * | | | | | | Merge branch 'upstream-KWSys' into update-kwsysBrad King2017-09-142-66/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream-KWSys: KWSys 2017-09-14 (d85b17e7)
* | | | | | | | CMake Nightly Date StampKitware Robot2017-09-151-1/+1
|/ / / / / / /
* | | | | | | Merge topic 'get_filename_component-fix-program-split'Brad King2017-09-143-1/+79
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 31f73eb1 get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1251
| * | | | | | | get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semanticsBrad King2017-09-133-1/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The KWSys `SystemTools::SplitProgramFromArgs` implementation goes into an infinite loop when the value is just " " (a space). Since the "program path with unquoted spaces plus command-line arguments" operation it is trying to provide is poorly defined (string parsing should not depend on filesystem content), just stop using it. Instead consider the main two use cases the old approach tried to handle: * The value is the name or absolute path of a program with no quoting or escaping, but also no command-line arguments. In this case we can use the value as given with no parsing, and assume no arguments. * The value is a command-line string containing the program name/path plus arguments. In this case we now assume that the command line is properly quoted or escaped. Fixes: #17262