Commit Graph

391 Commits

Author SHA1 Message Date
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
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
Regina Pfeifer
c2f6872c4e CTest: Remove submit method 'xmlrpc' 2018-11-29 00:29:12 +01:00
Cristian Adam
786dddc0fd Add option to build CMake itself with IPO/LTO
Create a `CMake_BUILD_LTO` option when building with a CMake that
is new enough to support `CheckIPOSupported` everywhere.
2018-10-25 11:52:43 -04:00
Brad King
89ab893469 Merge topic 'fix-no-testing'
a834bcaa91 Tests: Add missing BUILD_TESTING conditions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dan Ibanez <daibane@sandia.gov>
Merge-request: !2520
2018-10-25 07:25:13 -04:00
Brad King
a834bcaa91 Tests: Add missing BUILD_TESTING conditions
We should not call `add_test` unless `BUILD_TESTING` is enabled.

Fixes: #18500
2018-10-24 15:51:17 -04:00
Brad King
5112a76a17 Merge topic 'update-curl'
0310024563 curl: Update build within CMake to account for 7.61 changes
b9d1107790 curl: Backport to work with CMake 3.1 again
e9e8dcee6b Merge branch 'upstream-curl' into update-curl
18812a9c3d curl 2018-09-04 (432eb5f5)
ded211ae46 curl: Update script to get curl 7.61.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2509
2018-10-23 10:20:56 -04:00
Brad King
0310024563 curl: Update build within CMake to account for 7.61 changes
The_CURL_STATICLIB option was replaced by BUILD_SHARED_LIBS.

Drop our own CURL_STATICLIB compile definition because it is now
provided by curl's usage requirements.
2018-10-22 08:55:40 -04:00
Brad King
95b4b9137a Declare support for CMake versions through 3.12 for own build
CMake 3.12 introduced a `...<max>` syntax in the version given to
`cmake_minimum_required` to automatically set policies to NEW up
to that version.  Use it to avoid listing policies explicitly.

