Commit Graph
28539 Commits
Author SHA1 Message Date
Brad King ff69763ca0 String: Add a custom string type
Create a `cm::String` type that holds a view of a string buffer and
optionally shares ownership of the buffer.  Instances can either
borrow longer-lived storage (e.g. static storage of string literals)
or internally own a `std::string` instance.  In the latter case,
share ownership with copies and substrings.  Allocate a new internal
string only on operations that require mutation.

This will allow us to recover string sharing semantics that we
used to get from C++98 std::string copy-on-write implementations.
Such implementations are not allowed by C++11 so code our own in
a custom string type instead.
2018-12-12 08:10:15 -05:00
Brad King 3e922ceb5e fileapi: add codemodel v2
Start with v2 to distinguish it from server-mode v1.

Issue: #18398
2018-12-12 06:40:10 -05:00
Brad King b83fe27d8d fileapi: Report cmake generator in reply index file 2018-12-12 06:40:10 -05:00
Brad King 7ee0abbde1 fileapi: Add helper to create and reference a json reply file 2018-12-12 06:40:10 -05:00
Brad King 276fdf2993 fileapi: Add protocol v1 support for stateful per-client queries
Add support for client-owned *stateful* query files.  These allow
clients to request a list of versions of each object kind and get only
the first-listed version that CMake recognizes.  Since clients own their
stateful query files they can mutate them over time.  As a client
installation is updated it may update the queries that it writes to
build trees to get newer object versions without paying the cost of
continuing to generate older versions.

Issue: #18398
2018-12-12 06:40:10 -05:00
Brad King 8fce59848b fileapi: Add protocol v1 support for client-specific query files
Add support for client-owned stateless query files.  These allow clients
to *own* requests for major object versions and get all those recognized
by CMake.

Issue: #18398
2018-12-12 06:40:10 -05:00
Brad King eb2ec41a04 fileapi: Add protocol v1 infrastructure with support for shared query files
Add a file-based API that clients may use to get semantic information
about the buildsystem that CMake generates.  Clients will write query
files under a designated location in the build tree, and CMake will
write reply files for clients to read.

Start with support for shared stateless query files.  These allow
clients to share requests for major object versions and get all those
recognized by CMake.  Once any client has written a shared request to a
build tree it will persist.  Other clients will not need to overwrite
the request (since it is stateless) and should not remove it either.

For now we add only an undocumented object kind to use for testing the
query and reply infrastructure.  Object kinds providing real semantic
information will be added later.

Issue: #18398
2018-12-12 06:39:30 -05:00
Kitware Robot c337b2a0b4 CMake Nightly Date Stamp 2018-12-12 00:01:03 -05:00
Wil Stark ea3d60cffa VisualStudio10TargetGenerator: support C# refs with '.' in file name.
Fixes: #18696
2018-12-11 10:47:48 -08:00
Brad King 410a3e4b22 Add support for using C++17 string_view or a fallback
Define a `cm::string_view` type implemented via C++17 `std::string_view`
when available.  Provide a fallback implementation for C++11 and C++14
compilers.

The fallback implementation was written by reading documentation of the
standard spec.  We have no dedicated tests for it, but it will be
covered by tests of its clients later.
2018-12-11 13:19:39 -05:00
Brad King 4a8898cd6d cmTimestamp: Expose CreateTimestampFromTimeT publicly 2018-12-11 12:50:21 -05:00
Brad King 03d40110dc cmStateSnapshot: Add method to get current directory snapshot 2018-12-11 12:50:21 -05:00
Kitware Robot cb995ddea2 CMake Nightly Date Stamp 2018-12-11 00:01:07 -05:00
Kyle Edwards bab24e782c target_link_libraries: Propagate dependencies of object libraries
Prior to this commit, linking against an object library did not
propagate private link dependencies of object libraries to their
consuming targets. This change implements the correct behavior.

