Commit Graph

477 Commits

Author SHA1 Message Date
Brad King
d3cbee99e3 macOS: Prefer building with system-provided curl
Our vendored curl only enables the Secure Transport backend by default
(`CURL_SSL_BACKEND=secure-transport`), but it is limited to TLS 1.2.

The macOS SDK provides the curl development components, and the
corresponding `libcurl.4.dylib` runtime library comes with macOS.
On macOS 12 and above, the default `CURL_SSL_BACKEND=openssl`
backend seems to be capable of selecting TLS 1.3 at runtime for
https connections.

Unfortunately the macOS version of curl, even on macOS 14.4, does
not accept `CURL_SSLVERSION_TLSv1_3` at runtime to enforce TLS 1.3.
However, while our vendored curl accepts the option and passes it
to Secure Transport, macOS does not actually enforce it anyway.

Fixes: #25870
Fixes: #23701
2024-05-09 14:58:06 -04:00
Brad King
d224c018fe nghttp2: Skip "Using system-installed" message if using system curl
We only use the system nghttp2 when `CMAKE_USE_SYSTEM_NGHTTP2` is ON and
`CMAKE_USE_SYSTEM_CURL` is OFF.
2024-05-09 08:55:22 -04:00
Brad King
ba6f3f25ee Configure CMake itself with policies through CMake 3.28 2024-02-06 17:07:16 -05:00
makise-homura
83af26d9ad LCC: Don't enable debugger on LCC that don't have <future> 2024-01-16 22:12:06 +03:00
Brad King
be045c7c16 Configure CMake itself with policies through CMake 3.27 2023-10-03 17:21:47 -04:00
Clemens Wasser
17b16696d4 CMake: Add CMake_BUILD_PCH option 2023-06-22 18:11:45 +02:00
Brad King
1b11f48741 Configure CMake itself with policies through CMake 3.26 2023-06-07 14:32:04 -04:00
Glen Chung
a9a592f96e cmake: Add debugger
- Depends on cppdap and jsoncpp.
- Add --debugger argument to enable the Debugger.
- Add --debugger-pipe argument for DAP traffics over named pipes.
- Support breakpoints by filenames and line numbers.
- Support exception breakpoints.
- Call stack shows filenames and line numbers.
- Show Cache Variables.
- Show the state of currently defined targets,
  tests and directories with their properties.
- Add cmakeVersion to DAP initialize response.
- Include unit tests.

Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
2023-05-30 09:46:12 -04:00
Brad King
5ec69eb58c cppdap: Build as part of CMake or use external installation
Add `cm3p/` headers to use the selected copy of the library.

