Commit Graph

2566 Commits

Author SHA1 Message Date
Kyle Edwards
7050ac56a1 macOS: Add support for linking against .xcframework folders
Issue: #21752
2023-07-26 17:00:01 -04:00
Kyle Edwards
ff12a57d5e exec_program(): Remove by policy CMP0153 2023-07-25 11:09:56 -04:00
Brad King
4c9b0fe432 Merge topic 'deprecate-install-combined'
7d3eede923 Help: Document IOS_INSTALL_COMBINED as deprecated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8641
2023-07-21 09:39:21 -04:00
Márton Marczell
7d3eede923 Help: Document IOS_INSTALL_COMBINED as deprecated
The approach has not made sense since the introduction of Apple Silicon
and macOS arm64.

Issue: #24957
2023-07-20 11:21:24 -04:00
Brad King
88c6dc75ba Merge topic 'command-job-server-aware'
95941fd990 add_custom_{target,command}: Add argument JOB_SERVER_AWARE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8547
2023-07-20 10:23:31 -04:00
Brad King
b0054dd65c Merge topic 'imported-implib-only'
7351d590ee cmTarget: Add a way to represent imported shared library stubs
83574a4772 GeneratorExpression: Expand testing of imported location resolution
b75ff51947 Testing: Map RelWithDebInfo config in GeneratorExpression test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !8582
2023-07-19 10:55:30 -04:00
Chris Mahoney
95941fd990 add_custom_{target,command}: Add argument JOB_SERVER_AWARE
Issue: #16273
2023-07-19 10:45:33 -04:00
Robert Maynard
7351d590ee cmTarget: Add a way to represent imported shared library stubs
Shared library stubs can be used for linking, but not at runtime.
Their role is similar to import libraries on Windows, so represent
their location with the `IMPORTED_IMPLIB` target property.

Fixes: #24940
2023-07-18 13:21:01 -04:00
Gregor Jasny
25977e177b apple: add preliminary visionOS support 2023-07-11 20:20:25 +02:00
Brad King
75b573a628 Deprecate Visual Studio 12 2013 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2023-06-26 12:41:18 -04:00
Brad King
61bb728c0c Merge topic 'imported-target-framework-path'
d605f728f7 macOS: Allow IMPORTED_LOCATION to be a framework folder

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8586
2023-06-26 09:47:30 -04:00
Kyle Edwards
d605f728f7 macOS: Allow IMPORTED_LOCATION to be a framework folder
Issue: #24946
2023-06-23 12:07:18 -04:00
Brad King
09df135b60 Merge topic 'FindEXPAT-static'
302501ad36 FindEXPAT: add a EXPAT_USE_STATIC_LIBS hint

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8572
2023-06-23 11:01:48 -04:00
Even Rouault
302501ad36 FindEXPAT: add a EXPAT_USE_STATIC_LIBS hint
The effect of that hint is to restrict the candidate library names, but
more essentially to set the `XML_STATIC` compile definitions which is
required to get proper linking.

Vcpkg-Issue: https://github.com/microsoft/vcpkg/issues/1100
GDAL-Issue: https://github.com/OSGeo/gdal/issues/7955
2023-06-22 10:18:07 -04:00
Even Rouault
97d0f76453 FindCURL: add a CURL_USE_STATIC_LIBS hint
The effect of that hint is to set a CURL_STATICLIB compile definition,
and to auxiliary system windows libraries for MSVC builds.

GDAL-Issue: https://github.com/OSGeo/gdal/issues/7955
2023-06-22 10:17:16 -04:00
Brad King
ed37038a1c Merge topic 'cross-compiling-emulator-env-var'
7005dea005 CrossCompiling: Load CMAKE_CROSSCOMPILING_EMULATOR from environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8543
2023-06-14 09:18:45 -04:00
Brad King
536c1de1d4 Drop Visual Studio 11 2012 generator
This generator has been deprecated since CMake 3.25.  Remove it.
2023-06-13 14:20:48 -04:00
Matt McCormick
7005dea005 CrossCompiling: Load CMAKE_CROSSCOMPILING_EMULATOR from environment
Read `CMAKE_CROSSCOMPILING_EMULATOR` from an environment variable of the
same name if not specified with `-D` or an initial cache value.

Along with existing environment variable settings such as
`CMAKE_TOOLCHAIN_FILE`, cross compilation configuration can be more
completely set via environment variables.

