Commit Graph

50634 Commits

Author SHA1 Message Date
Brad King
30c835428f VS: Accept and translate '-T version=' values with three components
The VS 16.8 and VS 16.9 toolset versions differ only in their third
component.  The `vcvarsall` option `-vcvars_ver=` accepts a three
component version, so accept this format for VS toolset selection too.

Issue: #21922
2021-03-12 08:36:45 -05:00
Brad King
58a50a3a0a VS: Fix '-T version=14.28' under VS 16.9
CMake accepts the toolset version that is default in the current VS
version by matching the name later VS versions will use for the SxS
props files.  It predicts the future name based on the first two
components of the current VS version's default toolset.  However, this
heuristic breaks naming the VS 16.8 toolset version 14.28 under VS 16.9
because the latter's default toolset version is 14.28.29910, which did
not increment the second version component (unprecedented in VS).

Fix this by always using the requested version's SxS props file when it
exists, even if it matches the first two components of the current VS
version's default toolset.  Also add a special case for the name VS
16.10 will use for VS 16.9's default toolset, so that it can be used
with VS 16.9 too.

Fixes: #21922
2021-03-12 08:36:40 -05:00
Brad King
09f59da7f0 cmGlobalVisualStudioVersionedGenerator: Clarify local variable name 2021-03-12 06:33:51 -05:00
Brad King
acdbf64047 Merge branch 'cray-compiler-wrapper-detection' into release-3.19
Merge-request: !5897
2021-03-10 12:13:52 -05:00
Justin LaPolla
13144e82cd Cray: Enable Cray compiler wrapper detection on all platforms
Previously were checking for the `__CRAYXC` and `__CRAYXE` predefined
macros.  These macros reflect the platform that the compiler wrapper is
running on, i.e. Cray XC and Cray XE machines.  They are not defined on
other platforms such as Apollo80.

Switch to the `__CRAYXT_COMPUTE_LINUX_TARGET` macro. The Cray cc/CC/ftn
wrappers always define this macro on the command line. This macro has
been in use for many years, and is believed to be a reliable way to
detect current and older Cray compiler wrappers.

Fixes: #21904
2021-03-10 12:13:17 -05:00
Brad King
f99ff2beb9 Merge branch 'backport-xcode-framework-quoting' into release-3.19
Merge-request: !5899
2021-03-10 11:28:40 -05:00
Brad King
4f9a71974e Xcode: Restore support for spaces in framework names
In commit ce2dee9e5b (Xcode: Don't add framework as -framework argument
in linker info list, 2020-09-28, v3.19.0-rc1~47^2) we split up the path
to a framework into the directory and framework name parts, but only
retained the quoting on the directory part.  Restore quoting of the
framework name.

Fixes: #21910
2021-03-10 10:01:11 -05:00
Brad King
214a06ec2e Merge branch 'CrayPrgEnv-detection' into release-3.19
Merge-request: !5889
2021-03-08 12:36:00 -05:00
Brad King
23b101de60 Revert "Cray: Fix Cray compiler detection on new platforms"
The justification in commit 9ee4a42813 (Cray: Fix Cray compiler
detection on new platforms, 2020-12-01, v3.19.2~26^2) confuses detection
of the CrayPrgEnv with identification of the Cray compiler.  The
change regressed detection of the CrayPrgEnv on non-Cray compilers.
Revert it pending further investigation into the original problem.

Fixes: #21894
2021-03-08 12:28:36 -05:00
Brad King
0ecd9de6dd CMake 3.19.6 v3.19.6 2021-02-24 10:08:43 -05:00
Brad King
fcf0c66b5a Merge branch 'backport-3.19-preset-no-comments' into release-3.19
Merge-request: !5853
2021-02-24 09:39:20 -05:00
Kyle Edwards
431dd59b5e CMakePresets.json: Remove undocumented support for comments
Fixes: #21858
2021-02-24 09:28:36 -05:00
Brad King
289ab61fbe Merge branch 'ninja-status-stderr' into release-3.19
Merge-request: !5850
2021-02-23 11:01:14 -05:00
Brad King
d33c2c93d8 Tests: Update for upstream ninja change to write status on stderr
Upstream ninja commit `ad3d29fb53` (Put builder output through status
interface) from ninja PR 1899 changed the status output from stdout to
stderr.  In particular, `ninja: no work to do` is now printed on stderr.
Update our RunCMake tests to accept this difference.

A few RunCMake test cases check for `ninja: no work to do`.  For those,
move the message to stdout using `RunCMake_TEST_OUTPUT_MERGE`.  The rest
of the test cases do not care about the message, so remove it from the
actual stderr content before comparing against that expected.
2021-02-23 10:55:12 -05:00
Brad King
759923420b Merge branch 'backport-intel-fortran-preprocess' into release-3.19
Merge-request: !5826
2021-02-18 08:13:49 -05:00
Brad King
af074c266e Intel: Make explicit Fortran preprocessing under Ninja more robust
Tell the Fortran compiler to write preprocessor output directly to a
file, as we do for the GNU compiler.  The previous "redirect stdout"
approach could break during ABI detection with some `mpif90` wrappers
that add version information to stdout when called with `-v`.

