Commit Graph

446 Commits

Author SHA1 Message Date
Brad King
0788accdfc Merge topic 'imported-cxxmodules'
48ee946fdc cmExperimental: recycle the C++ modules API UUID
1a1806a71b gitlab-ci: declare `bmionly` support for modules where possible
457a12f3f9 Tests/RunCMake/CXXModules: add tests which use modules from imported targets
9b9ec70b54 Ninja: generate scanning and build rules for C++20 module synthetic targets
80ef50a191 CXXModules: add a variable for BMI-only compilation
80d6544398 cxxmodules: generate synthetic targets as an initial pass
3dc6676ecc cmSyntheticTargetCache: add a struct for synthetic target caching
cb356b540c cmCxxModuleUsageEffects: add a class to capture module usage effects
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8535
2023-08-21 09:49:48 -04:00
Brad King
eee1dc10be libuv: Compile as C11 on all Solaris versions
Using `_XOPEN_SOURCE=600` on Solaris 5.10, as we do on Solaris 5.11+
already, allows the system headers to be included in C99 and C11 modes.
2023-08-18 16:13:21 -04:00
Ben Boeckel
cb356b540c cmCxxModuleUsageEffects: add a class to capture module usage effects
When importing a C++ module, there may be requirements imposed by the
importer so that the compiler can reliably read the BMI. For example,
the standard used in the importer may need to also apply to the imported
BMI.

Right now, there are no tracked requirements. As we learn more, this
class can start tracking more information.

See: https://wg21.link/p2581r2
2023-08-17 14:42:53 -04:00
Ben Boeckel
7b069510c5 cmImportedCxxModuleInfo: introduce code to parse exported BMI properties 2023-08-17 14:42:53 -04:00
Kyle Edwards
94241e243d cmJSONHelpers: Make error generators proper functions 2023-08-16 09:56:48 -04:00
Kyle Edwards
7050ac56a1 macOS: Add support for linking against .xcframework folders
Issue: #21752
2023-07-26 17:00:01 -04:00
Kyle Edwards
93ed53790c bootstrap: Unconditionally build libjsoncpp 2023-07-26 10:07:38 -04:00
Björn Esser
e4a9227360 bootstrap: Add --(no-)system-cppdap configuration switch
This was accidentally left out of commit 5ec69eb58c (cppdap: Build as
part of CMake or use external installation, 2023-05-19,
v3.27.0-rc1~45^2~1).
2023-06-08 14:56:07 -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
Cory Fields
db9af7e00c bootstrap: Add support for CXX containing flags
Rather than treating the user-provided CXX as a space-separated series of
compilers, treat it as a single command-line fragment which possibly
contains flags.
2023-05-08 17:25:59 -04:00
Cory Fields
2ead798f1d bootstrap: Add support for CC containing flags
Rather than treating the user-provided CC as a space-separated series of
compilers, treat it as a single command-line fragment which possibly
contains flags.
2023-05-08 17:25:55 -04:00
Cory Fields
9a72fed7af bootstrap: Do not over-quote compiler variables
They may contain flags.
2023-05-08 17:22:55 -04:00
Craig Scott
e245b4df75 Merge topic 'automoc-macro-names'
c5c3aff1f5 Autogen: Add INTERFACE_AUTOMOC_MACRO_NAMES target property
69cf9700e6 Autogen: Defer setup until Generate step
7cecb6353e cmGeneratorTarget: Factor out EvaluatedTargetProperty infrastructure
2daba01ddf cmGeneratorTarget: Avoid incidental include-what-you-use warning
850b4d990c IWYU: Add mapping for 'std::remove_reference<Defer &>::type'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8391
2023-04-10 18:06:06 -04:00
Orkun Tokdemir
7cecb6353e cmGeneratorTarget: Factor out EvaluatedTargetProperty infrastructure
Make it available outside the `cmGeneratorTarget` implementation.
In particular, we will later use it in `cmQtAutoGenInitializer`.
2023-04-05 16:12:15 -04:00
Marc Chevrier
9f60f19ee9 cmList: CMake list implementation
Fixes: #24548
2023-04-05 17:54:55 +02:00
Brad King
9ef25b08e0 bootstrap: Update for KWSys removal of String.hxx 2023-02-09 10:21:47 -05:00
Brad King
a48d668d18 Merge topic 'update-libuv'
23de1675fd libuv: Update CMake-internal buildsystem for 1.44.2
ff82df301c Merge branch 'upstream-libuv' into update-libuv
a23da15596 libuv 2022-07-12 (0c1fa696)
cfe8fd6421 libuv: Update script to get libuv 1.44.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7709
2022-09-27 09:52:55 -04:00
Brad King
23de1675fd libuv: Update CMake-internal buildsystem for 1.44.2 2022-09-27 09:50:38 -04:00
Brad King
914d21de58 bootstrap: Enable add_compile_definitions command
Make the command available to CMake's own CMake code.
2022-09-22 09:23:50 -04:00
Marc Chevrier
44a2f3f332 Add new flow-control commands for variables and policies scopes management
Add block() and endblock() commands offering the capability to create
new scopes for variables and/or policies.