Suggested-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-06-13 13:58:44 -04:00
Brad King
bb08c70e01 Begin post-3.27 development 2023-06-06 13:38:04 -04:00
Brad King
d3f07fbb9d Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2023-06-06 13:36:21 -04:00
Brad King
e6bcda8c39 Help: Consolidate 3.27 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.27.rst`.
2023-06-05 11:13:54 -04:00
Brad King
3760ac9845 Merge topic 'file-api-query-command'
99b2ccf80d cmake_file_api: New project command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8530
2023-06-05 09:45:02 -04:00
Craig Scott
99b2ccf80d cmake_file_api: New project command
Projects can use the new command to request file API replies for the current
run. No query files are generated, the query is tracked internally. Replies are
created in the file system at generation time in the usual way.

Fixes: #24951
2023-06-05 06:20:50 -04:00
Brad King
54c5654f7d ctest: Optionally terminate tests with a custom signal on timeout
CTest normally terminates test processes on timeout using `SIGKILL`.
Offer tests a chance to exit gracefully, on platforms supporting POSIX
signals, by setting `TIMEOUT_SIGNAL_{NAME,GRACE_PERIOD}` properties.

Fixes: #17288
2023-06-02 06:51:13 -04:00
Brad King
5b063510f9 Merge topic 'cmake-verbose-print-build-tool-command'
8451a3f0b5 cmGlobalGenerator: use a stream for output in `Build`
e060666531 cmake: write the build command itself with `--verbose`
b017c9f127 cmGlobalGenerator: fix off-by-one for `&&` command joining
c715fd8d76 cmGlobalGenerator: quote commands in `::Build` output
d6c0e827bc cmGlobalGenerator: add a `QuotedPrintable` method for commands
28ee3bef34 cmGlobalGenerator: add missing spaces in output
465ab8d872 cmGlobalGenerator: use `cmStrCat` in `::Build`
81d45dabc4 cmOutputConverter: add a `static` version of `EscapeForShell`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !8183
2023-05-31 09:33:26 -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
d491ea1973 Merge topic 'ep-update-disconnected'
8cc45e150a ExternalProject: Make hg download method respect UPDATE_DISCONNECTED
1512dc43cb ExternalProject: Avoid reconfigure when updates are disconnected
1d29cf37a1 Tests: Reduce warning noise in ExternalProjectUpdate test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8498
2023-05-23 11:06:19 -04:00
Craig Scott
1512dc43cb ExternalProject: Avoid reconfigure when updates are disconnected
When UPDATE_DISCONNECTED is true, create separate update_disconnected
and patch_disconnected targets which have ALWAYS set to false.
Make the configure step depend on patch_disconnected in this case too.
This ensures the configure, build, install and test steps are not
executed unnecessarily when updates are disconnected.

Make the update and patch commands depend on the details of those
steps. This ensures they are re-executed when any of those details
change, even if updates are disconnected.

Allow updates to occur even if UPDATE_DISCONNECTED is true, but don't
contact the remote in that case. If asked to update to a ref that isn't known
locally, that is now detected and causes a fatal error when updates are
disconnected. Previously, the build would have silently and erroneously
continued to use the old ref.

Fixes: #16419, #19703, #21146
2023-05-23 22:39:44 +10:00
Brad King
dc4a53f49e Merge topic 'FileAPI-framework'
b3a6a11e95 fileapi: Extend codemodel targets/compileGroups with Apple frameworks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8489
2023-05-22 12:35:28 -04:00
Marc Chevrier
b3a6a11e95 fileapi: Extend codemodel targets/compileGroups with Apple frameworks
Fixes: #19897
2023-05-19 12:10:20 +02:00
Brad King
4d5c32fa2c Merge topic 'skip-linting'
775c369420 Autogen: set SKIP_LINTING ON for generated files
b480315e0c TargetGenerator: Add SKIP_LINTING source property
993dde925f TargetGenerator: Factor out generation of code check rules
023af4ab2f Improve Const Correctness

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8467
2023-05-18 09:24:17 -04:00
Ben Boeckel
e060666531 cmake: write the build command itself with --verbose 2023-05-16 12:48:20 -04:00
Orkun Tokdemir
b480315e0c TargetGenerator: Add SKIP_LINTING source property
The `SKIP_LINTING` source property was added to disable code check for
desired source files. The `SKIP_LINTING`includes `cpplint`, `clang-tidy`, \
`cppcheck` and `include-what-you-use`. If `SKIP_LINTING` is set on a
source file, the tools mentioned above will not be run on that source file.
2023-05-16 10:47:56 -04:00
Marc Chevrier
ad9020a899 Apple Frameworks: honor SYSTEM target property
Fixes: #24109
2023-05-11 10:24:18 +02:00
Brad King
5924630e6d Merge topic 'compile-only-genex'
c42630ee62 cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex
0fb923c460 cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8411
2023-05-05 12:42:23 -04:00
Brad King
0d2d5a229c Merge topic 'use-linker-depfile'
375e6fdbbe Link step: use linker dependency linker file
24a3e5cda0 cmLocalGenerator::MayBeRelativeToWorkDir: take care of all cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8443
2023-05-04 09:06:23 -04:00
Brad King
28dd02c3ba Merge topic 'autogen-system-include'
7bf4e30090 Autogen: Default AUTOGEN_USE_SYSTEM_INCLUDE to ON if it is not set
033dc7ee2f Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target property
8ba16db163 Tests/RunCMake: Add option for dynamic expected output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8400
2023-05-04 09:01:08 -04:00
Marc Chevrier
375e6fdbbe Link step: use linker dependency linker file
Based on work done by @ben.boeckel (!8051)

Fixes: #22217
2023-05-03 17:08:07 +02:00
Orkun Tokdemir
033dc7ee2f Autogen: Add AUTOGEN_USE_SYSTEM_INCLUDE target property
`AUTOGEN_USE_SYSTEM_INCLUDE` was added. `AUTOGEN_USE_SYSTEM_INCLUDE`
is a boolean property that can be set on a target to indicate that the
autogen target include directory should be added as a system include
directory or normal include directory to the target.
2023-05-03 09:03:46 -04:00
Brad King
339f220575 Merge topic 'vs-debugger-init'
35566b48b4 VS: Add variables to initialize debugger-related properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8445
2023-05-02 08:45:41 -04:00
Alex Neundorf
35566b48b4 VS: Add variables to initialize debugger-related properties
Add variables to initialize target properties `VS_DEBUGGER_COMMAND`,
`VS_DEBUGGER_COMMAND_ARGUMENTS`, `VS_DEBUGGER_ENVIRONMENT`, and
`VS_DEBUGGER_WORKING_DIRECTORY`.
2023-05-01 13:39:00 -04:00
Brad King
4bb13d6a5b Merge topic 'cpack-inno-setup'
1d6db66179 CPack: Add Inno Setup generator
9b0dc652ff ci: Provide Inno Setup tools to some Windows CI jobs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8399
2023-05-01 11:35:46 -04:00
Jannik Alber
1d6db66179 CPack: Add Inno Setup generator 2023-04-28 09:33:28 -04:00
Le Go
5ee19d5746 FindDoxygen: Optionally use custom config file 2023-04-27 16:54:00 -04:00
Craig Scott
0ca98beb57 Merge topic 'ExternalProject-relative-git-urls'
550f63447d ExternalProject/FetchContent: Support relative remote URLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7988
2023-04-27 09:12:26 -04:00
Zoran Angelov
f552ba6e6d presets: add support for macro expansion to includes
Only `$penv{}` can be expanded when processing includes.
2023-04-26 10:03:53 -04:00
Chris Wright
550f63447d ExternalProject/FetchContent: Support relative remote URLs
Teach `ExternalProject_Add` and `FetchContent_Declare` to resolve
relative remote URLs provided via `GIT_REPOSITORY`.  Add policy
CMP0150 to maintain compatibility.

Fixes: #24211
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2023-04-26 16:30:36 +08:00
Marc Chevrier
31675964e7 GenEx LIST: list operations
Fixes: #24550, #24547
2023-04-16 12:00:20 +02:00
Ben Boeckel
0fb923c460 cmGeneratorExpressionNode: implement COMPILE_ONLY genex
This generator expression is the inverse of `LINK_ONLY` and only coveys
usage requirements for the purposes of compilation. Its intended use is
to avoid needing to export targets that do not have link usage
requirements (e.g., header-only libraries) when used by another target.

It will also be used to represent private usage requirements on exported
C++ module-containing targets in the future.

Eventually there should be logic to collapse nesting of
`$<COMPILE_ONLY>` and `$<LINK_ONLY>` when generating instances of
either. A TODO is left in the code for this case.

See: #15415
2023-04-12 10:43:48 -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