The syntax is compatible with older versions of CMake such that they use
the extended version string for the `CMAKE_MINIMUM_REQUIRED_VERSION`
variable (which we don't use) but otherwise ignore it.
2018-10-17 14:29:16 -04:00
Brad King
6744e44970 Update CMake pre-cached values for libarchive 3.3.3
The ENABLE_LZ4 option was added.
2018-09-26 09:55:09 -04:00
Chuck Atkins
da1dc4e450 libarchive: Bump the minimum version from 3.0.0 to 3.1.0
cmArchiveWrite uses the gzip:timestamp write filter option which was not
available until v3.1.0.
2018-08-29 11:20:11 -04:00
Brad King
aefb8559dc IWYU: Fix workaround mapping for std::hash
It is provided by `functional`, not `utility`.  Fix the mapping added by
commit 276d3c7afe (IWYU: Add workaround mapping for std::hash,
2018-07-31).  Also generalize the workaround from commit v3.12.0-rc1~39^2~1
(IWYU: Define a macro to tell code it is preprocessing for iwyu,
2018-05-25) to allow local builds to configure specific flags.  This
is needed because iwyu behaves differently in different environments.
2018-08-07 12:04:58 -04:00
Brad King
281f59536f IWYU: Define a macro to tell code it is preprocessing for iwyu
There are some cases where satisfying IWYU breaks compilation, such as
forward-declaring the `std::hash<>` template with C++ standard libraries
that use an inline namespace inside `std`.  Define a macro during
include-what-you-use preprocessing so that code can adapt.
2018-05-25 12:46:19 -04:00
Brad King
d9b4dcc91e Merge topic 'libuv_version_bump'
f5f72ff844 Explicitly require LibUV 1.10 or higher to build CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1966
2018-04-17 07:18:35 -04:00
ErofeevK
f5f72ff844 Explicitly require LibUV 1.10 or higher to build CMake
CMake 3.11 now uses `uv_translate_sys_error` introduced in LibUV 1.10.
2018-04-16 11:33:52 -04:00
Brad King
99bf77f49c ccmake: Check for curses more robustly before enabling
Compute a default for `BUILD_CursesDialog` by building a small test
project that uses curses.  Disable `ccmake` by default if it fails,
and do not search for Curses as part of the main build.  This avoids
creating FindCurses cache entries when we are not considering ccmake.

If `BUILD_CursesDialog` is enabled (e.g. by the user) then warn if
curses cannot be found.
2018-03-21 13:57:45 -04:00
Brad King
94eee5e683 CMakeLib: Link to system thread libraries to support std::thread
Some environments require linking to thread libraries for `std::thread`.
Express this direct dependency of CMakeLib explicitly.  Previously this
was done indirectly through our bundled libuv, but that does not work
when using a system libuv.

Fixes: #17757
2018-02-22 12:59:20 -05:00
Brad King
31d59ff3b1 Compile CMake as C++17 if supported by the compiler
Add a check that a simple source file can compile as C++17 that uses
some of the features we need.  Do this only when hosted by CMake 3.8
or above because those versions are aware of C++17.

Check for unordered_map as we do in bootstrap since commit 375eca7881
(bootstrap: Check support for unordered_map from compiler mode,
2017-11-30).  Also maintain the existing C++14 cstdio check.
2017-12-22 09:05:54 -05:00
Brad King
31c6b9adbf Generalize check for C++14 constructs
The check for C++14 and cstdio is a special case of the more general
problem of checking that the compiler's C++14 mode supports everything
we need.  Rename the checks accordingly.
2017-12-22 09:05:54 -05:00
Brad King
4ff89fb608 AIX: Add -pthread flag to enable std::thread with GCC 2017-11-28 11:24:26 -05:00
Brad King
4d52b46c70 Merge topic 'tidy-sha1-comment'
08353542 clang-tidy: Clarify comment explaining purpose of CLANG_TIDY_SHA1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1497
2017-11-20 13:37:50 -05:00
Brad King
08353542e5 clang-tidy: Clarify comment explaining purpose of CLANG_TIDY_SHA1
Suggested-by: Bill Hoffman <bill.hoffman@kitware.com>
2017-11-17 10:51:02 -05:00
Brad King
be592b23bd IWYU: Suppress warnings from the internal Clang
Do not obscure IWYU's report with warnings from its internal Clang.
We have other testing for such warnings.  Also, when compiling with
a non-Clang compiler we might use warning options that IWYU's Clang
does not understand, and we don't want to see warnings about that.
2017-11-17 10:03:41 -05: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
Justin Berger
dc7a18d82e server: test buffer parsing 2017-08-31 15:35:04 -04:00
Daniel Pfeifer
7f29bbe6f2 server: always enable server 2017-08-26 07:46:58 +02:00
Daniel Pfeifer
4614a3b287 server: backport to C++11 2017-08-26 07:46:57 +02:00
Brad King
c1f3eb9f2d Merge topic 'require-c++11'
fd4fd9a2 Require C++11 to build CMake itself

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1132
2017-08-21 08:48:24 -04:00
Brad King
fd4fd9a276 Require C++11 to build CMake itself
CMake can now compile as C++11 on all supported platforms.  Check that
std::unique_ptr is available and fail early if missing.  This will allow
us to use C++11 more broadly in CMake's implementation (previously it
was restricted to the serve mode implementation).

Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
2017-08-16 10:13:38 -04:00
Brad King
fb0c3c564c Require CMake 3.1 to build CMake itself
This simplifies some policy settings and use of third-party
libraries with imported targets.
2017-08-10 15:08:02 -04:00
Brad King
88c9878af9 Make libuv available to all parts of CMake
The libuv library provides many useful platform abstractions and better
process management than KWSys.  We'd like to use it everywhere instead
of just in the server mode.  Drop the `CMAKE_USE_LIBUV` option and use
libuv everywhere except during bootstrap.
2017-08-08 09:34:54 -04:00
Brad King
49640d3629 HP-UX: Drop support for building CMake on HP-UX
CMake will soon require both C++11 and libuv to build.  Neither of
these works on HP-UX, so unfortunately we need to drop support for
the platform until someone can get them working.