Fixes: #20171
2022-08-22 16:25:53 +02:00
Ben Boeckel
29118091dc install: support CXX_MODULES_BMI installation bits 2022-07-06 10:15:23 -04:00
Ben Boeckel
02d0f0e752 cmCxxModuleMapper: add source to handle module mapper contents
This will allow all generators to share an implementation for actually
writing out the module map formats.
2022-06-16 10:28:34 -04:00
Ben Boeckel
fb289dfcd9 cmExperimental: add a mechanism for experimental CMake features 2022-06-14 19:27:30 -04:00
Brad King
fc22ac115e zlib: Drop old sources to make room for a fresh import 2022-05-26 12:28:21 -04:00
Marc Chevrier
8d7e80cf3d find_* commands: add control over Windows registry views
Fixes: #22775
2022-04-29 22:00:02 +02:00
Marc Chevrier
78dd7d5292 cmRulePlaceholderExpander: add base class for placeholder expansion reuse 2022-02-06 14:32:24 +01:00
Brad King
98c40dd22e bootstrap: Avoid TOC overflow on AIX powerpc
Since commit 5c58a7e4d2 (ppc64: Work around TOC overflow with platform
specific linker flags, 2019-02-27, v3.15.0-rc1~460^2) we use a bigtoc
flag on this platform when building CMake with CMake.  Add it to the
bootstrap script too.
2022-01-27 09:58:10 -05:00
Brad King
493d6a66bb bootstrap: Remove stray indentation 2022-01-27 09:57:33 -05:00
Brad King
65fb29fdfb libuv: Build unix tcp support during CMake bootstrap
Using the real `tcp.c` simplifies `cmake-bootstrap.c`, and its
implementation doesn't seem to require any of the platform-specific
definitions.  Also, later it will be needed for `uv_socketpair`.
2021-11-17 06:36:30 -05:00
Kyle Edwards
9b479124cc install(TARGETS): Add FILE_SET mode 2021-10-27 15:17:23 -04:00
Kyle Edwards
f2a44a8afa cmTarget: Add cmFileSet and associated properties 2021-10-27 15:17:23 -04:00
Brad King
50b8b509c7 Merge topic 'bootstrap-qt6'
6458a32242 bootstrap: Enable cmake_language command to support cmake-gui with Qt 6.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Andrew Maclean <andrew.amaclean@gmail.com>
Merge-request: !6593
2021-10-06 10:29:00 -04:00
Brad King
6458a32242 bootstrap: Enable cmake_language command to support cmake-gui with Qt 6.2
Fixes: #22721
2021-10-05 09:48:46 -04:00
Marc Chevrier
cc56dc7468 Rename cmProp in cmValue 2021-09-21 17:14:04 +02:00
Marc Chevrier
e5cd39ca80 cmProp: refactoring: transform alias in class
To handle safely the values used by CMake variables and properties,
introduce the class cmProp as a replacement from the simple pointer
to std::string instance.
2021-08-08 16:19:08 +02:00
Brad King
a6b075c3f8 Merge topic 'import-elf'
115ff6a347 cmELF: Include the ELF parsing code unconditionally
5dfa3ddbe5 cmELF: Allow building without system ELF headers
0da1540aaa cmELF: Fix check for TagMipsRldMapRel
e21188df8b cmELF: Open file explicitly in binary mode
70cdb36d25 Merge branch 'upstream-elf' into import-elf
7a0a37ca41 elf 2021-06-23 (f13da247)
18038042ed cmelf: Add script to import the FreeBSD ELF headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6240
2021-06-25 07:26:35 -04:00
Alex Richardson
115ff6a347 cmELF: Include the ELF parsing code unconditionally
Now that the ELF definitions are provided on all platforms there is no
need to keep the CMake_USE_ELF_PARSER option.
2021-06-24 10:57:51 -04:00
Brad King
a4b6743a3b bootstrap: Compile with _FILE_OFFSET_BITS=64 on Linux
To avoid problems accessing filesystem, explicitly use 64-bit file
offsets in case the compilation model is 32-bit.  This change was made
for the main CMake build by commit 5b10f96793 (Linux: Compile with
_FILE_OFFSET_BITS=64 on 32-bit Linux, 2020-09-23, v3.19.0-rc1~112^2),
but conditionally on 32-bit Linux.  For bootstrap, just always add the
definition instead of trying to detect the architecture.