Fixes: #18692
Co-Author: Brad King <brad.king@kitware.com>
2018-12-10 14:57:28 -05:00
Brad King 0f7cca1dae Merge topic 'autogen-cleanups'
7630eb1975 cmQtAutoGenInitializer: Reduce code duplication

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Tobias Hunger <tobias.hunger@gmail.com>
Merge-request: !2689
2018-12-10 08:26:05 -05:00
Brad King 2e2455cbd3 Merge topic 'ninja-win-long-commands'
cfd808ff19 cmLocalNinjaGenerator: Prevent echoing of lines in ninja generated batch files
2c3f2dfa5a cmLocalNinjaGenerator: Report line of failure in ninja generated batch file
2295040e85 cmLocalNinjaGenerator: Propagate failures from batch file back to ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2701
2018-12-10 08:25:03 -05:00
Brad King d3983f7fc6 Merge topic 'SWIG'
dff28141dc UseSWIG: add management of SWIG option -module
7b3d4799f8 Help: update policy 0078 documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2669
2018-12-10 08:23:42 -05:00
Brad King 0bfe96a8c3 Merge topic 'file-read_symlink'
31840e363f file: Fix formatting of error in SIZE sub-command
98a39be6cf file: Add READ_SYMLINK sub-command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2705
2018-12-10 08:21:40 -05:00
Brad King d99e1cca20 Merge topic 'cpack-status-callback'
4a3ae1710e CPack/External: Fix status messages of staging scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2696
2018-12-10 08:17:06 -05:00
Brad King 5f3b067bee Merge topic 'autogen_revert_implicit_includes'
e5a4007a3b Merge branch 'backport-autogen_revert_implicit_includes'
4be7f38d57 Autogen: Revert passing compiler implicit includes to moc
187481d4d9 Autogen: Revert passing compiler implicit includes to moc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2709
2018-12-10 08:16:20 -05:00
Kitware Robot 4b513c0ca3 CMake Nightly Date Stamp 2018-12-10 00:01:04 -05:00
Regina Pfeifer 3e0eb3307f Help: clarify documentation of ctest --timeout 2018-12-09 22:10:31 +01:00
Kitware Robot dd8c575932 CMake Nightly Date Stamp 2018-12-09 00:01:03 -05:00
Bruno Manganelli 33f08eec18 cmOutputConverter: Moved ContainedInDirectory to cmStateDirectory 2018-12-08 11:24:06 +00:00
Kitware Robot 0021d03153 CMake Nightly Date Stamp 2018-12-08 00:01:05 -05:00
Bruno Manganelli 87e810f223 cmOutputConverter: Moved ForceToRelativePath to cmSystem 2018-12-07 19:29:30 +00:00
Tobias Hunger 7630eb1975 cmQtAutoGenInitializer: Reduce code duplication
Do not repeat the code used to find uic/rcc and moc exectuables.
2018-12-07 13:44:33 -05:00
Marc Chevrier dff28141dc UseSWIG: add management of SWIG option -module
When file property SWIG_MODULE_NAME is specified, provide option -module
to SWIG compiler.

