325 Commits

Author SHA1 Message Date
Brad King
0e47391400 bootstrap: Update for new KWSys configuration option 2019-04-17 10:13:19 -04:00
Regina Pfeifer
45edf1ad66 Retire cmCommandArgumentsHelper 2019-04-04 13:24:40 -04:00
Regina Pfeifer
4359fe133b Introduce cmArgumentParser 2019-04-04 13:24:39 -04:00
Sebastian Holtermann
216416219a Rename cmFileTimeComparison to cmFileTimeCache
The name `cmFileTimeCache` reflects the functionality of the class more
appropriately.
2019-03-18 15:09:11 +01:00
Sebastian Holtermann
6f24c4e93f New cmFileTime class
The new cmFileTime class stores the file modification time as an OS independent
nanosecond count.  Its main use is to load and compare file modification times
in nanosecond and second resolution.
2019-03-18 15:09:10 +01:00
Brad King
32a569e877 Merge topic 'refactor_cmfilecopier'
e2e8f6b132 cmFileCommand: Factor out cmFileCopier and cmFileInstaller

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2664
2019-03-14 11:13:33 -04:00
Bryon Bean
e2e8f6b132 cmFileCommand: Factor out cmFileCopier and cmFileInstaller
Split these classes out into their own sources.
2019-03-13 14:06:32 -04:00
Brad King
1761a9a546 CMake: Enable use of zstd in libarchive
Build zstd as part of CMake or find one on the system.  Modify our
port of libarchive to use the zstd configured for use with CMake.

Issue: #18657
2019-03-13 10:47:21 -04:00
Regina Pfeifer
b05b778a2d clang-tidy: Use = delete 2019-01-29 14:09:21 -05:00
Kyle Edwards
a6982cff0d cmMakefile: Impose maximum recursion limit
In order to keep infinitely-recursive scripts from causing a stack
overflow in the CMake executable, CMake now imposes a maximum
recursion limit before issuing an error message. The limit can be
adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH.

Fixes: #18694
2019-01-23 09:52:29 -05:00
Brad King
5b3af28e45 libuv: Update CMake-internal buildsystem 2019-01-17 11:29:44 -05: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
Kyle Edwards
fc8955e889 add_subdirectory: Run subdirectory install rules in correct order
Before this change, install rules created by add_subdirectory()
would be executed after all of the top-level install rules, even
if they were declared before the top-level rules. This change
adds a new policy, CMP0082, which interleaves the add_subdirectory()
install rules with the other install rules so they are run in the
correct order.
2018-10-10 10:26:39 -04:00
Gregor Jasny
6b7b54d476 bootstrap: Add missing libraries for kFreeBSD
Closes #18375
2018-09-16 14:35:44 +02:00
Brad King
fc7e4d1ed8 cmLinkItem: Convert to a "sum type" over a string and target pointer
Avoid exposing the item name implicitly as std::string.  When the item
is a target, avoid storing a second copy of its name.

Most link item construction is paired with calls to `FindTargetToLink`
to get the possible target pointer.  Rename these methods to
`ResolveLinkItem` and refactor them to construct the entire item.
2018-09-07 08:57:51 -04:00
Orivej Desh
276e369813 Utilities/Sphinx: Add option to build and install Info manual
Add option `SPHINX_INFO` to enable the Sphinx 'texinfo' builder and use
the `makeinfo` tool to convert it to a `.info` file.
2018-06-12 10:25:37 -04:00
Shane Parris
1f994d9fdc bootstrap: Use ccache in script-generated makefile 2018-05-25 09:29:53 -04:00
Brad King
886d813b47 Merge topic 'bootstrap_system_libuv_option'
bbf64794ac bootstrap: Add option to enable/disable usage of system libuv

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1971
2018-04-17 07:53:16 -04:00
Kirill Erofeev
bbf64794ac bootstrap: Add option to enable/disable usage of system libuv 2018-04-17 07:44:01 -04:00
Marc Chevrier
cdae12f8f8 string() Refactoring: creates an helper for REGEX REPLACE 2018-04-16 15:04:14 +02:00
Shane Parris
599c93e22d Add cmGlobVerificationManager class, integrate with cmake and cmState 2018-03-29 10:58:03 -04:00
James Lee
850cfe3a3b bootstrap: Add support for VAR=value options to specify tools and flags 2018-03-22 10:52:16 -04:00
Ben Chaney
25eb6e60d7 bootstrap: Clarify error when building with invalid CXXFLAGS
Mention the flags used when complaining that the compiler does not work.
2018-03-14 11:28:10 -04:00
Brad King
a40768b5af Merge topic 'bootstrap-try-clang'
04167e39 bootstrap: Add Clang to known compiler candidates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1749
2018-02-05 09:28:01 -05:00
Axel Huebl
04167e39c3 bootstrap: Add Clang to known compiler candidates
Add `clang` and `clang++` after the corresponding `gcc` and `g++`
candidates.  Otherwise it is not tried on platforms where we do not
enumerate the toolchain pair candidates.
2018-02-05 08:58:41 -05:00
Brad King
e61c1cf64c Merge topic 'libuv-raii'
3bcaa870 cmUVHandlePtr: Add uv_process_ptr
dd700e9b cmUVHandlePtr: Add uv_timer_ptr
32cfa7b3 cmUVHandlePtr: Move to CMakeLib to make it available everywhere

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1541
2017-12-01 08:22:49 -05:00
Brad King
47c326c36b Merge topic 'bootstrap-clang-5'
375eca78 bootstrap: Check support for unordered_map from compiler mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1542
2017-12-01 08:18:12 -05:00
Adam Ciarciński
375eca7881 bootstrap: Check support for unordered_map from compiler mode
Some versions of clang 5 (with libc++) have a problem with
`unordered_map` under `-std=gnu++1z`:

    /usr/include/c++/__hash_table:1134:43: error: conflicting types for '__hash_table<_Tp, _Hash, _Equal, _Alloc>'