Fixes: #21828
2021-02-18 07:35:12 -05:00
Brad King
f4efda4698 Merge branch 'FindPython-fix-variable-handling' into release-3.19
Merge-request: !5816
2021-02-16 10:48:10 -05:00
Marc Chevrier
754f4f6876 FindPython: fix erroneous variable handling
Fixes: #21817
2021-02-16 10:46:28 -05:00
Brad King
d5401de605 CMake 3.19.5 v3.19.5 2021-02-15 11:48:33 -05:00
Brad King
9c3e324259 Merge branch 'relnote-IOS_INSTALL_COMBINED-xcode12' into release-3.19
Merge-request: !5811
2021-02-15 10:12:02 -05:00
Craig Scott
cd80f3905f Help: Add 3.19.5 release notes for Xcode iOS-related changes 2021-02-14 18:28:56 +11:00
Brad King
79c89f6a95 Merge branch 'release-3.18' into release-3.19 2021-02-11 10:08:46 -05:00
Brad King
0e1dba36c3 CMake 3.18.6 v3.18.6 2021-02-11 09:18:18 -05:00
Brad King
7228faa109 Merge topic 'clang-imsvc' into release-3.19
2fc5e5dba9 Clang: Use -imsvc for system include only with MSVC-like front-end

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr>
Merge-request: !5792
2021-02-10 07:46:33 -05:00
Brad King
98597aec1a Merge topic 'ctest-dashboard-with-modified-files' into release-3.19
33fa015b4a CTest: Restore running dashboard client Test step with modified files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5791
2021-02-10 07:45:29 -05:00
Brad King
2fc5e5dba9 Clang: Use -imsvc for system include only with MSVC-like front-end
In commit bb61c2d024 (Clang: use -imsvc for system include dirs when
running on Windows, 2020-09-16, v3.19.0-rc1~162^2) we added `-imsvc`
for all Clang compilers targeting the MSVC ABI.  However, the option
only exists for the MSVC-like front-end.  The GNU-like front-ends
use `-isystem`.

Fixes: #21789
2021-02-09 11:24:41 -05:00
Brad King
33fa015b4a CTest: Restore running dashboard client Test step with modified files
Since commit 6a6f1d1edd (CTest: exit nonzero after
message(SEND_ERROR|FATAL_ERROR), 2020-04-03, v3.19.0-rc1~260^2), `ctest`
no longer runs tests if there are errors before the full set of tests is
defined.  Such errors were previously treated more like warnings.

The change exposed some cases where we were issuing an error message but
proceeding to run tests anyway.  The above commit downgraded one such
case (missing `DartConfiguration.tcl`) to a warning explicitly in order
to restore its former warning-like semantics.

Downgrade the Update step's diagnostic about modified or conflicting
files to a warning for the same reason.

Fixes: #21783
2021-02-09 11:05:08 -05:00
Brad King
340ca27f8d Merge topic 'FindXCTest-bundle-inject' into release-3.19
eafe740ead FindXCTest: Fix output directory for test bundle with new build system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5786
2021-02-09 08:25:27 -05:00
Brad King
263fd22fd8 Merge topic 'xcode12-ios_install_combined' into release-3.19
0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5785
2021-02-09 08:23:29 -05:00
Yauheni Khnykin
eafe740ead FindXCTest: Fix output directory for test bundle with new build system
The output directory was still correct for macOS with the new build system,
but not for iOS.

Fixes: #20662
2021-02-09 10:20:57 +11:00
Brad King
58167b3eb0 Merge topic 'lexer-posix-source' into release-3.19
a8b41e2c68 LexerParser: Do not override existing _POSIX_C_SOURCE definition
82cfeeb484 Merge branch 'backport-3.18-ci-wix-download' into release-3.18

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5776
2021-02-08 11:44:15 -05:00
Craig Scott
0110aa018d IOS_INSTALL_COMBINED: Support Xcode 12 (command line only)
Xcode 12 doesn't allow nested builds within the same build directory.
That means we can no longer do an install by building the install target
when IOS_INSTALL_COMBINED is true. We can, however, still do an install
by running the cmake_install.cmake script or executing cmake --install,
since there is no outer build and therefore the associated SDK can be
built as a sub-build.

The non-build methods previously didn't work when
IOS_INSTALL_COMBINED was true because the generated install script
and the CMakeIOSInstallCombined script both made certain assumptions
that relied on being part of a build. Those assumptions are now
removed. A side-effect of this work is that cpack now also works from the
command line when IOS_INSTALL_COMBINED is true.

