| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
f5d3da091b Clang: Look for llvm-lib when using MSVC-like front-end
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr>
Merge-request: !5264
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In commit 55196a1440 (MSVC: Use 'lib' instead of 'link /lib' to create
static libraries, 2020-01-10, v3.18.0-rc1~625^2) we changed CMake to use
lib instead of `link /lib` to create static libraries, but it didn't
search for `llvm-lib`. If you have `llvm-lib` but not `lib` (e.g. when
cross-compiling), when `CMakeFindBinutils` is invoked for the `C` and
`CXX` languages, `CMAKE_AR` is not found. When it's subsequently invoked
for the ASM language, `CMAKE_ASM_SIMULATE_ID` and
`CMAKE_ASM_COMPILER_FRONTEND_VARIANT` are not set (because
`CMakeDetermineASMCompiler` doesn't call `CMAKE_DETERMINE_COMPILER_ID`,
which sets those variables), so we go down the non-MSVC conditional and
set `CMAKE_AR` to a GNU-style `ar`, which of course does not understand
lib flags. Explicitly search for `llvm-lib` to avoid this situation.
|
| |
| |
| |
| | |
Fixes: #21137
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
5ece12b7e4 gitlab-ci: add ISPC to the Fedora CI image
8976817d6d ISPC: Update help documentation to include ISPC
2368f46ba4 ISPC: Support building with the MSVC toolchain
e783bf8aa6 ISPC: Support ISPC header generation byproducts and parallel builds
34cc6acc81 Add ISPC compiler support to CMake
419d70d490 Refactor some swift only logic to be re-used by other languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5065
|
| | |
|
|/
|
|
|
|
|
|
|
| |
Since commit c5dd2ca538 (DetermineCompiler: Relax
_CMAKE_TOOLCHAIN_PREFIX detection, 2020-03-25, v3.18.0-rc1~430^2),
`_CMAKE_TOOLCHAIN_PREFIX` may be set even when not cross-compiling.
In this case we may still need to use binutils without any prefix.
Fixes: #21103
|
|
|
|
|
|
| |
`link.exe /lib` is an undocumented flag and it just calls `lib.exe`.
Also `link.exe` doesn't parse the `/lib` option correctly when in a
response file.
|
|
|
|
|
|
|
|
| |
Revert commit b2fd479df5 (FindBinUtils: Use the compiler to get the path
to compiler tools, 2019-09-22, v3.16.0-rc1~51^2). The compiler's answer
may incorrectly come from the `PATH`. Another approach will be needed.
Fixes: #19934
|
|
|
|
|
|
|
|
|
| |
Some unset calls were added by commit 079b8e2916 (Clang: prefer lld-link
over link.exe, 2019-07-11, v3.16.0-rc1~161^2~2) but they are unnecessary
since commit 3a82ef78eb (CMakeFindBinUtils: Rename and unset variables
for additional names, 2019-07-23, v3.16.0-rc1~332^2~2).
Suggested-by: Norbert Lange <nolange79@gmail.com>
|
|
|
|
| |
Fixes: #19728
|
| |
|
|
|
|
|
|
| |
Objects compiled with -flto can only be linked with the llvm linker.
Before this change, clang-cl only supperted IPO with manual linker
selection.
|
| |
|
|
|
|
|
| |
LLVM 8.0 already ships with alternatives for all
current Binutils. Enable them.
|
|
|
|
|
| |
use the name pattern `_CMAKE_ADDITIONAL_<PROGRAM_NAME>_NAMES`,
and unset those variables at the end of the function
|
|
|
|
|
|
|
| |
This allows cmake to use the ar/ranlib/objdump/ld tools on windows
without mingw installed.
These tools are selected when clang is in GNU command line mode.
|
|
|
|
|
|
|
|
|
|
|
|
| |
CMake commands vs_link_dll and vs_link_exe, performing linking on MSVC,
are responsible for calling resource compiler and manifest tool.
Before this commit, both of these tools were called directly, with the
expectation that they are available in the `PATH`. This has been fixed
by respecting CMake variables `CMAKE_RC_COMPILER` and `CMAKE_MT`
defining paths to these tools.
Fixes: #17804
|
|
|
|
|
| |
We use this in `Modules/Platform/Windows-NVIDIA-CUDA.cmake`, so make
sure it is available.
|
|
|
|
|
|
|
|
|
|
| |
If a project or toolchain file hard-codes a tool location such as
`CMAKE_LINKER` with a plain `set()` then the value will be stored
in compiler information files but not cached. If the value is
not cached then we should not mark it as advanced because doing
so will initialize an empty cache entry.
Fixes: #18315
|
|
|
|
| |
Fixes: #17693
|
|
|
|
|
|
|
|
| |
The switch was not considering some languages, such as `ASM`.
Instead of memorizing the list of languages in the condition,
use a language specified by the includer.
Fixes: #17510
|
|
|
|
|
|
|
| |
PGI on Windows should use the Visual C++ linker and librarian and not
the ar provided for legacy reasons. The compiler parameters themselves
are the same as their Linux parameters and not compatible to MSVC
however.
|
|
|
|
|
| |
On Windows the host link launcher is just `link.exe`. Find and use that
instead of trying to extract the launcher from the `nvcc -v` output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
|
|
|
|
|
| |
When testing CMAKE_<LANG>_COMPILER_ID values against "MSVC", do not
allow the definition of the "MSVC" variable to be expanded.
|
|
|
|
|
|
|
| |
When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly
dereference or quote the variable. We want if() to auto-dereference the
variable and not its value. Also replace MATCHES with STREQUAL where
equivalent.
|
|
|
|
|
|
|
|
|
|
| |
Teach CMakeDetermineCompilerId to recognize the Tegra-Android platform
and generate a test project for Nsight Tegra tools. Locate the full
path to CMAKE_<LANG>_COMPILER by computing it within the test project
build environment.
Also teach CMakeFindBinUtils that this variant of the Visual Studio
generator uses UNIX-like instead of MS-like archiving and linking tools.
|
|
|
|
|
|
| |
When cross compiling, toolchains won't have install_name_tool,
which is provided by Xcode and command line tools on OS X.
This is a Mach-O specific utility and not required on all platforms.
|
|
|
|
|
|
|
|
|
| |
Clang can compile code, but uses the gcc tools for other tasks such
as linking. The -gcc-toolchain option can be used for that, but
generalize so that other compilers can be treated the same.
If such a location is specified, use it as a hint for finding
the binutils executables.
|
|
|
|
|
|
|
|
|
| |
Teach CMake(C|CXX|Fortran)CompilerId* to report the MSVC version
simulated by the Intel compiler, if any. Refactor the Windows-Intel
platform information helper module to load Windows-MSVC instead of
duplicating the information. Teach Windows-MSVC to understand when
it is loaded as the simulated Fortran compiler (its preprocessor is
simulated).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach the compiler identification preprocessor tests to report when
Clang simulates MSVC, and what version. If not MSVC, assume GNU.
Teach compiler information modules Clang-(C|CXX) to recognize when Clang
simulates MSVC and skip loading the GNU information.
Teach the Windows-MSVC platform information to recognize when it is
loaded as the simulated compiler and use that version information
instead of the real compiler's (different) version scheme.
Add platform modules Windows-Clang-(C|CXX) and support module
Windows-Clang to load either Windows-MSVC or Windows-GNU and wrap
the corresponding information macros.
|
|
|
|
|
|
|
| |
The TI cross compilers are named e.g. cl6x or armcl, the accompanying
strip and ar have the same prefixes/suffixes.
Alex
|
|
|
|
|
|
| |
Additionally, look for a special ar and strip
Alex
|
|
|
|
| |
removing arguments omitted in 9db3116226cb99fcf54e936c833953abcde9b729
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ancient CMake versions required upper-case commands. Later command
names became case-insensitive. Now the preferred style is lower-case.
Run the following shell code:
cmake --help-command-list |
grep -v "cmake version" |
while read c; do
echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace. Wipe out all remnants of trailing whitespace
everywhere except third-party code.
Run the following shell code:
git ls-files -z -- \
bootstrap doxygen.config '*.readme' \
'*.c' '*.cmake' '*.cpp' '*.cxx' \
'*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
'*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
|
| |
|
|
|
|
|
|
|
| |
This adds copyright/license notification blocks CMake's non-find
modules. Most of the modules had no notices at all. Some had notices
referring to the BSD license already. This commit normalizes existing
notices and adds missing notices.
|
|
|
|
|
|
|
|
|
|
| |
- The find_* commands now provide a HINTS option.
- The option specifies paths to be preferred over the system paths.
- Many Find* modules were using two find calls with NO_DEFAULT_PATH
to approximate the behavior, but that blocked users from overriding
things with CMAKE_PREFIX_PATH.
- This commit uses the HINTS feature to get desired behavior in
only one find command call.
|
|
|
|
|
|
|
|
|
|
| |
- Add cmSystemTools::ChangeRPath method
- Add undocumented file(CHRPATH) command
- When installing use file(CHRPATH) to change the rpath
instead of relinking
- Remove CMAKE_CHRPATH lookup from CMakeFindBinUtils
- Remove CMAKE_USE_CHRPATH option since this should
always work
|
|
|
|
| |
non-advanced options in cache.
|
|
|
|
| |
Alex
|
|
|
|
|
|
| |
compiling
Alex
|
|
|
|
|
|
|
|
|
|
| |
file format. Tested for ELF on x86 Linux, COFF and Mach-O prepared but
commented out since I don't have such systems available. Please have a look
a CMakeDetermineCompilerId.cmake and enable the test for them too.
Only add the option for using chrpath if the executable format is ELF
Alex
|
|
|
|
|
|
|
| |
option is not scriptable and so breaks the toolchain test
or maybe option() should be made scriptable ?
Alex
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
installing without having to link the target again -> can save a lot of time
chrpath is handled very similar to install_name_tool on the mac. If the
RPATH in the build tree file is to short, it is padded using the separator
character.
This is currently disabled by default, it can be enabled using the option
CMAKE_USE_CHRPATH. There are additional checks whether it is safe to enable
it. I will rework them and use FILE(READ) instead to detect whether the
binaries are actually ELF files.
chrpath is available here
http://www.tux.org/pub/X-Windows/ftp.hungry.com/chrpath/
or kde svn (since a few days): http://websvn.kde.org/trunk/kdesupport/chrpath/
Alex
|
|
|
|
|
|
|
| |
configure the toolchain file into it if required
-also search for nm, objdump and objcpy, so these can be used in macros
Alex
|
|
|
|
| |
Alex
|
|
|
|
|
|
| |
generator too
Alex
|