Fixes: #18374
2018-12-07 18:51:57 +01:00
Wil Stark b5b63da088 VS: Fix Deploy content in .csproj files 2018-12-07 09:01:32 -08:00
Brad King 99a224e3ee Merge topic 'vs-json-flag-table'
8107508b3e Remove old flag table headers
6d855fbf44 Replace header flag tables with json reading
9c60ae5f11 VS: Add flag table entry for -JMC
584ad067ba VS: Fix flag table entry for -Qspectre
8df25f9400 VS: connect /Y- compiler option with "Not Using Precompiled Headers"
f1223e34c6 VS: Add v140 flag table entries for `-Zc:inline[-]`
efc90eed77 VS: Fix regressed mapping for the cl `/Os` compiler flag
36b7fc7db6 VS 14: Add flag map for -std= to CppLanguageStandard tag in project files
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2611
2018-12-07 08:37:14 -05:00
Brad King cb85bb3573 Merge topic 'pkg-clang-tidy'
a816fe298d cmCPackFreeBSDGenerator: fix clang-tidy issues

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2712
2018-12-07 08:34:46 -05:00
Brad King 2d402239c7 Merge topic 'submit-method'
9501a6145d CTest: Remove special case for Dart version <= 1
e184603378 CTest: Add release note about removed submission methods
8c25aa2feb CTest: Remove submission trigger
a688c6b928 CTest: Remove submit method 'ftp'
c339b64cf2 CTest: Remove submit method 'scp'
aebdad399e CTest: Remove submit method 'cp'
c2f6872c4e CTest: Remove submit method 'xmlrpc'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2672
2018-12-07 08:33:46 -05:00
Brad King 049d324e42 Merge topic 'misc-typos'
8adf237e52 Misc. comment typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2703
2018-12-07 08:32:41 -05:00
Brad King 1cb7ea6113 Merge topic 'cmtarget-remove-unused-classes'
ecf6fc8dc1 cmTarget: Remove unused classes cmTargetSet and cmTargetManifest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2697
2018-12-07 08:30:25 -05:00
Brad King 3b4e86f26d Merge branch 'backport-autogen_revert_implicit_includes' into release-3.13
Merge-request: !2709
2018-12-07 08:04:55 -05:00
Brad King 0becea2d60 Merge branch 'cpack-status-callback' into release-3.13
Merge-request: !2696
2018-12-07 08:04:21 -05:00
Sebastian Holtermann 4be7f38d57 Autogen: Revert passing compiler implicit includes to moc
Passing an incomplete list of compiler include directories causes
a regression in the KIO project (and probably others). We need to
disable it until the complete list is available (see #16291).

Fixes: #18669
Issue: #18041
2018-12-07 08:01:02 -05:00
Sebastian Holtermann 187481d4d9 Autogen: Revert passing compiler implicit includes to moc
Passing an incomplete list of compiler include directories causes
a regression in the KIO project (and probably others). We need to
disable it until the complete list is available (see #16291).

Fixes: #18669
Issue: #18041
2018-12-07 07:56:46 -05:00
Nils Gladitz 4a3ae1710e CPack/External: Fix status messages of staging scripts
Set progress callback on cmake instance used by CPack.  The progress
callback is used to output STATUS messages which are otherwise missing
when issued from e.g. CPack External staging scripts.

Fixes: #18567
2018-12-07 07:33:30 -05:00
Kitware Robot a956ab7f3b CMake Nightly Date Stamp 2018-12-07 00:01:05 -05:00
Regina Pfeifer a816fe298d cmCPackFreeBSDGenerator: fix clang-tidy issues
Install FreeBSD's libpkg on Linux and configure CMake with
CPACK_ENABLE_FREEBSD_PKG and CMake_RUN_IWYU set to ON.
Then, fix all warnings.
2018-12-06 19:45:24 +01:00
Mark O'Neill cfd808ff19 cmLocalNinjaGenerator: Prevent echoing of lines in ninja generated batch files 2018-12-06 16:53:07 +00:00
Mark O'Neill 2c3f2dfa5a cmLocalNinjaGenerator: Report line of failure in ninja generated batch file
Fixes: 18676
2018-12-06 16:53:06 +00:00
Artur Ryt ecf6fc8dc1 cmTarget: Remove unused classes cmTargetSet and cmTargetManifest 2018-12-06 11:40:13 -05:00
Mark O'Neill 2295040e85 cmLocalNinjaGenerator: Propagate failures from batch file back to ninja
Fixes: #18676
2018-12-06 16:01:24 +00:00
Kyle Edwards 31840e363f file: Fix formatting of error in SIZE sub-command 2018-12-06 10:28:16 -05:00
Kyle Edwards 98a39be6cf file: Add READ_SYMLINK sub-command 2018-12-06 10:11:51 -05:00
Brad King 81bea69bd1 Merge topic 'productbuild-encode-pkg-url-ref'
7954ba9bc1 productbuild: escape pkg-ref urls
652210e901 cmSystemTools: Add EncodeURL helper

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2681
2018-12-06 09:06:13 -05:00
Brad King d69877fe86 Merge topic 'autogen-qtversion-detection'
5191b74524 Autogen: Qt version detection cleanup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Sebastian Holtermann <sebholt@xwmw.org>
Merge-request: !2694
2018-12-06 09:05:22 -05:00
Brad King d0e371f516 Merge topic 'try-compile'
f266182aec Check* functions family: add support for LINK_OPTIONS
29f9db5c63 try_compile/try_run: Add support for LINK_OPTIONS option.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2661
2018-12-06 09:03:58 -05:00