Commit Graph

23500 Commits

Author SHA1 Message Date
Matthias Maennich b128f8c5bc Clean up some C-Style casts
Fix issues diagnosed by clang-tidy [google-readability-casting]

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:41 -04:00
Matthias Maennich bb0ad1bea8 Fix some occurrences using string by value rather than by const&
Fix issues diagnosed by clang-tidy
 - performance-unnecessary-value-param
 - performance-unnecessary-copy-initialization

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:40 -04:00
Matthias Maennich 8cc33aeaec Replace several occurrences of empty string comparisons by string::empty()
Fix issues diagnosed by clang-tidy [readability-container-size-empty]

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:40 -04:00
Matthias Maennich ffefdb2c08 clang-tidy: Make .clang-tidy a build-time dependency
Currently a change to the clang-tidy configuration remains unnoticed for
incremental builds in the way that it won't trigger a rebuild. This can be
considered a missing dependency that this patch fixes by introducing a
compile time definition (-DCLANG_TIDY_SHA1) that triggers a rebuild upon
change. Currently this only applies to the target CMakeLib.

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-28 07:23:39 -04:00
Brad King 068effa4d8 Merge topic 'auto_ptr'
f0489856 Retire std::auto_ptr and its macro CM_AUTO_PTR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !1300
2017-09-27 07:25:11 -04:00
Brad King bb371753cb Merge topic 'vs-guid-tolerate-no-curly'
b3e6514c VS: Adapt project parsers to support "ProjectGUID" without curly brackets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1313
2017-09-27 07:23:51 -04:00
Brad King 2c50f7a795 Merge topic 'reduce-strcpy'
e43cb4c1 CursesDialog: avoid calling strcpy()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1311
2017-09-27 07:16:47 -04:00
Brad King 05e234cb16 Merge topic 'autogen-per-config-sources'
4603d6b0 Autogen: Docs: Add documentation internal links
f86ba8ee Autogen: Reintroduce per-config sources support
5d3bca64 Autogen: Rename cmQtAutoGen::GeneratorType to cmQtAutogen::Generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1307
2017-09-27 07:15:12 -04:00
Brad King f75ac39692 Merge topic 'ninja-rc-depfile-quoting'
df965cb9 Ninja: Fix quoting of RC language depfile in cmcldeps call

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1309
2017-09-27 07:14:17 -04:00
Brad King 09350f19e0 Merge topic 'revert-perf-source-lookup'
a7005c98 Tests: Add case for legacy source file property behavior
1604716d Revert "Performance: Improve efficiency of source file lookup in cmMakefile"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1308
2017-09-27 07:11:07 -04:00
Kitware Robot 4d0f040aa4 CMake Nightly Date Stamp 2017-09-27 00:01:04 -04:00
Fredrik Orderud b3e6514c2a VS: Adapt project parsers to support "ProjectGUID" without curly brackets
This is needed to correctly parse Windows Installer "wiproj" projects,
that by default contain "ProjectGUID" tags with GUID values without
surrounding curly brackets.  Otherwise CMake truncates the first & last
character from the GUID value for these projects.
2017-09-26 08:56:20 -04:00
Kitware Robot ff76f89475 CMake Nightly Date Stamp 2017-09-26 00:01:22 -04:00
Matthias Maennich f0489856e3 Retire std::auto_ptr and its macro CM_AUTO_PTR
Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-09-26 00:07:19 +02:00
Rolf Eike Beer e43cb4c18a CursesDialog: avoid calling strcpy()
Also use memset() and a few places where the compiler will collapse the for
loop into such a call anyway.
2017-09-25 18:37:41 +02:00
Sebastian Holtermann f86ba8ee8e Autogen: Reintroduce per-config sources support
Reintroduce per-config sources support in AUTOGEN but disable it by default.
2017-09-25 16:27:38 +02:00
Brad King df965cb963 Ninja: Fix quoting of RC language depfile in cmcldeps call
Since commit v3.0.0-rc1~448^2 (Ninja: use deps = gcc/msvc feature,
2013-10-18) the value of the `DEP_FILE` binding already includes the
needed quoting to refer to the file.  However, that commit forgot to
update one of the `$DEP_FILE` references to not be quoted anymore.
The offending code path currently only affects cmcldeps for RC.
Remove the extra quoting now.

