Commit Graph

1020 Commits

Author SHA1 Message Date
scivision
a8634b878a Help:ENV: note escaping needed for special characters 2023-08-17 10:51:14 -04:00
Brad King
d5118ed2e5 Merge branch 'backport-vs-sdk-selection' into vs-sdk-selection 2023-08-10 10:00:53 -04:00
Brad King
ae97d82e83 VS: Teach CMAKE_GENERATOR_PLATFORM to support Windows 8.1 SDK selection
Honor an explicit `version=8.1` field value regardless of the Windows
target version.

Issue: #25170
2023-08-10 09:57:00 -04:00
Brad King
15ff89654b VS: Teach CMAKE_GENERATOR_PLATFORM to use Windows 10 SDKs for older versions
Honor an explicit `version=` field selecting a Windows 10 SDK regardless
of the Windows target version.

Issue: #25170
2023-08-10 09:34:50 -04:00
Craig Scott
feca1d51ff Merge topic 'doc-fixups-release-3.27'
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment
1285fe27ff Help: Improve formatting and fix wording for ENABLE_EXPORTS
91336d061c Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY
03208d9e18 Help: Fix indenting within TARGET_RUNTIME_DLLS genex docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8688
2023-08-07 18:10:56 -04:00
Craig Scott
1285fe27ff Help: Improve formatting and fix wording for ENABLE_EXPORTS 2023-08-06 18:22:51 +10:00
Craig Scott
91336d061c Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY 2023-08-04 19:16:28 +10:00
Brad King
be03265fa0 Help: Explicitly note that projects should not set CMAKE_CUDA_HOST_COMPILER
Issue: #25093
2023-07-31 10:46:00 -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
Gregor Jasny
25977e177b apple: add preliminary visionOS support 2023-07-11 20:20:25 +02:00
Brad King
7af90b7bf7 Merge topic 'link-depends-is-OFF'
5945a98ced link dependencies: deactivate the feature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8587
2023-06-26 09:43:56 -04:00
Marc Chevrier
5945a98ced link dependencies: deactivate the feature
Unfortunately it breaks in combination with LTO due to a bug in the GNU
linker.

Fixes: #25014
2023-06-23 10:35:04 -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
023de565d3 Optionally exclude implicit link directories via environment
A misconfigured compiler may pass extraneous implicit link directories
to its linker.  If they are in `CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES`,
CMake may generate extra `-L` flags on mixed-language link lines that
break linking.  Add an environment variable that users can set to work
around such misconfiguration of their compilers.
2023-05-25 13:42:58 -04:00
Brad King
c16f5914f3 Help: Clarify meaning of MINGW variable
Fixes: #24928
2023-05-19 09:24:46 -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
Brad King
30c8b44b29 Merge topic 'doc-xref-find-env-vars'
c584882b26 Help: change links to point to the env.vars, not to the cmake vars
e40d4eb644 Help: add documentation for some CMAKE_XXX_PATH env.vars
73ce0b792f Help: minor improvement for the CMAKE_PREFIX_PATH docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8444
2023-05-02 08:44:48 -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
84122e6ca1 Help: Remove outdated link to Absoft Fortran
Absoft ceased operations on 2022-09-22 [1] [2].
The website is no longer available.

[1] https://web.archive.org/web/20220816070730/https://www.absoft.com/
[2] https://fortran-lang.discourse.group/t/4274
2023-05-01 11:42:41 -04:00
Alex Neundorf
e40d4eb644 Help: add documentation for some CMAKE_XXX_PATH env.vars
This patch adds basic documentation for the CMAKE_INCLUDE_PATH,
CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH, CMAKE_APPBUNDLE_PATH and
CMAKE_FRAMEWORK_PATH environment variables and links to the
respective cmake variables and vice versa.
2023-05-01 15:12:17 +02:00
Alex Neundorf
73ce0b792f Help: minor improvement for the CMAKE_PREFIX_PATH docs
With this patch the CMAKE_PREFIX_PATH env. var. is now mentioned
in the help for the CMAKE_PREFIX_PATH cmake var.
2023-04-29 20:20:09 +02:00
Brad King
8ecb645934 VS: Select Windows SDK matching WindowsSDKVersion env var
In an environment established by `vcvarsall.bat` or similar, this
environment variable may be set to select a Windows SDK version.
If the VS generator is used in such an environment, use that SDK.
This is similar to how `CMAKE_GENERATOR_INSTANCE` defaults using
a `VS##0COMNTOOLS` environment variable.

Fixes: #17992
2023-04-05 12:06:22 -04:00
Brad King
f90c8ab54e VS: Select latest available Windows SDK version by default
Add policy `CMP0149` to stop preferring SDKs exactly matching
`CMAKE_SYSTEM_VERSION` over the latest SDK.

Fixes: #16202
2023-04-05 12:06:22 -04:00
Brad King
b512c53d43 VS: Add support for setting WindowsTargetPlatformVersion to 10.0
VS 2019 and above support this value to select a SDK version
automatically.

Fixes: #21403
2023-04-05 12:06:22 -04:00
Brad King
2f3d945f83 VS: Add CMAKE_GENERATOR_PLATFORM field to control Windows SDK selection
Add a `version=` field to explicitly control the SDK version selection
without relying on `CMAKE_SYSTEM_VERSION`.

