41813 Commits

Author SHA1 Message Date
Brad King
04a9145af5 Merge topic 'update-kwsys'
b29d96701b Merge branch 'upstream-KWSys' into update-kwsys
8ca8daeb47 KWSys 2018-12-12 (abb8c680)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2733
2018-12-13 10:00:27 -05:00
Brad King
0be5ed7128 Merge topic 'custom-string'
2d68b2c593 String: Add str_if_stable() as a const alternative to str()
a0841b59bd String: Add support for a ""_s string literal syntax
9d5fe8e96a String: Add 'borrow' member to construct borrowing instances
80802a002c String: Add support for concatenation by operator+
ff69763ca0 String: Add a custom string type
410a3e4b22 Add support for using C++17 string_view or a fallback

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !2578
2018-12-13 09:58:50 -05:00
Brad King
dc90cd6877 Merge topic 'fileapi'
b9c6f08276 Help: Add release note for fileapi feature
4b6b2a571c fileapi: extend codemodel v2 with directory details
eb8c7676a4 fileapi: extend codemodel v2 with a project model
42f0125ceb fileapi: Add test for cmakeFiles v1
6615408193 fileapi: add cmakeFiles v1
3f6ee75a66 fileapi: Add test for cache v2
7489e95b8e fileapi: add cache v2
ea0a060168 fileapi: Add test for codemodel v2
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2706
2018-12-13 09:57:59 -05:00
Brad King
a9d9e8cafc Merge branch 'release-3.13' 2018-12-13 08:19:35 -05:00
Brad King
9bbfbd54ba CMake 3.13.2 v3.13.2 2018-12-13 06:44:30 -05:00
Tobias Hunger
34b7003d2a Documentation: Reference list of target properties in get_target_property 2018-12-13 11:05:04 +01:00
Kitware Robot
dea01ac30a CMake Nightly Date Stamp 2018-12-13 00:01:05 -05:00
Hiroshi Miura
9644c835b3 FindLibLZMA: add imported target
- Add imported target LibLZMA::LibLZMA
- Show found message with library path
- Add test for FindLibLZMA

Fixes: #18680, #18679

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2018-12-13 09:40:11 +09:00
Brad King
b9c6f08276 Help: Add release note for fileapi feature
Fixes: #18398
2018-12-12 15:12:26 -05:00
Brad King
4b6b2a571c fileapi: extend codemodel v2 with directory details
Issue: #18398
Co-Author: Kyle Edwards <kyle.edwards@kitware.com>
2018-12-12 15:12:26 -05:00
Brad King
eb8c7676a4 fileapi: extend codemodel v2 with a project model
Offer clients a `project()`-centric view of the build system.  This is
similar to the directory-centric view but consolidates subdirectories
that do not call `project()` with a new project name.

Issue: #18398
Co-Author: Kyle Edwards <kyle.edwards@kitware.com>
2018-12-12 15:12:26 -05:00
Kyle Edwards
42f0125ceb fileapi: Add test for cmakeFiles v1 2018-12-12 13:02:31 -05:00
Kyle Edwards
c150bf087c Server mode: Fix regression of hasInstallRule
The introduction of policy CMP0082, to run subdirectory install
rules in the correct order, caused a regression in server mode
where any directory with a subdirectory is marked as having an
install rule even if no "real" install rules are present. This
change fixes this regression for server mode.
2018-12-12 10:29:50 -05:00
Brad King
6615408193 fileapi: add cmakeFiles v1
Issue: #18398
2018-12-12 09:46:13 -05:00
Kyle Edwards
3f6ee75a66 fileapi: Add test for cache v2 2018-12-12 09:46:13 -05:00
Brad King
7489e95b8e fileapi: add cache v2
Start with v2 to distinguish it from server-mode v1.

Issue: #18398
2018-12-12 09:46:13 -05:00
Kyle Edwards
ea0a060168 fileapi: Add test for codemodel v2 2018-12-12 09:45:49 -05:00
Brad King
6a6900f616 Merge topic 'object-library-link'
bab24e782c target_link_libraries: Propagate dependencies of object libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2725
2018-12-12 08:32:17 -05:00
Brad King
71e74b4ae4 Merge topic 'fix-configure-line-number'
fe9a16c80f cmMakefile: Fix @CMAKE_CURRENT_LIST_LINE@ for ExpandVariablesInStringNew
dda4755b46 cmMakefile: Fix ConfigureString not passing filename and line

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2675
2018-12-12 08:30:45 -05:00
Artur Ryt
fe9a16c80f cmMakefile: Fix @CMAKE_CURRENT_LIST_LINE@ for ExpandVariablesInStringNew
Added check for variable name in @@ evaluation and test for
configuring @CMAKE_CURRENT_LIST_LINE@ with new CMP0053

