The PGI documentation says that `-Mpreprocess` "instructs the compiler
to perform cpp-like preprocessing on assembly and Fortran input source
files". The `-E` flag causes the compiler to spit the result to stdout
instead of saving it to a file.
`PYTHON_LIBRARY` may contain a list because of `SelectLibraryConfigurations`.
If it is the case, the list can be:
optimized;<FILEPATH_TO_RELEASE_LIBRARY>;debug;<FILEPATH_TO_DEBUG_LIBRARY>
Instead of directly using the value of `PYTHON_LIBRARY` in the CMake
function `get_filename_component()`, we loop over the content of the
relevant parts of `PYTHON_LIBRARY` and `PYTHON_DEBUG_LIBRARY` whether
they are lists or not.
Suggested-by: Brad King <brad.king@kitware.com>
Do not assume that the implicit link line is the last line of the output
from `nvcc -v`. Instead first find the `LIBRARIES=` line, and then look
for that content on a later line. It appears twice. First on a call to
`nvlink`, which we ignore. Later it appears on the implicit link line.
Extract the latter line. On failure, abort with a `FATAL_ERROR` so that
the user does not try to build without proper link information.
Once we have the line, parse it with `separate_arguments` using the
`UNIX_COMMAND` option just like `CMakeParseImplicitLinkInfo` already
does. This robustly parses the command line and removes quoting.
Then extract the first argument as the host link launcher.
- Unify path handling: Rather than repeat the same logic for each
individual path create two macros which can be used throughout
the module.
- Capitalise helpstrings to match the conventions used by the
standard CMake properties
Since commit v3.7.0-rc1~392^2 (Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT
set in toolchain files, 2016-07-05) our convention is to initialize
compiler flag variables via `string(APPEND)` rather than `set()`.
Fix the convention for `CMAKE_CUDA_FLAGS[_<CONFIG>]_INIT`.
97c1e569 Help: Add release note for C++ 17 support
85c8e652 Features: Activate C++ 17 support for AppleClang 6.1+
8084f7a6 Features: Activate C++ 17 support for Clang 3.5+
24e29d41 Features: Activate C++ 17 support for GNU 5.1+
ae1a6815 Features: Add infrastructure for C++ 17 language standard
684e4d20 Features: Make feature recording conditions more consistent
* In older version "%dir %attr(-, root, root) foo" would put "%dir foo"
in the final spec file.
* Also added comment to describe this and advise not not to add trailing
slashes to directories in USER_FILELIST.
* Includes test in RunCMake CPack which now passes.
Create OpenGL::GL and OpenGL::GLU imported targets using the locations
found.
This feature was originally added by commit v3.1.0-rc1~420^2~2
(FindOpenGL: Provide imported targets for GL and GLU, 2014-05-31) but
had to be reverted by commit v3.1.0-rc3~10^2 (FindOpenGL: Revert support
for imported targets, 2014-12-01) due to issue #15267. Since then we
added support for `IMPORTED_LIBNAME` to interface libraries, so use it
to handle the case where we have only the library name without an
absolute path.
Inspired-by: Philipp Möller <bootsarehax@googlemail.com>
Closes: #15267
Condition all calls to `_record_compiler_features_{c,cxx}` on
`_result EQUAL 0` so that adding new language standards later does
not need to update them. Avoid some duplicate compiler version
checks by conditioning C11 and CXX14 feature recording on the
existence of `CMAKE_{C11,CXX14}_STANDARD_COMPILE_OPTION` (whose
setting already used the version check).
Split the arguments off of the `ASM${ASM_DIALECT}` environment variable
as is done for `CC` and other compiler variables. This fixes using CMake
when `ASM*` is used to pass additional target flags, e.g. when one uses
`ASM=${CC}`.
When another target depends on the generated files CMake must know which
custom command generates them in order to hook up the dependency
properly. We already do this for Python. Add the Java files too.
745b56f5 Find*.cmake: drop the comments before including FPHSA
0ab9cb46 FindLibArchive: do not set LibArchive_FOUND explicitly
703d1943 FindLibArchive: use CMAKE_CURRENT_LIST_DIR to find FPHSA
4cc601f2 Help: Add release note for CUDA support
7b9131da CUDA: Add tests to verify CUDA compiler works properly.
9cf5b98d CUDA: Prefer environment variables CUDACXX and CUDAHOSTCXX.
a5e806b3 CUDA: Add support for CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY
d038559e CUDA: Add separable compilation support to the makefile generator.
43ce4414 CUDA: Add separable compilation support to the ninja generator.
4b316097 CUDA: Add support for the CUDA_SEPARABLE_COMPILATION target property
ae05fcc6 CUDA: Add LinkLineComputer that computes cuda dlink lines.
115269a8 CUDA: Refactor cmLinkLineComputer to allow for better derived children.
5dec4031 CUDA: Refactor CMakeCUDAInformation to prepare for separable compilation.
5b20d0ab CUDA: C++ compile features now enable cuda c++11 support.
489c52ce CUDA: Use the host compiler for linking CUDA executables and shared libs.
bbaf2434 CUDA: add support for specifying an explicit host compiler.
a92f8d96 CUDA: Enable header dependency scanning.
ec6ce623 CUDA: State that cuda has preprocessor output and can generate assembly.
4f5155f6 CUDA: We now properly perform CUDA compiler identification.
...