Fixes: #16713
2023-04-05 12:06:22 -04:00
Brad King
f0a67b6291 VS: Parse comma-separated fields from CMAKE_GENERATOR_PLATFORM 2023-04-05 12:06:22 -04:00
Brad King
561ae21f40 Help: Clarify that {add,target}_compile_options are not used for linking
Link to alternatives that can be used for adding link options.

Issue: #24662
2023-03-31 11:30:51 -04:00
Brad King
530faee017 Help: Clarify that CMAKE_<LANG>_FLAGS are used when driving linking
State explicitly that these flags are used when driving either compiling
or linking.  For linking, document their order w.r.t. link flags
specified by commands.

Fixes: #24662
2023-03-31 11:01:13 -04:00
Martin Storsjö
4d23636694 Warn if CMAKE_CROSSCOMPILING is true without CMAKE_SYSTEM_NAME set
Also clarify the `CMAKE_CROSSCOMPILING` documentation to state that
CMake sets the variable automatically.
2023-03-24 11:57:01 -04:00
Brad King
5386dc582b Merge topic 'autogen-exe-vars'
b3d1797508 Autogen: Add CMAKE_AUTO*_EXECUTABLE variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8352
2023-03-23 08:46:45 -04:00
Orkun Tokdemir
b3d1797508 Autogen: Add CMAKE_AUTO*_EXECUTABLE variables
Add the `CMAKE_AUTOMOC_EXECUTABLE`, `CMAKE_AUTOUIC_EXECUTABLE`, and
`CMAKE_AUTORCC_EXECUTABLE` variables to initialize the corresponding
`AUTO{MOC,UIC,RCC}_EXECUTABLE` target properties.

Fixes: #20071
2023-03-22 07:31:56 -04:00
Brad King
2c2c2c2227 Merge topic 'vs-windows-min-version'
6546305b01 VS: Add CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8319
2023-03-16 09:11:07 -04:00
halx99
6546305b01 VS: Add CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION variable
Provide a way to initialize the `VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION`
target property on targets.  It sets `WindowsTargetPlatformMinVersion`
in `.vcxproj` files.
2023-03-15 10:03:16 -04:00
Brad King
89b69bf1ad Add CMAKE_MAXIMUM_RECURSION_DEPTH environment variable
Extend the recursion limit controls added by commit a6982cff0d
(cmMakefile: Impose maximum recursion limit, 2018-12-14,
v3.14.0-rc1~82^2) with an environment variable that is used if the
CMake variable of the same name is not set.
2023-03-13 11:45:58 -04:00
Brad King
dbcae48e3a Help: Clarify usage of CMAKE_NINJA_OUTPUT_PATH_PREFIX
Issue: #24566
2023-03-03 12:48:35 -05:00
Brad King
1d7fb31778 Merge topic 'Apple-handle-Text-Stubs'
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
fcbd723a50 Enhance support functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !8204
2023-03-02 09:53:03 -05:00
Marc Chevrier
ede33f30cf Apple: Handle generation and comsuption of text-based stubs (.tbd files)
Fixes: #24123
2023-03-01 12:23:28 +01:00
Brad King
40539096fd Merge topic 'dll-name-soversion'
a7f9c7da26 Add option to add SOVERSION to DLL names
9694504adc Tests: Simplify RunCMake.TargetArtifacts spec
3cd34eb279 Tests: Rename RunCMake.{ArtifactOutputDirs => TargetArtifacts}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8021
2023-02-28 08:29:20 -05:00
Ralf Habacker
a7f9c7da26 Add option to add SOVERSION to DLL names
Add variable/target property `[CMAKE_]DLL_NAME_WITH_SOVERSION`.

Fixes: #24251
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2023-02-27 09:18:34 -05:00
Brad King
03c0a14852 Merge topic 'doc-CMAKE_MODULE_PATH'
cf7f6b7165 Help: Document that CMAKE_MODULE_PATH must use forward slashes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8252
2023-02-27 09:05:25 -05:00
Brad King
cf7f6b7165 Help: Document that CMAKE_MODULE_PATH must use forward slashes
Issue: #24240, #24540
2023-02-24 14:36:29 -05:00
Brad King
df9c4b1872 find_package: Use <PACKAGENAME>_ROOT variables as search prefixes
Extend commit eb35d8884b (find_package: Use PackageName_ROOT variables
as search prefixes, 2018-03-15, v3.12.0-rc1~349^2) to also check
upper-case `<PACKAGENAME>_ROOT` variables.  Add policy `CMP0144` to
enable the behavior in a compatible way.

Fixes: #24403
2023-02-23 09:15:14 -05:00
Abdelmaged Khalifa
ea2a05f402 Add variable CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY
Add CMake variable `CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY` to enable
option `DEPENDS_EXPLICIT_ONLY` on all uses of `add_custom_command`.

Fixes: #17097
2023-02-17 17:12:12 +02:00
Brad King
ef5a4d964b Deprecate "extra" generators in favor of cmake-file-api(7)
The "extra" generators were created in CMake's early years to provide
support for users of specific IDEs by directly generating their project
files alongside make or ninja files.  Nowadays the file-api provides a
more generic, maintainable, well-tested, and robust way for IDEs to view
CMake project build trees.  Deprecate the legacy "extra" generators to
encourage the corresponding IDEs to use the file-api.

Fixes: #19090
2023-02-15 10:48:26 -05:00