| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
With numerous compilers now supporting multiple language standards in CMake,
some common design patterns have begun to emerge. This is intended to
be a collection of macros implementing many of those common design
patterns that can be factored out and leveraged by many compilers.
Currently this only contains the code to set the default language
standard of not preset. More functionality will be added in the future
as appropriate.
|
|\
| |
| |
| |
| |
| |
| | |
7d057b27 Clang IPO (LTO) support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !717
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The valid settings to pass to the IBM XL compiler for the -qhalt flag
vary widely by language and platform. Based on existing documentation,
the following table shows which error levels are valid to pass to
-qhalt= since -qhalt=e is not always available.
OS | xlc | xlC | xlf |
---------|-------|------------------
AIX | iwes | iw s | ilwesu |
BlueGene | iwes | iwes | ilwesu |
OS X | iwesu | iwesu | ilwesu |
Linux | w | w | ilwesu |
|
|
|
|
|
|
|
|
|
|
|
| |
Qt is relying on whoever calls moc to include a file with the predefined
values that will be used by the compiler, otherwise moc takes wrong
paths and weird things happen.
Instead, generate an include file and feed it to all mocs to make sure
it's generating correct code.
Co-Author: Sebastian Holtermann <sebholt@xwmw.org>
Fixes: #16640
|
|\
| |
| |
| |
| |
| |
| | |
73934188 Rename CMAKE_GCC_{AR,RANLIB} to CMAKE_LANG_COMPILER_{AR,RANLIB}
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !656
|
| |
| |
| |
| |
| |
| | |
The variables recently added by commit b9d36826 (Add 'CMAKE_GCC_AR' and
'CMAKE_GCC_RANLIB' variables, 2017-03-08) are more appropriately managed
with language-specific names rather than toolchain-specific names.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
4af0c9da Features: Update features for Intel C++ 17.0.2 on UNIX
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !652
|
| |
| |
| |
| |
| |
| |
| | |
Intel 17.0.2 on UNIX introduced a regression from 17.0.1 in its
definition of `__cpp_constexpr` in `-std=c++14` mode. It incorrectly
defines it as `200704` instead of the expected `201304`. Fix our
feature detection table to account for this.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
dfa8263f Implement interprocedural optimization for GNU compilers
1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION
a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled,
e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com>
Merge-request: !568
|
| | |
| | |
| | |
| | |
| | | |
Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU
compilers by activating their link-time-optimization (LTO) flags.
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| | |
5695558f SDCC: Fix identification of current sdcc compiler
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !644
|
| |
| |
| |
| |
| |
| |
| |
| | |
The sdcc compiler no longer defines the `SDCC` preprocessor macro.
Instead `__SDCC_VERSION_MAJOR` and similar component-wise macros are
defined. Use them instead if defined.
Issue: #16746
|
| |
| |
| |
| |
| |
| |
| | |
The `cmake_policy(SET)` call triggers `CMP0011` warnings when this
module is used in a project that does not set `CMP0011` to NEW. We
could avoid these with a `cmake_policy` PUSH/POP pair, but it is simpler
to adjust our code to not trigger `CMP0054` in the first place.
|
| | |
|
|\ \
| |/
| |
| |
| |
| | |
55fb46d2 CUDA: Fix default compiler flags on Windows
d7c80f60 CUDA: Fix test cases to not override CUDA flags
|
| |
| |
| |
| |
| |
| |
| | |
Fix the default values of `CMAKE_CUDA_FLAGS[_<CONFIG>]` on Windows to
make the host compiler flags match those produced for C++ by the
`Platform/Windows-MSVC` module. This makes the flags consistent with
those used for C++.
|
|\ \
| |/
| |
| |
| | |
59ed323d CUDA: Do not use non-existent -Os flag for nvcc
|
| |
| |
| |
| |
| | |
Fix the CUDA MinSizeRel configuration flags to avoid using the `-Os`
flag that nvcc does not support.
|
|/
|
|
| |
https://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/C-Dialect-Options.html#C-Dialect-Options
|
|
|
|
| |
See https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Option-Summary.html
|
| |
|
|
|
|
|
| |
The Intel Compiler 15.0.0 on Windows does not support `-Qstd=c11`.
Bump our version requirement to 16 to use that flag.
|
|
|
|
|
|
|
| |
At least the scratchbox compiler for the N900, which basically is a gcc 4.2,
sets only __GNUG__ in C++ mode, but not __GNUC__. It does indeed set
__GNUC_MINOR__ and __GNUC_PATCHLEVEL__. Extend the compiler detection code for
GNU compilers in C++ mode to look at __GNUG__ in case __GNUC__ is absent.
|
| |
|
|
|
|
|
|
|
| |
Port Windows-specific compilation and linking rules over from the
`Platform/Windows-MSVC` module and adapt it for NVIDIA CUDA. On Windows
nvcc and its host compiler (MSVC) do not understand or use options like
`-fPIC` or `-std=`, so condition those out.
|
|
|
|
| |
Report it in `CMAKE_CUDA_SIMULATE_{ID,VERSION}`.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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`.
|
| |
|
| |
|
| |
|
|
|
|
| |
Issue: #16468
|
|
|
|
|
|
|
|
|
| |
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).
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
...
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| | |
d608e85c ARMCC: Fix flag used for response files
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ARMCC does not use the `@` sigil to indicate response files, but instead
the `--via=` flag. See the documentation here:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491h/CHDCIEGC.html
Fixes: #16425
|
|\ \
| | |
| | |
| | |
| | |
| | | |
5e428389 Features: Detect Intel C++14 mode more reliably
1f848031 Features: Suppress c_static_assert test coverage on Intel <= 15
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The `__cplusplus` macro is not defined to the language level reliably.
When simulating MSVC it is always set to `1`. When simulating GCC it is
set to the lower value of the current language level and the maximum
level supported by the simulated version of GCC (from observation).
For MSVC we already used a combination of `__INTEL_CXX11_MODE__` and
`__cpp_aggregate_nsdmi` to detect C++14 mode. Extend this for general
use by removing the condition on `_MSC_VER`.
|
|/ /
| |
| |
| |
| | |
The Intel 15 compiler for Windows does not support the same set of
standards and features as the same version for other platforms.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
9a8d758c Help: Document language standard meta-features
df252db1 Features: Test cycle diagnostic with language standard meta-feature
6d5fb0e0 Features: Test feature propagation with language standard meta-feature
a34b98a8 WCDH: Ignore language standard meta-features
b0996a3f Features: Add meta-features requesting awareness of a particular standard
8b6cc251 Features: Centralize per-compiler recording macros
2d23f7b2 Features: Do not record features on MSVC < 2010
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A common use case of `target_compile_features` is simply to specify that
the compiler should be run in a mode that is aware of e.g. C++11. Some
projects simply specify a particular C++11-only feature to request this.
Provide a first-class way to do this by naming features after the
corresponding language standard. Record them as always available in the
corresponding standard level so that requesting them always ensures that
standard (or higher) is used.
|
| | |
| | |
| | |
| | |
| | | |
Simplify and de-duplicate per-compiler feature recording macros and
convert to a centralized per-language macro.
|