Co-authored-by: Glen Chung <kuchung@microsoft.com>
2023-05-26 09:36:14 -04:00
Brad King
60c50d4e51 Merge topic 'test-no-dart'
2fc3b0f476 Tests: Drop use of legacy "Dart" module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8257
2023-02-28 08:10:16 -05:00
Brad King
2fc3b0f476 Tests: Drop use of legacy "Dart" module
Use the CTest module directly.
2023-02-27 09:30:04 -05:00
Brad King
220fa1d92b Configure CMake itself with policies through CMake 3.25 2023-02-01 17:01:38 -05:00
Ben Boeckel
25f0b4f397 CMake: add an option to run IWYU in verbose mode
This helps to diagnose places where IWYU asks to include headers for
internal stdlib details.
2023-01-27 11:09:07 -05:00
Kyle Edwards
b2b1faa403 CMake: add option to export clang-tidy fixes to a directory 2022-12-08 09:42:27 -05:00
Michael Hirsch
8199020824
own CMakeLists: remove unreachable code 2022-11-06 19:06:31 -05:00
Kyle Edwards
153f39f4a5 Merge topic 'clang-tidy-plugin-stub'
d6f5e67f7b ci: add clang-tidy plugin to clang-tidy job
6c6912123e clang-tidy: Add option to load CMake's clang-tidy module
0ad3941f73 clang-tidy module: Add stub module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7768
2022-10-14 11:01:58 -04:00
Kyle Edwards
6c6912123e clang-tidy: Add option to load CMake's clang-tidy module
Issue: #23912
2022-10-12 13:39:30 -04:00
Brad King
5f998bbcb3 Configure CMake itself with policies through CMake 3.24 2022-10-12 12:43:27 -04:00
Brad King
4b2e765025 Drop try_run macro from CMake's own build
Since commit 9199f7c627 (Disable arch-specific try_run in CMake itself,
2009-12-14, v2.8.2~567) we've abused an undocumented debugging feature
to override the builtin `try_run` command in CMake's own build with a
wrapper macro.  However, we've also long discouraged use of this feature
by other projects.  The purpose of the original change is outdated and
of limited use anyway, so just drop it.
2022-09-26 17:51:29 -04:00
Alex Turbov
14b94f9bf2 Build: Use string(APPEND…) in the root CMakeLists.txt 2022-09-22 09:24:49 -04:00
Alex Turbov
4c6a47c6b6 Build: Extract CMAKE_BUILD_UTILITIES macro into a separate include
The macro was one time used with the comment "Simply to improve readability...".
The result file doesn't have a macro anymore and just included into
the root `CMakeLists.txt`.
2022-09-22 09:24:49 -04:00
Alex Turbov
20b9808f90 Build: Use cmstd target instead of variable CMAKE_STD_LIBRARY 2022-09-22 09:24:49 -04:00
Alex Turbov
83491ddd43 Build: add_definitions()add_compile_definitions() 2022-09-22 09:24:48 -04:00
Alex Turbov
0aed435b35 Build: Simplify configure_file() calls 2022-09-22 09:24:47 -04:00
Alex Turbov
dd28d76203 CMakeLists: Remove redundant spaces around CMake command calls 2022-09-22 09:24:46 -04:00
Alex Turbov
a509602699 Build: Modernize some foreach calls to use IN LISTS/IN ITEMS 2022-09-22 09:24:46 -04:00
Brad King
d3c1b8a491 jsoncpp: Require version 1.6.0 when using system-provided library
We need the `ValueIterator::name()` method.
2022-08-18 15:49:08 -04:00
Kyle Edwards
bf7e3124cb Remove stale references to CMakeServerLib 2022-08-02 11:05:52 -04:00
Brad King
ac24f4d49b Configure CMake itself with policies through CMake 3.23 2022-06-14 15:05:09 -04:00
Brad King
14eb8a6ab9 libarchive: Simplify hard-coded options for build within CMake
Take advantage of policy CMP0077 NEW behavior to hard-code settings,
defined by `option()` calls in upstream libarchive, without adding
them to our cache.
2022-02-22 17:51:18 -05:00
Brad King
d6b811fb82 Require CMake 3.13+ to configure CMake itself
In particular, guarantee that policy `CMP0077` has `NEW` behavior.
This will be useful to hard-code options of third-party libraries
without polluting our own cache.
2022-02-22 17:50:06 -05:00
Brad King
be9ebc104a libarchive: Simplify code selecting CMake-specific build options
Reduce differences from upstream libarchive `CMakeLists.txt` code.
Remove modifications inside code we disable anyway.
2022-02-17 07:28:09 -05:00
Brad King
9a48012f93 Configure CMake itself with policies through CMake 3.22 2022-02-03 14:13:12 -05:00
Peter Würth
c050d6a01e string(TIMESTAMP): add %f specifier for microseconds
The %f specified extends the string(TIMESTAMP) and file(TIMESTAMP)
commands to output the timestamp with a microsecond resolution.
This convention is offered by python's datetime module.
Before, the precision was limited to seconds.

The implementation is done by extending existing cmTimestamp methods
with a `microseconds` parameter. This parameter is optional in order to
be backwards compatible. The timestamps are now received in a
cross-platform manner using libuv, since the standard C functions like
time() don't allow for sub-second precision.

This requires libuv 1.28 or higher.  We already require higher than
that on Windows, so update the required version for other platforms.

