Commit Graph

55019 Commits

Author SHA1 Message Date
Rose
dd918c517d Source: Simplify some boolean expressions 2021-10-23 11:30:27 -04:00
Kitware Robot
46bd57d245 CMake Nightly Date Stamp 2021-10-23 00:03:11 -04:00
Brad King
ca3e83250f Merge topic 'lcc-policy'
3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6643
2021-10-22 07:08:58 -04:00
Brad King
b3802804f1 Merge topic 'ci-openwatcom'
b7863da78f ci: Avoid OpenWatcom linker temp file collisions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6650
2021-10-22 07:07:48 -04:00
Kitware Robot
26c61c6244 CMake Nightly Date Stamp 2021-10-22 00:01:07 -04:00
Brad King
b7863da78f ci: Avoid OpenWatcom linker temp file collisions
When `wlink` needs to spill into a temporary file, code in `spillio.c`
checks environment variables `WLINKTMP`, `TMP`, and `TMPDIR` to get a
directory for temporary files.  It searches for a name `WLK02112.xx*`
that doesn't exist, where `*` starts at `a` and increments.  Then it
opens the file with the chosen name.  This can race among concurrent
`wlink` invocations that may all chose the same name before opening,
and causes errors like:

    Error! E3008: cannot open C:\...\Temp\WLK02112.xxa : Permission denied

Since `wmake` does not run parallel jobs, this normally isn't a problem.
However, our test suite runs multiple tests in parallel.  Each test has
its own `wmake` invocation, and therefore can run `wlink` concurrently.

Set `WLINKTMP=.` in the environment to tell each `wlink` to place
temporary files in its own working directory, which will be different
for each separate `wmake` invocation in our test suite.
2021-10-21 10:47:39 -04:00
makise-homura
3958ed878f LCC: Add policy CMP0129 regarding interpreting LCC as GNU
Due to MCST LCC compiler identification is now changed to LCC,
there should be a way for old projects to still identify it as GNU,
as it was before.
This commits adds the policy:
CMP0129: Compiler id for MCST LCC compilers is now LCC, not GNU.
This policy controls such a behavior.
OLD behaivior is to treat LCC as GNU, NEW is to treat is as LCC.
2021-10-21 17:24:22 +03:00
Brad King
e1acb03cd9 Merge branch 'release-3.22' 2021-10-21 09:21:24 -04:00
Brad King
fcab9785c9 Merge topic 'vs-instance'
46e9ff5729 Restore honoring CMAKE_GENERATOR_INSTANCE in toolchain file
42418b02f7 Android: Refactor sysroot detection under Visual Studio
44a86d0b38 cmake_host_system_information: Add undocumented VS_MSBUILD_COMMAND key
6999b87133 cmGlobalVisualStudio10Generator: Add method to find MSBuild early
7f730464be cmGlobalGenerator: Add method to check if generator is at least VS 10
8917b8512f cmGlobalVisualStudioVersionedGenerator: Allow repeating SetGeneratorInstance
6511654164 cmGlobalVisualStudio10Generator: Allow subclasses to reset MSBuild search

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6646
2021-10-21 09:21:24 -04:00
Brad King
b0c62a133e Merge topic 'vs-instance' into release-3.22
46e9ff5729 Restore honoring CMAKE_GENERATOR_INSTANCE in toolchain file
42418b02f7 Android: Refactor sysroot detection under Visual Studio
44a86d0b38 cmake_host_system_information: Add undocumented VS_MSBUILD_COMMAND key
6999b87133 cmGlobalVisualStudio10Generator: Add method to find MSBuild early
7f730464be cmGlobalGenerator: Add method to check if generator is at least VS 10
8917b8512f cmGlobalVisualStudioVersionedGenerator: Allow repeating SetGeneratorInstance
6511654164 cmGlobalVisualStudio10Generator: Allow subclasses to reset MSBuild search

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6646
2021-10-21 09:21:23 -04:00
Brad King
52144401b9 Merge branch 'release-3.22' 2021-10-21 09:20:03 -04:00
Brad King
dd23cdce65 Merge topic 'doc-file-INSTALL-fix'
1560265e7d Help: Fix file(INSTALL) docs w.r.t. CMAKE_INSTALL_MESSAGE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6645
2021-10-21 09:20:03 -04:00
Brad King
d97497ee65 Merge topic 'doc-file-INSTALL-fix' into release-3.22
1560265e7d Help: Fix file(INSTALL) docs w.r.t. CMAKE_INSTALL_MESSAGE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6645
2021-10-21 09:20:02 -04:00
Brad King
edd60a2188 Merge topic 'fix_reroot_paths'
91ec6eee58 find_package: Don't reroot prefix that is equal to a root path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6644
2021-10-21 09:19:22 -04:00
Brad King
95e8d89a29 Merge topic 'refactor_cuda_support_to_allow_rdc_ptx'
61b9764b03 CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6594
2021-10-21 09:18:23 -04:00
Kitware Robot
0af3c2e78c CMake Nightly Date Stamp 2021-10-21 00:02:55 -04:00
Brad King
46e9ff5729 Restore honoring CMAKE_GENERATOR_INSTANCE in toolchain file
Revert the changes from commit d5b5c19278 (cmGlobalGenerator:
FindMakeProgram() before CMakeDetermineSystem, 2020-06-15,
v3.19.0-rc1~619^2~3) and commit ef91fb02f3 (cmGlobalGenerator:
FindMakeProgram() at a generator-specific time, 2020-11-23,
v3.19.1~2^2).  We must delay selecting the location of MSBuild until
after an instance of Visual Studio has been selected.