Include `unordered_map` in our test source so that we reject this
combination and fall back to an older C++ standard flag.

Fixes: #17526
2017-11-30 14:01:26 -05:00
Brad King
32cfa7b324 cmUVHandlePtr: Move to CMakeLib to make it available everywhere 2017-11-30 11:19:31 -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
6e613ff399 bootstrap: Add infrastructure to detect threading flags
In our loop to detect -std flags, add another layer to detect
threading flags.
2017-11-28 11:23:36 -05:00
Domen Vrankar
670ad047b3 Move file/dir permissions code to common file. 2017-11-08 20:27:11 +01:00
Brad King
b8018135b5 Use C++11 '= delete' instead of CM_EQ_DELETE
We now require C++11 support including `= delete`.  Drop use of
the old compatibility macro.
2017-09-28 09:50:18 -04:00
Brad King
dd77a2ed4d Merge topic 'libuv-bootstrap'
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
2017-09-18 10:08:07 -04:00
Brad King
714ce72882 bootstrap: Make libuv available during bootstrap
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.
2017-09-17 11:10:18 -04:00
Brad King
6a2d967de0 bootstrap: Require compiler mode aware of C99 on Solaris
On Solaris some system headers included in C with `-D_XOPEN_SOURCE=600`
require C99 support by the compiler.
2017-09-17 11:10:18 -04:00
Brad King
4e14498f4f Drop now-unused definition of CM_OVERRIDE 2017-09-15 10:06:41 -04:00
Brad King
5202075c66 Merge topic 'bootstrap-twice-in-source'
a3deae71 bootstrap: Fix running multiple times in-source

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1258
2017-09-14 07:37:58 -04:00
Brad King
a3deae7199 bootstrap: Fix running multiple times in-source
Since commit v3.9.0-rc1~281^2 (Use quotes for non-system includes,
2017-04-11) we include `cmConfigure.h` via `""` instead of `<>`.
This breaks the `bootstrap` script when run more than once in an
in-source build.  In that case `cmConfigure.h` is generated next
to the source files that include it, so `""`-style includes prevent the
`Bootstrap.cmk/cmConfigure.h` file from being included during bootstrap.

Fix this by teaching the bootstrap script to remove any `cmConfigure.h`
that may have been generated by an earlier run in an in-source build.

Fixes: #17082
2017-09-13 10:37:14 -04:00
Brad King
4a275f6320 bootstrap: Require compiler mode aware of C++11
Some compilers have enough features enabled in their default modes to
pass our simple C++11 unique_ptr check but do not enable enough to build
CMake.  Poison this case so that we choose one of the explicit `-std=`
options for such compilers.
2017-08-29 11:05:19 -04:00
Daniel Pfeifer
7f29bbe6f2 server: always enable server 2017-08-26 07:46:58 +02:00
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Brad King
fabb217502 Merge topic 'bootstrap-target-commands'
ef978c1d CursesDialog: use target_include_directories for cmForm
7814d750 bootstrap: make target_* commands available

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1158
2017-08-21 09:00:09 -04:00
Brad King
e37cdb385a Merge topic 'bootstrap'
d12837af bootstrap: Require a standard C compiler
dc0befb6 bootstrap: Remove check that identifies GNU compiler
6fdcf02a bootstrap: remove dead branches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1142
2017-08-21 08:55:11 -04:00
Brad King
774d649126 Merge topic 'bootstrap-grep-solaris'
e488c7f9 bootstrap: Restore output redirection instead of "grep -q"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1144
2017-08-21 08:51:06 -04:00
Daniel Pfeifer
7814d75023 bootstrap: make target_* commands available 2017-08-18 21:48:14 +02:00
Brad King
e488c7f9ee bootstrap: Restore output redirection instead of "grep -q"
This reverts commit 567bac890c (bootstrap: use "grep -q" instead of
output redirection, 2017-06-07).  On Solaris `grep -q` does not exist.
2017-08-16 11:09:39 -04:00
Daniel Pfeifer
d12837afe6 bootstrap: Require a standard C compiler 2017-08-16 16:38:06 +02: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
Daniel Pfeifer
dc0befb6a1 bootstrap: Remove check that identifies GNU compiler
Bootstrapping no longer depends on this information.
2017-08-15 21:55:53 +02:00