Fixes: #22328
2021-06-23 12:46:37 -04:00
Kyle Edwards
ed3633d88c install(TARGETS): Add RUNTIME_DEPENDENCIES option 2021-06-04 08:52:02 -04:00
Kyle Edwards
f2617cf8e6 Source: Add cmInstallRuntimeDependencySet 2021-06-04 08:52:01 -04:00
Kyle Edwards
df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode 2021-05-31 09:02:45 -04:00
Orgad Shaneh
ddcd1469e8 MSYS: Add support for running under MSYS runtime environment
Detect MSYS as CYGWIN, with the required adaptations.
2021-04-26 14:27:34 -04:00
Brad King
ec1b6157cb Update CMake code using KWSys to account for Status return values
KWSys as of 2021-04-14 changed the return type of `SystemTools`
operations from `bool` to `Status`.  Update our call sites.
This may improve error reporting accuracy in a few places.
2021-04-14 13:14:09 -04:00
Henryk Paluch
5302073010 Help: Add option to generate docs with latexpdf 2021-03-01 15:28:10 -05:00
Issam E. Maghni
11260f6c20 bootstrap: add cmake_ld_flags to include check 2021-02-03 13:36:45 -05:00
Issam E. Maghni
147ba659c1 bootstrap: add cmake_ld_flags to compilers check 2021-01-16 23:48:35 -05:00
Issam E. Maghni
d9a788b356 bootstrap: test -a|o is not POSIX 2020-12-23 13:27:33 -05:00
Brad King
c257c25419 add_custom_{command,target}: Add genex support to OUTPUT and BYPRODUCTS
Move rejection of `#`, `<`, and `>` characters in outputs and byproducts
to a generate-time check.  This removes the front-end check that
disallowed generator expressions.  The generators have already been
updated to handle them.

Fixes: #12877
2020-12-11 08:24:21 -05:00
Marc Chevrier
2c71d051fa Makefiles Generators: use compiler for dependencies generation
Each source compilation generates a dependencies file. These dependencies
files are consolidated in one file per target. This consolidation is done
as part of command 'cmake -E cmake_depends` launched before evaluation of
makefile dependency graph.

The consolidation uses the same approach as `CMake` dependencies management.

Fixes: #21321
2020-11-29 15:25:42 +01:00
Brad King
9493532f80 Merge topic 'cmake-E-cat-binary'
f7a5f28318 cmake: Fix '-E cat' command for binary files on Windows
90b39a5209 cmConsoleBuf: Factor out cout/cerr console buffer management
f1fdd15863 clang-format: Fix include block order in ctest.cxx and cpack.cxx

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5364
2020-10-15 08:10:51 -04:00