| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
01428c5560 CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES doesn't work during detection
9f81aa0f69 CUDA: Fail if compiler detection using the host compiler fails
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5155
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If an user specified a host compiler we should fail if we are unable to perform
compiler detection with it.
Previously we would try without and likely succeed and continue. Then we'd fail
during ABI detection and compiler testing since we'd still try to use it.
This is particularly problematic when crosscompiling since we extract the host
linker from the compiler detection link line. This would result in the wrong
host linker being used and a linking error due to architecture mismatch during
ABI detection where other necessary flags may already be present to make the
host compiler work. See #21076 for an example.
Fix this by adding CMAKE_<LANG>_COMPILER_ID_REQUIRE_SUCCESS to
CMakeDetermineCompilerId, which throws a fatal error if executing the compiler
results in a non-zero exit code.
Fixes #21120.
|
|/ |
|
|
|
|
| |
Fixes: #20040
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://github.com/codespell-project/codespell#readme
The following command was used:
```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
|
|\
| |
| |
| |
| |
| |
| |
| | |
26673bf480 Xcode: Explicitly specify default native architecture on macOS
ce624cfbd4 cmGlobalXCodeGenerator: Save CMAKE_SYSTEM_NAME in member
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5023
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When `CMAKE_OSX_ARCHITECTURES` is not specified, we add the Xcode
setting `ONLY_ACTIVE_ARCH = YES` with the intention of targeting the
native architecture of the host. However, the default `ARCHS` value
chosen by "Xcode 12 Universal Apps" includes multiple architectures.
Add an explicit `ARCHS` setting with value `$(NATIVE_ARCH_ACTUAL)`
to tell Xcode to use the host's native architecture only.
Fixes: #20893
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime
selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library
selection flags by default.
To maintain backwards compatibility the default CUDA runtime
library needs to be computed based on what libraries are found
on the initial compiler invocation. For example a toolchain
could establish initial flags that have all CUDA compilations
using the runtime version, and if we don't detect this we will
try to link to both the static and shared runtime.
Co-Author: Brad King <brad.king@kitware.com>
Fixes: #20708
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
f3d7a15010 VS: Fix ClangCL toolset compiler path detection
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4523
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
f3d7a15010 VS: Fix ClangCL toolset compiler path detection
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4523
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Prior to commit 3c125c6de0 (VS: Support Visual Studio Clang Toolkit
identification, 2019-12-03, v3.17.0-rc1~341^2) using `-T ClangCL`
would work but `CMAKE_{C,CXX}_COMPILER` would be detected as `cl.exe`
even though `clang-cl.exe` is the actual compiler. That commit
attempted to fix the detection by using `$(ClangClExecutable)`
as we do for LLVM-distributed toolsets, but that is not actually
defined. Instead, look for `$(CLToolExe)` in the `PATH`.
Fixes: #20504
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
6c7e6b1e49 Ninja Multi-Config: Fix MSVC showincludes prefix detection
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !4526
|
| |/
| |
| |
| |
| |
| | |
Activate the detection logic for this generator too.
Fixes: #20506
|
| |
| |
| |
| |
| |
| | |
For example, with GNU `as`, we match `GNU assembler`, but with GNU `gcc`
as the assembler, we do not match anything. Distinguishing these cases
may be useful for constructing assembler command lines.
|
|/
|
|
|
|
| |
Apply the change from commit d751d2d2ed (CMakeDetermineCompilerABI: set
locale to C for try_compile(), 2019-01-14, v3.14.0-rc1~108^2~1) to the
`CMAKE_DETERMINE_COMPILER_ID_VENDOR` implementation too.
|
|
|
|
|
|
| |
Fixes #18733
Correct an oversight where the MSVC generators didn't populate
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
2f853eec3d Merge branch 'backport-3.15-vs-v142-version' into backport-3.16-vs-v142-version
d8d4924d98 VS: Fix support for v142 toolset minor versions in VS 16.5+
07612646fe VS: Fix support for v142 toolset minor versions in VS 16.5+
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4133
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The fix in commit 5117389931 (VS: Fix support for v142 toolset minor
versions, 2019-10-01, v3.16.0-rc1~32^2) worked around a bug in VS's
placement of toolset files. VS 16.5 will fix that bug and restore the
original pattern for locations of toolset files. Update our logic to
look for both possibilities.
Issue: #19779
|
| |
| |
| |
| |
| | |
Teach CMake that the `ClangCl` toolset uses the `ClangClExecutable`
value as the path to the compiler executable.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Ninja generator's support for Fortran requires that source files
be preprocessed explicitly first. However, the `xlf` compiler does
not have a simple `-E` option or equivalent to do preprocessing.
The only documented way to get preprocessed output is to use `-d`
to leave it behind, but only at an inflexible location.
Instead, create our own `cpp` wrapper script and substitute it for the
real preprocessor using `-tF -B ...`. Teach the wrapper to map the
`cpp` output to the location we need and then invoke the real `cpp`
underneath.
Fixes: #19450
|
| |
| |
| |
| | |
Issue: #19708
|
|/
|
|
| |
Fixes: #19708
|
|\
| |
| |
| |
| |
| |
| | |
5117389931 VS: Fix support for v142 toolset minor versions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3874
|
| |
| |
| |
| |
| |
| |
| |
| | |
When using `-T v142,version=14.22` the `.props` file location is
different starting with version `14.20` than it was in `14.16` and
below. Adapt the path based on the version.
Fixes: #19779
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| | |
863f7eb6d7 clang: Restore support for clang-cl on non-Windows hosts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3634
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The frontend variant detection logic added by commit 53fbe23f3f (clang:
introduce CMAKE_<lang>_COMPILER_FRONTEND_VARIANT, 2019-02-20,
v3.15.0-rc1~41^2~8) assumes that `clang-cl` only runs on a Windows host.
It is also available on non-Windows hosts. Fix the condition.
Fixes: #19544
|
|/
|
|
|
|
|
|
|
|
|
| |
Our compiler identification source encodes `INFO:compiler[...]` and
similar strings in compiled objects or binaries that we then extract to
get information about the compiler. With most compilers the strings are
encoded in the binaries as a simple byte sequence. However, some
compilers use other encodings. For example, the MS CSharp compiler uses
UTF-16LE and a TI compiler uses UTF-16BE. Try each encoding.
Fixes: #19459
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
74829f01b1 Help: Add notes for topic 'clang-gnulike-support'
19669abe1d Tests: handle string escaping differences with NMake+clang
a2a90f41e3 Tests: require C++14 for the Tutorial
4819ff9647 Tests: fix failures with gnu mode clang on windows
26af0b25e7 cmake: use correct stack size with gnu mode clang on windows
d44c0db0b2 clang: setup correct configuration in gnu mode
b7d5ef23e9 cmGlobalNinjaGenerator: use gnu compatible paths with clang in gnu mode
3d0210d8dc binutils: add the llvm-* variants to the tool lists.
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Francesco Bertolaccini <francesco@bertolaccini.dev>
Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com>
Acked-by: Saleem Abdulrasool <compnerd@compnerd.org>
Merge-request: !2992
|
| |
| |
| |
| |
| |
| |
| |
| | |
This variable is set to GNU on Windows when clang.exe ar clang++.exe is
used, and set to MSVC for clang-cl.exe.
CMAKE_<lang>_SIMULATE_ID is set to MSVC in both cases, as clang defaults
to -fms-compatibility for all command lines on windows.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
9c07cefee5 VS: Fix ApplicationTypeRevision in builtin check projects
639e14def6 VS: Factor out helper to compute ApplicationTypeRevision
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3350
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do not use the entire `CMAKE_SYSTEM_VERSION`, but rather the first two
components only.
Fixes: #19275
|
|/ /
| |
| |
| |
| |
| |
| | |
The compiler identification message was modified in commit ea83d0f8fb
(IAR: Generalize and add support for IAR RX compiler, 2019-04-05) to
include the architecture id since IAR compilers are arch-specific.
Revise the logic to avoid modifying the message for other compilers.
|
| | |
|
| |
| |
| |
| |
| | |
If compiler id detection gave us the compiler tool, copy its value to
the `CMAKE_${lang}_COMPILER` variable as early as possible.
|
|/
|
|
| |
Fixes: #18215
|
|
|
|
|
|
|
|
|
|
| |
Supports versioned LLVM toolsets like LLVM_v142, LLVM_v141,
LLVM_v141_xp, etc. for Visual Studio (2010 and later).
The name for versioned LLVM toolsets has "LLVM_" prefix
plus MSVC toolset name (i.e. v142, v141, v141_xp, etc.).
Fixes: #19203
|
|
|
|
| |
Moved common ASM setup to the common macros and changed version check.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
8375c303e2 VS: Fix detection of clang-cl with -T llvm
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3024
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using a VS generator with `-T llvm`, MSBuild relies on the "LLVM
Compiler Toolchain" VS Extension. This does not put `clang-cl` in the
`PATH` inside the build, and LLVM no longer provides a `cl` replacement
either. Therefore we need another way to extract the path to the
`CMAKE_{C,CXX}_COMPILER`. Fortunately the LLVM VS integration provides
a `$(ClangClExecutable)` macro we can reference to get the path.
Fixes: #18983
|
|/
|
|
|
|
|
|
| |
MS-style command-line tools accept either `/` or `-` for command-line
options. Prefer `-` over `/` so that non-MS tools do not treat it as a
path.
Fixes: #18941
|
|
|
|
| |
Closes: #18396
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
e8ee8cab97 Xcode: Completely disable code signing for compiler id detection
11da882a12 Apple: Introduce separate system name for iOS, tvOS, and watchOS
36cf44a7a3 Tests: Isolate RunCMake.XcodeProject per-device cases from host arch
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2392
|
| |
| |
| |
| | |
Issue: #17870
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove code signing requirements for non-macOS
- Do not set deployment target for non-macOS
- Build static library for compiler feature detection for non-macOS
- Use framework to run CompilerId tests for watchOS
- Port tests to new SDK handling
- Add new Apple cross-compiling section to toolchain documentation
Closes: #17870
|
|/
|
|
|
|
| |
Xcode 10.2 no longer supports Swift language versions before 4.0.
Fixes: #18871
|
|
|
|
|
|
|
|
|
|
|
|
| |
-- Detect GHS compiler and version
Detect ARCHITECTURE_ID for PPC / ARM / 86 targets
Detect PLATFORM_ID for Integrity and Integrity178 platforms
Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86
-- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator
Works around issue with some GHS compilers not setting __ghs__ compiler define
-- Tweak Compiler ID checking so major id of 002017 is not replaced with 217
-- Prefer try_compile() library targets when testing for working GHS compilers
-- Avoid CMake errors if reading past end of file for checking if file is PE executable
|