Fixes: #17298
2017-09-25 10:07:48 -04:00
Brad King 1604716dfc Revert "Performance: Improve efficiency of source file lookup in cmMakefile"
This reverts commit 3b95ab5693.
It regressed some legacy source file property behavior.
Revert pending further investigation.
2017-09-25 09:06:24 -04:00
Brad King eae3765b67 Merge topic 'load_command-cleanup'
0332ec72 cmCPluginAPI: remove explicit casts to void*
cf399036 cmCPluginAPI: do not check pointer before calling free()
6e2b1853 cmCPluginAPI: use strdup() instead of open coding it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1305
2017-09-25 09:03:12 -04:00
Brad King 7c2979a5c5 Merge topic 'rc-missing-better-error'
0a8e23ad Windows: Improve link-time error messages when rc or mt fail
c2d6835c cmSystemTools: Teach RunSingleCommand another way to report exceptions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1260
2017-09-25 09:00:16 -04:00
Brad King 62bdc587eb Merge topic 'cpackifw-options'
9a24ab6b CPackIFW: Add some options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1298
2017-09-25 08:58:25 -04:00
Brad King f29b9702e0 Merge topic 'cxx17-no-bind1st'
44d3a76d Avoid using std::bind1st that is removed in C++17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1304
2017-09-25 08:57:41 -04:00
Sebastian Holtermann 5d3bca6485 Autogen: Rename cmQtAutoGen::GeneratorType to cmQtAutogen::Generator 2017-09-25 12:02:35 +02:00
Kitware Robot f6f1b22987 CMake Nightly Date Stamp 2017-09-25 00:01:04 -04:00
Kitware Robot e2a57a438d CMake Nightly Date Stamp 2017-09-24 00:01:03 -04:00
Rolf Eike Beer 0332ec72b2 cmCPluginAPI: remove explicit casts to void* 2017-09-23 15:30:44 +02:00
Rolf Eike Beer cf3990365a cmCPluginAPI: do not check pointer before calling free() 2017-09-23 15:30:44 +02:00
Rolf Eike Beer 6e2b18535b cmCPluginAPI: use strdup() instead of open coding it 2017-09-23 15:30:44 +02:00
Brad King 44d3a76d4a Avoid using std::bind1st that is removed in C++17
Use a lambda instead now that we require C++11.
2017-09-23 06:49:48 -04:00
Kitware Robot 7a7e96e278 CMake Nightly Date Stamp 2017-09-23 00:01:07 -04:00
Craig Scott de5dd4f4fa Merge topic 'graphviz-link-type'
5b46cc91 graphviz: distinguish target dependency types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1229
2017-09-22 18:28:59 -04:00
Jonathan Marler 0a8e23ad6e Windows: Improve link-time error messages when rc or mt fail
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.
2017-09-22 13:57:08 -04:00
Brad King 4609aaf513 Merge topic 'perf-source-lookup'
3b95ab56 Performance: Improve efficiency of source file lookup in cmMakefile
e0188803 cmMakefile: Drop unused method
fe1e811b cmSourceFileLocation: Drop unnecessary copy-assignment operator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1154
2017-09-22 10:17:49 -04:00
Brad King 7df7eea7cf Merge topic 'autogen-generators-refactor'
51fd7b71 Autogen: Tests: Add a change-not test to the mocRerun test
c8f92db7 Autogen: Tests: Disable an AUTOMOC_DEPENDS_FILTER test for Ninja
3c77515e Autogen: Tests: Refactor the QtAutogenRebuild rccDepends test
04a0daee Autogen: Tests: Move each rerun test script to a NAME.cmake file
e5c6610a Autogen: Tests: Extend CMAKE_AUTOMOC_DEPEND_FILTERS rebuild test
93265652 Autogen: Tests: Add <SUBDIR>/ui_view.h AUTOUIC includes to sameName test
4eb7d817 Autogen: Tests: Add <SUBDIR>/item.moc includes to sameName test
3f223743 Autogen: Read relative paths from rcc output
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1244
2017-09-22 10:15:54 -04:00
Brad King a6f2ea6ada Merge topic 'variable_watch-modify-on-callback'
4c0edbd7 variable_watch: Made it safe to add/remove watches in access callbacks
28d2c6ef test: Added additional unit test to variable_watch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1284
2017-09-22 10:12:48 -04:00
Brad King 00389afa34 Merge topic 'string-empty'
37d9387b Replace empty-string comparisons with checking against `empty()`.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1275
2017-09-22 10:11:23 -04:00
Kitware Robot 583d8e55ac CMake Nightly Date Stamp 2017-09-22 00:01:04 -04:00
Nico Müller 5b46cc91d9 graphviz: distinguish target dependency types
- The output graph of graphviz differs now between target link types
- Updated documentation
- Fixes: #17192
2017-09-21 20:49:44 +02:00
Konstantin Podsvirov 9a24ab6b63 CPackIFW: Add some options
The `CPackIFW` module `cpack_ifw_configure_component` and
`cpack_ifw_configure_component_group` commands gained a new
`REPLACES` and `CHECKABLE` options.
2017-09-21 21:34:33 +03:00
Justin Berger 4c0edbd725 variable_watch: Made it safe to add/remove watches in access callbacks 2017-09-21 11:50:57 -04:00
Brad King 46f7a6707b Merge topic 'update-kwsys'
ff0ddff7 Merge branch 'upstream-KWSys' into update-kwsys
d49b95b8 KWSys 2017-09-21 (ff912e4d)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1297
2017-09-21 08:30:55 -04:00
Brad King 5737bb3756 Merge topic 'cpack-different-checksum-file-per-generator'
b06870e5 CPack: use a distinct checksum file for each generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1291
2017-09-21 08:19:52 -04:00
Brad King 5c5b28dd9d Merge topic 'cpack-check-install-script'
09166339 CPack: Add missing check for CPACK_INSTALL_SCRIPT variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1090
2017-09-21 08:19:11 -04:00
Brad King ff0ddff785 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-09-21 (ff912e4d)
2017-09-21 07:17:36 -04:00
Pavel Solodovnikov 37d9387be3 Replace empty-string comparisons with checking against empty(). 2017-09-21 11:23:19 +03:00
Sebastian Holtermann 3f22374339 Autogen: Read relative paths from rcc output 2017-09-21 09:58:23 +02:00
Kitware Robot 1cf9437517 CMake Nightly Date Stamp 2017-09-21 00:01:03 -04:00
Sebastian Holtermann 8bee55bce1 Autogen: In VERBOSE mode print why files are (re)generated 2017-09-20 23:21:01 +02:00
Sebastian Holtermann 15346bec19 Autogen: Refactor cmQtAutoGenerators
The refactoring of cmQtAutoGenerators serializes the program flow and
makes it less jumpy in terms of function calling.
Instead of keeping and passing multiple std::vectors and std::maps in
function arguments, single lists with job descriptions are used,
one job list for MOC, UIC, RCC respectively.
Several utility functions and methods were replaced with scoped lambdas
and the remaining methods were sorted by their scope (MOC, UIC, RCC).

Error and warning messages were refactored to be more verbose
about the problem at hand.

The source parsing algorithms were rewritten in large parts.
In the process a lack of functionality of CMAKE_AUTOMOC_DEPEND_FILTERS
was discovered and fixed. CMAKE_AUTOMOC_DEPEND_FILTERS did not extract
dependency file names from headers that were not in the target sources
but were registered to AUTOMOC by a `#include "moc_<NAME>.cpp"` statement.
A test for this use case is provided in a follow up commit.
2017-09-20 23:21:01 +02:00
Jonathan Marler c2d6835c17 cmSystemTools: Teach RunSingleCommand another way to report exceptions
If the caller captures stdout but not stderr then report exceptions
through stdout instead of dropping them.
2017-09-20 14:17:13 -04:00