It is now safe to revert the ordering because the motivating use
case (sysroot detection in Platform/Android-Determine) has been
implemented another way.

Fixes: #22782
2021-10-20 13:00:26 -04:00
Brad King
42418b02f7 Android: Refactor sysroot detection under Visual Studio
Since commit 6051a49c78 (Visual Studio: Add Android support, 2020-06-12,
v3.19.0-rc1~619^2) we run MSBuild to build a sample project to detect
the sysroot.  Previously we relied on `CMAKE_VS_MSBUILD_COMMAND` being
available.  That required commit d5b5c19278 (cmGlobalGenerator:
FindMakeProgram() before CMakeDetermineSystem, 2020-06-15,
v3.19.0-rc1~619^2~3) to make it available early enough.  However, that
ordering broke `CMAKE_GENERATOR_INSTANCE` so we need to prepare to
revert it.  Use `cmake_host_system_information` to get the location of
MSBuild under a VS generator instead.
2021-10-20 13:00:25 -04:00
Brad King
44a86d0b38 cmake_host_system_information: Add undocumented VS_MSBUILD_COMMAND key
When using the Visual Studio generator for VS 10 or above,
offer this key to get the location of the MSBuild command
before the first `project()` or `enable_language()` command
has finished running.

This will be needed only by one of our own modules, so leave it
undocumented for now.
2021-10-20 13:00:25 -04:00
Brad King
6999b87133 cmGlobalVisualStudio10Generator: Add method to find MSBuild early
Add a way to find MSBuild before the main `FindMakeProgram` code path
has executed.
2021-10-20 13:00:25 -04:00
Brad King
7f730464be cmGlobalGenerator: Add method to check if generator is at least VS 10 2021-10-20 13:00:25 -04:00
Brad King
8917b8512f cmGlobalVisualStudioVersionedGenerator: Allow repeating SetGeneratorInstance 2021-10-20 13:00:25 -04:00
Brad King
6511654164 cmGlobalVisualStudio10Generator: Allow subclasses to reset MSBuild search
While at it, convert to inline initialization.
2021-10-20 13:00:25 -04:00
Alexandru Croitor
91ec6eee58 find_package: Don't reroot prefix that is equal to a root path
When both CMAKE_FIND_ROOT_PATH and CMAKE_PREFIX_PATH are set to
/opt/my_device_sysroot, cmFindCommon::RerootPaths would only look
for packages in /opt/my_device_sysroot/opt/my_device_sysroot
but would not try to look in /opt/my_device_sysroot.

Make sure to not reroot the prefix path in such a case.