Relates: #21282
Fixes: #20023
2021-02-08 18:02:46 +11:00
Brad King
93e077eda4 Merge branch 'lexer-posix-source' into release-3.18
Merge-request: !5776
2021-02-05 07:45:46 -05:00
Brad King
a8b41e2c68 LexerParser: Do not override existing _POSIX_C_SOURCE definition
In commit f034b0f663 (CMake compilation: do not use compiler extensions,
2020-03-14, v3.18.0-rc1~494^2) we explicitly defined `_POSIX_C_SOURCE`
to ensure availability of POSIX APIs even when compiler extensions are
not enabled.  Update the code to avoid redefining `_POSIX_C_SOURCE` if
it is already defined.  This occurs when building our release binaries
as configured in `Utilities/Release/linux`, where we define
`_POSIX_C_SOURCE` explicitly on the compiler command line.
2021-02-05 07:43:59 -05:00
Brad King
f0257a87a3 Merge topic 'doc-find-env-vars' into release-3.19
c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5772
2021-02-05 06:55:36 -05:00
Brad King
c40e81ce80 Help: Restore docs that find_library considers LIB, not INCLUDE
Documentation updates in commit 02f527c66a (Find: Provide global
controls for the `NO_[]_PATH` call options, 2019-06-12,
v3.16.0-rc1~541^2) accidentally switched the `find_library`
documentation to mention `INCLUDE` where it should be `LIB`.

While at it, update `find_file` and `find_path` to mention
`INCLUDE` and `PATH` in the order they are considered.
2021-02-04 09:09:25 -05:00
Brad King
7a76b4b19d Merge topic 'FindBoost-1.75' into release-3.19
8293064760 FindBoost: Add support for Boost 1.75

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5768
2021-02-04 08:19:16 -05:00
Brad King
7b9ea201fc Merge topic 'xcode-framework-path' into release-3.19
5389bb4274 Xcode: Don't hard-code SDK-provided implicit framework search paths
df08f8df30 cmComputeLinkInformation: Fix misspelt private variable name
375b307bae Apple: Fix linking to frameworks that do not exist until build time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5760
2021-02-04 08:18:20 -05:00
Brad King
8293064760 FindBoost: Add support for Boost 1.75
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_75_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.75.0 source tree.
They differ from 1.74's dependencies by the addition of
dependencies of the json component, so add a new version
block to FindBoost.

Fixes: #21773
2021-02-03 12:10:40 -05:00
Brad King
c131afc190 Merge topic 'findcudatoolkit_env_path' into release-3.19
4ea6d3c3ae FindCUDAToolkit: Restore use of CUDA_PATH environment variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5761
2021-02-03 10:51:28 -05:00
Robert Maynard
4ea6d3c3ae FindCUDAToolkit: Restore use of CUDA_PATH environment variable
Refactoring in commit 7cc815a2a6 (CUDAToolkit: Detect CUDA SDK that
don't have nvcc, 2020-07-24, v3.19.0-rc1~366^2) accidentally broke
use of the `CUDA_PATH` environment variable.

Fixes: #21740
2021-02-03 10:35:21 -05:00
Craig Scott
5389bb4274 Xcode: Don't hard-code SDK-provided implicit framework search paths
When a framework is linked to a target by its full path and that
framework is located in one of the implicit framework search directories,
CMake 3.18.5 and earlier discarded that path.
ce2dee9e5b (Xcode: Don't add framework as -framework argument in
linker info list, 2020-09-28) introduced a regression which resulted in
the framework path always being added to the search path even if it
matched one of the implicit search paths. This broke the ability to do
device and simulator builds from the same configured project.

Fixes: #21678
2021-02-03 23:11:21 +11:00
Craig Scott
df08f8df30 cmComputeLinkInformation: Fix misspelt private variable name 2021-02-03 23:10:08 +11:00
Brad King
375b307bae Apple: Fix linking to frameworks that do not exist until build time
Fixes: #21621
2021-02-03 10:08:48 +11:00
Brad King
0c86d15459 CMake 3.19.4 v3.19.4 2021-01-28 10:28:45 -05:00
Brad King
6cc6d464e1 Merge topic 'doc-multi-config-prop' into release-3.19
1d7daa668c Help: Add Ninja Multi-Config to list in GENERATOR_IS_MULTI_CONFIG

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !5737
2021-01-25 11:40:50 -05:00
Brad King
4ed5af7a3c Merge topic 'intel-fortran-nofor-main' into release-3.19
2a5955ac09 Intel: Replace deprecated Fortran flag -nofor_main with -nofor-main

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5729
2021-01-25 11:40:13 -05:00
Brad King
1d7daa668c Help: Add Ninja Multi-Config to list in GENERATOR_IS_MULTI_CONFIG
Fixes: #21739
2021-01-25 10:52:49 -05:00
Brad King
2a5955ac09 Intel: Replace deprecated Fortran flag -nofor_main with -nofor-main
The `-nofor_main` flag was originally added by commit ccdd3e943d (Fix
Intel Fortran SHARED libraries on Linux, 2009-10-27, v2.8.2~915).  Since
then, Intel Fortran renamed the option to `-nofor-main` and deprecated
the old name.  The new name has been available for a long time, so
we can just switch to it.

Fixes: #21735
2021-01-22 09:38:57 -05:00
Brad King
82cfeeb484 Merge branch 'backport-3.18-ci-wix-download' into release-3.18
Merge-request: !5725
2021-01-21 13:04:24 -05:00