summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-206-21/+10
|\ \ | | | | | | | | | | | | | | | | | | 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-196-21/+10
| |/ | | | | | | | | 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 'fix-compiler-failure-formatting'Brad King2017-09-206-12/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | f23def2c Improve formatting of compiler failure error message Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1285
| * | | Improve formatting of compiler failure error messageBrad King2017-09-196-12/+18
| | |/ | |/| | | | | | | | | | | | | When we report that a compiler was unable to build a simple test program, indent the output of the attempt so that our message formatting will show it as a pre-formatted block.
* | | 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 branch 'release-3.9'Brad King2017-09-200-0/+0
|\ \ \
| * | | CMake 3.9.3v3.9.3Brad King2017-09-201-1/+1
| | | |
* | | | Merge branch 'release-3.9'Brad King2017-09-200-0/+0
|\ \ \ \ | |/ / /
| * | | Merge branch 'CTest-crash-missing-glob' into release-3.9Brad King2017-09-191-0/+2
| |\ \ \ | | | | | | | | | | | | | | | Merge-request: !1289
* | \ \ \ 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.
* | | | 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
* | | | | Merge topic 'gtest-fix-windows-linking'Brad King2017-09-192-58/+85
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e2cca9f8 FindGTest: Avoid macro name collision 4636c64b FindGTest: Improve test to catch link error 35061791 FindGTest: Fix shared linking on Windows 9fd9e448 FindGTest: Avoid using find_dependency in a find module Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1267
| * | | | | FindGTest: Avoid macro name collisionMatthew Woehlke2017-09-181-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use two _'s for private function/macro names rather than one. This avoids a potential collision if a function/macro with no leading _ that otherwise matches the name of a private function/macro also overrides a built-in function or is defined twice.
| * | | | | FindGTest: Improve test to catch link errorMatthew Woehlke2017-09-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a reference to one of Google Test's command-line flags to the FindGTest test. This will ensure that we are using the correct compile definitions on Windows, as the test will otherwise fail to link. (IOW, this tests the changes made by the previous commit.)
| * | | | | FindGTest: Fix shared linking on WindowsMatthew Woehlke2017-09-181-44/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add logic to FindGTest.cmake to attempt to determine if the libraries are shared or static. If the libraries are shared, add an interface compile definition that is needed in some cases for successful linking on Windows. See also https://github.com/google/googletest/issues/877.
| * | | | | FindGTest: Avoid using find_dependency in a find moduleMatthew Woehlke2017-09-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `find_dependency` macro is not meant for use in find modules. Instead use plain `find_package` for the Threads package. Assume that if it is not found then it isn't needed on the current platform. Issue: #17257
* | | | | | Merge topic 'FindBoost-IN_LIST'Brad King2017-09-191-5/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a929dd16 FindBoost: Simplify search in lists Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1281
| * | | | | | FindBoost: Simplify search in listsAlex Turbov2017-09-181-5/+9
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of `list(FIND...)` and then checking result for `-1` (found/not-found), nowadays `if` command has the `IN_LIST` test for that. This change was originally made by commit v3.9.0-rc1~41^2 (FindBoost: Simplify search in lists, 2017-04-23) but then had to be reverted by commit v3.9.2~3^2 (FindBoost: Revert "Simplify search in lists.", 2017-09-05) due to problems related to using `find_dependency`. Those problems were addressed by commit 3080a0a611 (FindBoost: Improve behavior when thread dependency is missing, 2017-09-15), so now we can restore the original change. Issue: #17252
* | | | | | Merge topic 'target_system_docs'Brad King2017-09-193-10/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 77eb212d Help: Clarify/make consistent the APPLE, UNIX and WIN32 variable docs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1279
| * | | | | | Help: Clarify/make consistent the APPLE, UNIX and WIN32 variable docsCraig Scott2017-09-183-10/+7
| | | | | | |
* | | | | | | CMake Nightly Date StampKitware Robot2017-09-191-1/+1
| |/ / / / / |/| | | | |
* | | | | | Merge topic 'ctest-runcommand'Brad King2017-09-184-26/+44
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | Doc: document that CoverageExtraFlags will come firstRolf Eike Beer2017-09-151-0/+2
| | | | | | |
| * | | | | | 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 'findmpi-overhaul'Brad King2017-09-189-483/+1340
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bf1e606f FindMPI: Add support for FreeBSD and SLES 2f673da6 FindMPI: Support components for various languages 9a58e69c FindMPI: Modernization from ground up Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !893
| * | | | | | FindMPI: Add support for FreeBSD and SLESChristian Pfeiffer2017-09-151-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #17117
| * | | | | | FindMPI: Support components for various languagesChristian Pfeiffer2017-09-153-19/+79
| | | | | | |
| * | | | | | FindMPI: Modernization from ground upChristian Pfeiffer2017-09-158-480/+1250
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a near-total rewrite of FindMPI implementing the following features: Environmental improvements: - C++ settings can now be picked from C settings if no dedicated C++ settings are found (some installs of IBM Platform MPI) - Fortran settings can now be found on MPICH-1, MVAPICH-1, Microsoft MPI and MPICH-2 on Windows. - Improved flag procession logic: Flags related to security enhancements of MPI itself, and unrelated to MPI usage (-fstack-protector-strong on e.g. RHEL 7 for MPICH and MVAPICH) will be filtered out properly now. -pthread is now being handled. -fno-strict-aliasing, which may be needed while compiling MVAPICH (e.g. RHEL 7's MVAPICH package) is also filtered. Features added: - MPI version can be determined for each language and is exposed as the package version - MPI functionality is being tested to ensure the correctness of settings - MPI-2 C++ bindings can be suppressed if desired by the project or user. For older MPIs, this often resolves issues and eliminated the infamous SEEK_SET trouble. - MPI-2 C++ bindings are now being searched for and exposed by a variable if detected. - Fortran support now does not make assumptions over the MPI present and works with ILP64 MPI implementations. - Fortran now exposes which bindings (mpif.h, mpi/mpi_f08 modules) are available - MPI detection can now work hybridly, which for example permits using the Fortran modules shipped with some compiler suites together with MPI (e.g. PGI on Windows shipping MSMPI modules) - Ability to determine MPI library version (*requires* try_run, caution) upon request - Ability to determine Fortran capabilities from MPI-3 for each of the bindings (subarrays, asynchronous attribute protecting entities) (also requires try_run) Fine grained control over the search process: - Possibility to selectively enable and disable steps like compiler wrapper search and guessing. Permits picking Microsoft MPI over Intel MPI if both are loaded (previously not possible without removing the IMPI compiler wrappers from the environment) - Ability to pick MPICH2 over MSMPI (previously the first one located was taken) - A user may now pass compiler flags to the compiler wrapper script, enabling much more flexibility. This permits for example linking the Intel MPI debug runtime, static linking, ILP64 with Fortran, linking tracing, ... - A user may define a suffix for all MPI binaries that are being looked for (useful on Debian/Ubuntu where the alternative MPI installs are each appended with their name, e.g. mpicc.mpich and mpicc.lam) Cache variable improvements - Instead of the previous plural cache variables a list-of-variables approach is now in place. Permits correcting individual variables instead of having to wade through a list, also speeds up the search process and increases comfort by eliminating duplicate entries in LIBRARIES over languages - MPIEXEC was corrected to MPIEXEC_EXECUTABLE in order to fix the grouping in the CMake GUI for the variable (previously ungrouped)
* | | | | | Merge topic 'FindBoost-no-find_dependency'Brad King2017-09-181-4/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3080a0a6 FindBoost: Improve behavior when thread dependency is missing Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1272
| * | | | | | FindBoost: Improve behavior when thread dependency is missingBrad King2017-09-151-4/+14
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `find_dependency` macro is not meant for use in find modules and `return()`s from the caller when the package is not found. Avoid using it in FindBoost. Instead use plain `find_package` for the Threads package and manually forward the `QUIET` argument. When the Threads package is missing then treat the Boost `thread` component as missing. Issue: #17257
* | | | | | 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-1810-14/+317
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1710-14/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | bootstrap: Require compiler mode aware of C99 on SolarisBrad King2017-09-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Solaris some system headers included in C with `-D_XOPEN_SOURCE=600` require C99 support by the compiler.
* | | | | | | Merge topic 'cxx11-override'Brad King2017-09-18255-1165/+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