Fixes: #21937
2021-10-20 18:50:41 +02:00
Arcturus Arcturus
1560265e7d Help: Fix file(INSTALL) docs w.r.t. CMAKE_INSTALL_MESSAGE
In commit c9568de52c (install: Add CMAKE_INSTALL_MESSAGE variable
(#13761), 2014-06-24, v3.1.0-rc1~370^2~1) we incorrectly documented
that `CMAKE_INSTALL_MESSAGE` controls the status message for
`file(INSTALL)`.  Revert that.

Fixes: #17162
2021-10-20 12:48:04 -04:00
Robert Maynard
61b9764b03 CUDA: Allow both CUDA_SEPARABLE_COMPILATION and CUDA_PTX_COMPILATION
The target properties `CUDA_SEPARABLE_COMPILATION` and `CUDA_PTX_COMPILATION`
now aren't mutually exclusive and can now be used together on the same
target.
2021-10-20 11:18:06 -04:00
Brad King
3b5e1b53ea Merge topic 'vs-unity-individual-pch'
71f15be957 VS: Fix compilation of single source with PCH in Unity Build
7fcc35c676 Tests: Clean RunCMake.UnityBuild cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6641
2021-10-20 09:02:32 -04:00
Brad King
af0230fdad Merge topic 'target-sources-test-refactor'
7d07569e4d Tests/RunCMake: Merge TargetSources into target_sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6642
2021-10-20 08:58:19 -04:00
Brad King
b7510944dc Merge topic 'platform-generic-elf'
3f9b40dab7 Generic-ELF: Add platform module to configure the .elf file extension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6630
2021-10-20 08:55:39 -04:00
Kitware Robot
9be4c7f0c4 CMake Nightly Date Stamp 2021-10-20 00:01:06 -04:00
Kyle Edwards
7d07569e4d Tests/RunCMake: Merge TargetSources into target_sources 2021-10-19 16:59:10 -04:00
Brad King
71f15be957 VS: Fix compilation of single source with PCH in Unity Build
Sources that are part of a unity build are normally not compiled
individually.  However, the VS IDE allows a single source to be
compiled.  This can also be achieved on the command line:

    msbuild my.vcxproj ... -t:ClCompile -p:SelectedFiles=<src>

where `<src>` is the path in the vcxproj `ClCompile` entry.

In a target with precompiled headers, the source needs PCH settings to
support individual compilation even if the normal unity build does not.
2021-10-19 11:50:07 -04:00
Brad King
7fcc35c676 Tests: Clean RunCMake.UnityBuild cases 2021-10-19 11:50:06 -04:00
Jordan Williams
3f9b40dab7
Generic-ELF: Add platform module to configure the .elf file extension
The `.elf` extension is a common convention used for embedded binaries.
Both Arm and RISC-V use the ELF file format for executables.
Configuring the `.elf` file extension is typically done incorrectly.
Most embedded developers set this in toolchain files, which is not
the correct place.
This is typically accomplished through a hack by setting the individual
language file extensions for C, CXX, and ASM.
Multiple CMake issues in the past have been opened related to this.

* #16538
* #20163
* #17880

A platform module makes it simpler and less error prone for developers
targeting these ubiquitous bare-metal platforms.
This PR attempts to solve this globally with a generic platform.
This could also be solved by using more specific platform modules, such
as one for each of bare-metal Arm and RISC-V.
2021-10-19 10:02:04 -05:00
Brad King
52ea22ca65 Merge branch 'release-3.22' 2021-10-19 09:46:43 -04:00
Brad King
76b07824cb Merge branch 'release-3.21' 2021-10-19 09:46:41 -04:00
Brad King
2f7e72a341 Merge branch 'release-3.21' into release-3.22 2021-10-19 09:46:35 -04:00
Brad King
98c45349a3 Merge branch 'release-3.22' 2021-10-19 09:45:43 -04:00
Brad King
622add8671 Merge topic 'vs2022'
f117c7d11e Help: Update 3.22 release notes for the VS 2022 Release Candidate
d5a7448fa4 Merge branch 'backport-3.21-vs2022' into vs2022
3d9d75b0be VS: Update Visual Studio 17 2022 generator for the Release Candidate

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6640
2021-10-19 09:45:43 -04:00
Brad King
72393a9e73 Merge topic 'vs2022' into release-3.22
f117c7d11e Help: Update 3.22 release notes for the VS 2022 Release Candidate
d5a7448fa4 Merge branch 'backport-3.21-vs2022' into vs2022
3d9d75b0be VS: Update Visual Studio 17 2022 generator for the Release Candidate

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6640
2021-10-19 09:45:42 -04:00
Brad King
f117c7d11e Help: Update 3.22 release notes for the VS 2022 Release Candidate 2021-10-19 09:37:05 -04:00
Brad King
d5a7448fa4 Merge branch 'backport-3.21-vs2022' into vs2022 2021-10-19 09:36:19 -04:00
Brad King
69c6994023 Merge branch 'backport-3.21-vs2022' into release-3.21
Merge-request: !6640
2021-10-19 09:35:50 -04:00
Brad King
3d9d75b0be VS: Update Visual Studio 17 2022 generator for the Release Candidate 2021-10-19 09:27:37 -04:00
Brad King
d723bac01c Merge topic 'lcc-compiler'
02b2607a5c Help: Add release note for MCST LCC compiler support
e5d9fce03f LCC: Add dedicated support for MCST LCC compiler
2b9ef77944 CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecture
0995c75301 Tests/RPM: skip tests tat rely on debugedit if it's not found
ea55ac9a51 Tests/RunCMake/CommandLine: Deal with locales that are different from English

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6608
2021-10-19 09:22:22 -04:00
Brad King
02b2607a5c Help: Add release note for MCST LCC compiler support 2021-10-19 09:09:05 -04:00
Brad King
cf55414007 Merge branch 'release-3.22' 2021-10-19 09:07:04 -04:00
Brad King
d252b6a1a0 Merge topic 'doc-genex-CONFIG-commas'
ec94706791 Help: gen expr: note that CONFIG is comma-separated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6636
2021-10-19 09:07:04 -04:00
Brad King
7984f98d8f Merge topic 'doc-genex-CONFIG-commas' into release-3.22
ec94706791 Help: gen expr: note that CONFIG is comma-separated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6636
2021-10-19 09:07:03 -04:00
Michael Hirsch
ec94706791 Help: gen expr: note that CONFIG is comma-separated 2021-10-19 09:05:48 -04:00