Issue: #17137
2017-08-07 09:16:09 -04:00
Brad King
a9eaefaa1e Build with libuv on Cygwin to enable server-mode
With our last update of libuv, Cygwin is now supported.
2017-05-28 09:05:57 -04:00
Brad King
2731a91c98 Update SunPro flags used for CMake itself to support C++11 2017-05-08 10:53:46 -04:00
Brad King
86edc5b6a5 Choose compiler-specific flags earlier in CMake's own build
Add the flags early enough be used in the checks for C++ features.
2017-05-08 10:26:48 -04:00
Daniel Pfeifer
d0c3e47d80 clang-tidy: add option CMake_RUN_CLANG_TIDY 2017-05-04 17:39:23 +02:00
Daniel Pfeifer
d2b0a47c6f Add include-what-you-use mapping 2017-04-13 16:04:10 +02:00
Brad King
d33de80c8a Help/dev: Exclude this directory from user-facing documentation
Teach Sphinx and our own install rules to skip a `Help/dev` directory.
This will give us a place to put developer-only documentation that
should not be included in the user-facing documentation.  Add a
placeholder README.
2017-03-01 16:05:55 -05:00
Brad King
a333570914 Enable libuv on Solaris 10
We've ported our libuv to this platform so we can build it now.
2017-02-28 09:03:12 -05:00
Brad King
fecb70dd34 Update CMake pre-cached values for libarchive 3.3.0 2017-02-23 07:15:19 -05:00
Eric Berge
ba8bb32162 Disable libuv on Solaris 10
Two issues need to be resolved to add Solaris 10
libuv support:

1. libuv needs to provide alternative functionality
   for systems that do not support mkdtemp()
2. cmake should set SUNOS_NO_IFADDRS for Solaris 10
   builds (but not Solaris 11)
2016-12-21 15:34:11 -06:00
Brad King
cd8a57ae9b Add option to build CMake against a system librhash
Create a CMAKE_USE_SYSTEM_LIBRHASH option.
2016-11-10 08:29:38 -05:00
Brad King
31bb727f3b librhash: Build the library within CMake
Update `ustd.h` to include KWSys Large File Support configuration so
that consistent stream libraries are used (on AIX with XL).

Add a `cm_rhash.h` header to include the CMake-provided copy of the
`rhash.h` header from CMake sources.
2016-11-10 08:26:54 -05:00
Clinton Stimpson
baead1e2a8 Encoding: Remove option to use ANSI code page internally
The switch to use UTF-8 encoding has been defaulted to on for quite some
time since commit v3.2.0-rc1~116^2 (Encoding: Switch to use UTF-8
internally by default on Windows, 2014-12-26).
2016-11-02 08:48:34 -06:00
Dāvis Mosāns
335a29cb07 Enable Unicode output to Windows consoles
Use KWSys ConsoleBuf to replace the `streambuf` on `std::cout` and
`std::cerr` so that process output can be encoded correctly for display
in a Windows console.
2016-10-26 17:02:37 +03:00
Daniel Pfeifer
326d5fa747 Allow custom built libarchive to use custom built expat.
Expat is built anyway.
2016-10-10 00:21:00 +02:00
Daniel Pfeifer
7d45db9956 Don't require liblzma when using system libarchive 2016-10-10 00:12:34 +02:00
Daniel Pfeifer
a28b8f95bc Don't require libbz2 when using system libarchive 2016-10-10 00:08:06 +02:00
Chuck Atkins
20e8dcf162 Set minimum version for LibUV to 1.0.0
Older versions of libuv did not have the uv_loop_close API.  It first
showed up in unstable releases ~ v0.11.20 but was not available in
a stable release until v1.0
2016-10-07 09:07:32 -04:00
Chuck Atkins
845b98f45b Use find_package for JsonCpp and LibUV instead of include 2016-10-07 09:07:32 -04:00