Fixes: #18646
2018-12-12 08:29:14 -05:00
Artur Ryt
dda4755b46 cmMakefile: Fix ConfigureString not passing filename and line
It enables to use CMAKE_CURRENT_LIST_LINE in string(CONFIGURE)
Added tests for it for ${} and @@ notattion for old CMP0053
and ${} for new
2018-12-12 08:29:01 -05:00
Brad King
a23ac516b3 Merge topic 'machoFormat'
c86e82c092 Add Mach-O CMAKE_EXECUTABLE_FORMAT detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2722
2018-12-12 08:25:04 -05:00
Brad King
4a5e003d4c Merge topic 'FindThreads-drop-irix'
83dab0c123 FindThreads: Drop IRIX-specific options and results

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2717
2018-12-12 08:24:10 -05:00
Brad King
287bf93a11 Merge topic 'vs_conformance_mode_flags'
e0d6d01e52 VS: Add flag table entry for "permissive" flag to disable conformance mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2723
2018-12-12 08:23:26 -05:00
Brad King
abccf484e3 Merge topic 'default-test-timeout'
3e0eb3307f Help: clarify documentation of ctest --timeout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2721
2018-12-12 08:20:43 -05:00
Brad King
ed5087e32c Merge topic 'output-converter-simplify'
33f08eec18 cmOutputConverter: Moved ContainedInDirectory to cmStateDirectory
87e810f223 cmOutputConverter: Moved ForceToRelativePath to cmSystem

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2665
2018-12-12 08:19:49 -05:00
Brad King
b29d96701b Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-12-12 (abb8c680)
2018-12-12 08:14:53 -05:00
KWSys Upstream
8ca8daeb47 KWSys 2018-12-12 (abb8c680)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit abb8c680927708b161f87fb596cefb454ef5e97d (master).

Upstream Shortlog
-----------------

Gregor Jasny (1):
      228c60b8 SystemTools: CopyFileAlways: try to create a cheap CoW clone first
2018-12-12 08:14:52 -05:00
Brad King
2d68b2c593 String: Add str_if_stable() as a const alternative to str()
The `str()` method must be non-const because it may need to internally
mutate the representation of the string in order to have an owned
`std::string` instance holding the exact string (not a superstring).
This is inconvenient in contexts where we can ensure that no mutation
is needed to get a `std::string const&`.

Add a `str_if_stable() const` method that returns `std::string const*`
so we can return `nullptr` if if mutation would be necessary to get a
`std::string const&`.  Add supporting `is_stable() const` and
`stabilize()` methods to check and enforce stable availability of
`std::string const&`.  These can be used to create `String const`
instances from which we can still get a `std::string const&` via
`*str_if_stable()` by maintaining the stability invariant at runtime.
2018-12-12 08:10:16 -05:00
Brad King
a0841b59bd String: Add support for a ""_s string literal syntax
Create a `static_string_view` type that binds only to the static storage
of string literals.  Teach `cm::String` to borrow from these implicitly.
2018-12-12 08:10:15 -05:00
Brad King
9d5fe8e96a String: Add 'borrow' member to construct borrowing instances
This will allow creation of `cm::String` instances that borrow from
non-owned storage.  It is the caller's responsibility to ensure that
no copy of the instance outlives the borrowed buffer.
2018-12-12 08:10:15 -05:00
Brad King
80802a002c String: Add support for concatenation by operator+
Use expression templates to collect the entire expression and
pre-allocate a string with the final length before concatenating
the pieces.
2018-12-12 08:10:15 -05:00
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
Kyle Edwards
555fa77a35 fileapi: Add more infrastructure to FileAPI test 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
c3635e502c Tests: Add RunCMake "prep" step
Give tests a chance to write content to the build tree before CMake
runs on it.
2018-12-11 12:50:21 -05:00
Brad King
1c03c12b1d jsoncpp: Require version 1.4.1 when using system-provided library
We need the `failIfExtra` diagnostic added by that version.
2018-12-11 12:50:21 -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
Brad King
5751a09092 jsoncpp: fix signed overflow when parsing negative value
Clang's ubsan (-fsanitize=undefined) reports:

    runtime error: negation of -9223372036854775808 cannot be represented in
    type 'Json::Value::LargestInt' (aka 'long'); cast to an unsigned type to
    negate this value to itself

Follow its advice and update the code to remove the explicit negation.
2018-12-11 12:50:21 -05:00
Marc Chevrier
5aa88f0e02 UseJava: add_jar: rebuild jar on dependencies changes
Fixes: #18683
2018-12-11 15:17:24 +01:00
Kitware Robot
cb995ddea2 CMake Nightly Date Stamp 2018-12-11 00:01:07 -05:00