Commit Graph

7049 Commits

Author SHA1 Message Date
Brad King
0a81110b84 find_(library|file|path): Drop PATH-derived search prefixes
Since commit ffc06c1239 (Teach find_(library|file|path) to get prefixes
from PATH, 2015-02-18, v3.3.0-rc1~430^2) we search in `<prefix>/include`
and `<prefix>/lib` directories for prefixes with `bin` directories in
the `PATH` environment variable.  The motivation was to search the
installation prefixes of MSYS and MinGW development environments
automatically.

This behavior can search undesired prefixes that happen to be in the
`PATH` for unrelated reasons.  It was reverted for non-Windows hosts
within a year by commit b30b32a493 (Drop find_(library|file|path)
prefixes from PATH on non-Windows, 2016-05-09, v3.6.0-rc1~82^2) but was
kept on Windows hosts to support its motivating use case.  However,
similar problems have since been observed on Windows.  For example,
commit 955d6245c1 (MSVC: Revert "Teach find_library to consider the
'libfoo.a' naming convention", 2022-11-28, v3.25.1~6^2) was primarily
due to undesired discovery of libraries in `PATH`-derived prefixes.

Since commit 5e5132e1b1 (MinGW: Search for packages in standard MSYSTEM
environment prefixes, 2023-09-11) we search MSYS and MinGW environments'
prefixes explicitly, so `PATH`-derived prefixes are no longer needed for
the original motivating use case.

Fixes: #24216
2023-09-14 15:13:50 -04:00
Brad King
123cdf9816 Merge branch 'release-3.27' 2023-09-14 13:51:50 -04:00
Brad King
7d3b4868d0 CMake 3.27.5 2023-09-14 13:13:14 -04:00
Brad King
6576ca15f6 Merge topic 'mingw-search-prefixes'
5e5132e1b1 MinGW: Search for packages in standard MSYSTEM environment prefixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8796
2023-09-14 12:50:41 -04:00
Brad King
5e5132e1b1 MinGW: Search for packages in standard MSYSTEM environment prefixes
MSYS2 and similar MinGW/MSYS distributions define development
environments with a `MSYSTEM` environment variable.  Each such
environment has a documented installation prefix for its packages,
often provided by a `MSYSTEM_PREFIX` environment variable.
Since commit 84a25fc263 (cmake_host_system_information: Add
MSYSTEM_PREFIX query, 2023-09-08) we can look up this prefix.

Add `$MSYSTEM_PREFIX/local` and `$MSYSTEM_PREFIX` to our system search
prefixes when targeting MinGW under `MSYSTEM` environments.  This is
their equivalent to `/usr/local` and `/usr`, which we search by default
on UNIX systems.

Issue: #24216
2023-09-13 08:35:59 -04:00
Brad King
976659c846 Merge topic 'presets-schema'
f1a7179520 presets: Add $schema property to JSON schema
f83771dfce presets: Add missing spaces in JSON schema

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8777
2023-09-12 09:08:17 -04:00
ChenMoFeiJin
f1a7179520 presets: Add $schema property to JSON schema
Many modern code editors have support for JSON Schema.  When you specify
the `$schema` property in a JSON file, the editor can provide features
like auto-completion, error checking, etc., which can improve your
efficiency when writing and modifying the `CMakePresets.json` file.
2023-09-12 18:18:37 +08:00
Brad King
a273b7f5d4 Merge topic 'host-msystem-prefix'
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
cdcff0a0f0 cmCMakeHostSystemInformationCommand: Clarify function names and roles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8788
2023-09-11 12:27:37 -04:00
Brad King
84a25fc263 cmake_host_system_information: Add MSYSTEM_PREFIX query
Add a query on Windows hosts for the installation prefix of a
MSYS or MinGW development environment.

Issue: #24216
2023-09-10 07:33:47 -04:00
Brad King
5924a1f0eb Help: Document if() comparison number format
Fixes: #25237
2023-09-08 10:26:34 -04:00
betsy.mcphail
a94a4c12e1 Tutorial: Fix-up typos and inconsistencies
* Fix typo in Step 2
* Fix incorrect code referenced in Step 3, TODO 7. Update comments in
MathFunctions/CMakeLists.txt to unique strings.
* Resolve inconsistencies between steps in MathFunctions/CMakeLists.txt
2023-09-07 10:57:19 -04:00
ChenMoFeiJin
f83771dfce presets: Add missing spaces in JSON schema 2023-09-07 10:00:20 -04:00
Brad King
ce4df15c41 Merge topic 'xcode-no-legacy-buildsystem'
b78a14e204 Xcode: reject legacy buildsystem for Xcode 14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8762
2023-09-06 11:12:57 -04:00
Brad King
dfdce979e9 Merge topic 'doc-msvc-debug-format'
91dc94c4ac Help: MSVC_DEBUG_INFORMATION_FORMAT is initialized from associated variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8770
2023-09-06 10:51:40 -04:00
Brad King
91dc94c4ac Help: MSVC_DEBUG_INFORMATION_FORMAT is initialized from associated variable
The `CMAKE_MSVC_DEBUG_INFORMATION_FORMAT` variable docs mention that it
initializes the `MSVC_DEBUG_INFORMATION_FORMAT` target property, but the
property's docs was missing any mention of the variable.

Follow the pattern from commit c1b07ca9da (Help: MSVC_RUNTIME_LIBRARY is
initialized from associated variable, 2022-08-13, v3.25.0-rc1~317^2).

Fixes: #25216
2023-09-05 15:01:04 -04:00
FeRD (Frank Dana)
bbf3ed5422 Help: Explain block() policy-scope rules more clearly 2023-09-01 21:28:56 +10:00
FeRD (Frank Dana)
2f319c6484 Help: Remove "this command" ambiguity in set() docs 2023-09-01 21:28:56 +10:00
FeRD (Frank Dana)
9eecdc7ab7 Help: Use signature directive for cmake_policy() 2023-09-01 21:28:40 +10:00
Gregor Jasny
b78a14e204 Xcode: reject legacy buildsystem for Xcode 14
With Xcode 14 support for the Legacy Build System has been removed
and the BuildSystemType in the WorkspaceSettings is ignored.
If CMake still generates projects targeted to the Lecacy Build
System the build preparation phase will likely fail because Xcode
for example misses any declared outputs from script invocations.

This is a hard to debug problem and CMake should reject the invalid
configuration instead.
2023-08-31 10:13:57 +02:00
Brad King
72beefa91b Merge branch 'release-3.27' 2023-08-23 09:53:31 -04:00
Brad King
c3977582b7 CMake 3.27.4 2023-08-23 09:25:28 -04:00
Brad King
54e376df2e Help: Update link to Qt 5 CMake docs 2023-08-22 07:24:10 -04:00
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
36a0950e94 Merge topic 'doc-cmake_minimum_required-deprecation'
741755f637 Help: Document cmake_minimum_required deprecation of old versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8742
2023-08-21 09:30:23 -04:00
Brad King
741755f637 Help: Document cmake_minimum_required deprecation of old versions
Document the deprecation warnings added by commit 5845c218d7 (Deprecate
compatibility with CMake versions older than 2.8.12, 2020-06-12,
v3.19.0-rc1~629^2) and commit 3a4791548d (Deprecate compatibility with
CMake versions older than 3.5, 2023-02-09, v3.27.0-rc1~508^2).

Fixes: #25196
2023-08-19 09:03:53 -04:00
Brad King
a18af14579 Merge topic 'tutorial-step1'
7d3f4e12d2 Tutorial: Clarify instructions for multi-config generators in Step 1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8734
2023-08-19 08:44:29 -04:00
Brad King
e17f17c7a0 Merge topic 'doc_env'
a8634b878a Help:ENV: note escaping needed for special characters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8733
2023-08-19 08:43:41 -04:00
Ben Boeckel
48ee946fdc cmExperimental: recycle the C++ modules API UUID
Supporting modules on IMPORTED targets is worth an update.
2023-08-17 14:42:54 -04:00
Ben Boeckel
80ef50a191 CXXModules: add a variable for BMI-only compilation
This will be required when dealing with imported targets which contain
modules.
2023-08-17 14:42:54 -04:00
Ben Boeckel
249cd3efad cmExportFileGenerator: export private compile info for C++ modules
When consuming exported targets which contain C++ modules, the consuming
project must be able to recompile BMI files using the original target's
flags. This is because a module source may use some private target usage
requirement but not want to propagate it to consumers. To facilitate
this, export the private information as necessary for consumers to be
able to perform the BMI compilations.
2023-08-17 14:42:53 -04:00
betsy.mcphail
7d3f4e12d2 Tutorial: Clarify instructions for multi-config generators in Step 1 2023-08-17 11:19:06 -04:00
scivision
a8634b878a Help:ENV: note escaping needed for special characters 2023-08-17 10:51:14 -04:00
Brad King
02dd21eab6 Merge topic 'rel-linux-x86_64'
ef2bab7687 Utilities/Release: Update docker specs for linux-x86_64 to centos 7

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8731
2023-08-17 10:23:51 -04:00
Brad King
ec4ef92f2f Merge topic 'doc_tc'
136edadad4 Help:try_run: place options in their own section
a5b292c9a6 Help:try_compile: place options in their own section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8724
2023-08-16 14:45:54 -04:00
Brad King
ef2bab7687 Utilities/Release: Update docker specs for linux-x86_64 to centos 7
Update the centos base image from centos 6 to centos 7.  The latter is
the minimum version supported by libuv 1.45.  The resulting binaries
require GLIBC 2.17.
2023-08-16 14:29:55 -04:00
Brad King
a705eb963c Merge branch 'release-3.27' 2023-08-16 14:16:14 -04:00
Brad King
a69c783749 CMake 3.27.3 2023-08-16 13:46:35 -04:00
scivision
136edadad4 Help:try_run: place options in their own section 2023-08-16 10:06:31 -04:00
scivision
a5b292c9a6 Help:try_compile: place options in their own section
As try_compile interface was enhanced in 3.25, the Help got a lot
longer. Make the options its own section for navigability.
2023-08-16 10:05:53 -04:00
Chris Mahoney
bc43398e72 ExternalProject: Enable Make Job Server with Explicit Build Command
Introduces `BUILD_JOB_SERVER_AWARE` option to `ExternalProject_Add` and
`JOB_SERVER_AWARE` to `ExternalProject_Add_Step`. When using an explicit
`BUILD_COMMAND` or `COMMAND`, the generated commands won't use `$(MAKE)`
thus failing to connect to the outer make's job server. These new
options enable explicit job server integration.

Co-authored-by: Brad King <brad.king@kitware.com>

Fixes: #16273
2023-08-15 12:21:30 +00:00
Kyle Edwards
2eab65ca82 Merge topic 'test-properties-directory'
2ccb897d86 get_test_property(): Add DIRECTORY option
84e76fedb0 get_property(TEST): Add DIRECTORY option
efc8f19cc5 set_tests_properties(): Add DIRECTORY option
753999d4db set_property(TEST): Add DIRECTORY option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8709
2023-08-14 11:18:54 -04:00
Kyle Edwards
0d95b68bd8 Merge topic 'ctest-generate-resource-spec-file'
c8c1dd0d95 CTest: Add ability to dynamically generate resource spec file
3f5a5a5856 cmCTestRunTest::StartFailure(): Add total argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8699
2023-08-14 11:18:03 -04:00
Kyle Edwards
2ccb897d86 get_test_property(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
84e76fedb0 get_property(TEST): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
efc8f19cc5 set_tests_properties(): Add DIRECTORY option 2023-08-11 10:50:52 -04:00
Kyle Edwards
753999d4db set_property(TEST): Add DIRECTORY option 2023-08-10 17:36:14 -04:00
Kyle Edwards
c8c1dd0d95 CTest: Add ability to dynamically generate resource spec file
Issue: #25106
2023-08-10 16:47:51 -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
89b611ab32 VS: Select latest Windows SDK even when targeting Windows 8.1 and below
The policy added by commit f90c8ab54e (VS: Select latest available
Windows SDK version by default, 2023-04-03, v3.27.0-rc1~206^2~1) applied
only when targeting Windows 10+.  Apply it to older versions too.

Fixes: #25170
Issue: #16202
2023-08-10 09:59:25 -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