Implements: #19335
2022-01-28 06:23:57 -05:00
Duncan Ogilvie
9278c6e01a ccmake: Add Windows support using PDCurses 2022-01-18 16:35:39 -05:00
Brad King
bf11dab49d ccmake: Refactor BUILD_CursesDialog option logic
Move all the current logic behind `if(UNIX)` conditions to make room
for other platforms to be added.
2022-01-18 16:34:43 -05:00
makise-homura
3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU
Due to MCST LCC compiler identification is now changed to LCC,
there should be a way for old projects to still identify it as GNU,
as it was before.
This commits adds the policy:
CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU.
This policy controls such a behavior.
OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
2021-10-21 17:24:22 +03:00
Brad King
d723bac01c Merge topic 'lcc-compiler'
02b2607a5c Help: Add release note for MCST LCC compiler support
e5d9fce03f LCC: Add dedicated support for MCST LCC compiler
2b9ef77944 CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecture
0995c75301 Tests/RPM: skip tests tat rely on debugedit if it's not found
ea55ac9a51 Tests/RunCMake/CommandLine: Deal with locales that are different from English

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6608
2021-10-19 09:22:22 -04:00
makise-homura
e5d9fce03f LCC: Add dedicated support for MCST LCC compiler
Divert LCC compiler as a new one, instead of treating it as GNU.

Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been
passing checks for GNU compilers, so it has been identified as GNU.
Now, with intent of seriously upstreaming its support, it has been
added as a separate LCC compiler, and its version displays not a
supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead
of GNU 7.3.0).

This commit adds its support for detection, and also converts basically
every check like 'is this compiler GNU?' to 'is this compiler GNU or
LCC?'. The only places where this check is untouched, is where it
regards other platforms where LCC is unavailable (primarily non-Linux),
and where it REALLY differs from GNU compiler.

Note: this transition may break software that are already ported to
Elbrus, but hardly relies that LCC will be detected as GNU; still such
software is not known.
2021-10-15 05:05:19 +03:00
Brad King
40ade51cc8 Configure CMake itself with policies through CMake 3.21 2021-10-08 12:17:04 -04:00
Brad King
00199e96ef Merge topic 'disable-exec-info'
aa4c30182b Add option to explicitly avoid using execinfo for backtraces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6386
2021-07-27 09:10:31 -04:00
Đoàn Trần Công Danh
aa4c30182b Add option to explicitly avoid using execinfo for backtraces
backtrace(3) from libexecinfo in musl will run into crash [1].

Provide an option to disable it explicitly even if libexecinfo is
present.

1: https://www.openwall.com/lists/musl/2021/07/17/1
2021-07-26 12:14:02 -04:00
Brad King
2c209097b9 Configure CMake itself with policies through CMake 3.20 2021-06-30 10:13:56 -04:00
Alex Richardson
88e56c2e5a Enable compiler warnings when compiling CMake with Clang
I noticed that I wasn't getting any compiler warnings when testing my
merge requests locally. Turns out this happens because I am compiling
using Clang rather than GCC, so no warning flags are added to the build.
d06a9bdf3a enabled warnings by default
for GCC > 4.2, but Clang supports them too. This has been the case
since at least Clang 3.0 (I couldn't test any older versions on
godbolt.org). For AppleClang, we can also assume that the warning flags
are supported. According to Wikipedia Clang became the default
compiler starting with Xcode 4.2, and the table on
https://trac.macports.org/wiki/XcodeVersionInfo, states that XCode
4.2 Clang was based on upstream Clang 3.0, which supports all the
warning flags.

The warning flags are currently not added when compiling with clang-cl
since this exposes some pre-existing warnings that need to be fixed first.
2021-06-22 16:17:58 +01:00
Brad King
d7522b8f86 cmSystemTools: Improve CreateLink and CreateSymlink error codes
In commit 7f89053953 (cmSystemTools: Return KWSys Status from CreateLink
and CreateSymlink, 2021-04-15) we just took the `-err` from libuv and
treated it as a POSIX error.  This is accurate on POSIX, but on Windows
does not match the POSIX error codes.

Use `uv_fs_get_system_error` to get the actual system error code.
This requires libuv 1.38 or higher.  Require that for Windows, but
fall back to the previous approach on POSIX.
2021-05-07 08:30:52 -04:00
Nils Gladitz
5380d858ff liblzma: Enable multi threaded stream encoding support 2021-04-22 15:40:06 -04:00
Brad King
e517c1beb6 Configure CMake itself with policies through CMake 3.19 2021-02-10 09:26:29 -05:00
Brad King
a0e474aaf2 Configure CMake itself with policies through CMake 3.18 2020-10-13 14:42:08 -04:00
Marc Chevrier
e5798126fc STL Support: introduce dedicated configuration file 2020-07-09 15:24:43 +02:00
Brad King
92c4316d81 KWSys: Hard-code try_compile results on Windows
Several of KWSys's checks have the same result on all Windows
platforms supported when building CMake.
2020-06-03 07:55:16 -04:00