Revert commit v3.4.0-rc1~10^2~2 (Features: Disable support for Oracle
SolarisStudio on non-Linux, 2015-09-29) and two follow-up commits.
The support of compile features and language standards on Orcale
SolarisStudio needs more investigation so for CMake 3.4 we should
just act as 3.3 did.
We do support SunPro 5.13 compiler features, but only on Linux.
Suppress the portion of the test that fails on Solaris until
the larger problem can be addressed.
This bug caused c_function_prototypes to not be recorded at configure
time when compiling with -std=gnu99 or similar. In the case of feature
recording, that was not a problem, because the logic in
CMakeDetermineCompileFeatures.cmake currently assumes that a feature
present for an earlier standard is present for a later standard.
However, the detection strings are also used in WriteCompilerDetectionHeader,
so the feature macro has been defined to '0' when using a later language
dialect.
Fix that by not checking the existence of the __STDC_VERSION__ macro at
all when detecting C90 features.
The CXX_STANDARD property validates the values allowed for it,
and '90' is not a valid value for it. However, the validation is only
done for languages enabled for the target, and as C_undefined has no
CXX files, that language is not enabled for it.
This amends commit v3.1.0-rc3~23^2 (WCDH: Make the header -Wundef
safe for the C language., 2014-11-24).
004e1540 Features: Record for GNU 4.4.
2a5ca650 Features: Wrap failure-test in UNIX condition.
1ae2c6b2 Features: Blacklist cxx_constexpr test for GNU 4.5.
c66e3317 Features: Use a more-common feature in cycle-test.
c43a6dc5 Features: Update comment in test to match the code.
78259135 Features: Test presence of cxx_auto_type with genex.
7b9fc88b Features: Remove outdated comment.
Revert commits:
2d738ce3 Help: Add notes for topic 'feature_record_msvc'
f73718c9 Features: Enable writing of MSVC compiler feature header.
64c30bdc Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
225c0ef8 Features: Record for MSVC 2010-2013.
This topic was merged to master prematurely, so remove it.
Notes:
VS2015 and above are the only MSVC versions to support cxx_final, so remove
usages from the tests, and instead only test for cxx_override.
VS2012 and above to conform to cxx_decltype_incomplete_return_types
proposal, but without support for auto return types the dcl.type.simple
example in the proposal doesn't compile.
VS2013 and above to conform to the updated cxx_contextual_conversions proposal,
but VS2010 and above pass the test.
Compilers such as MSVC have no explicit flags to enable C++11 mode,
it just is always on. So only run the link tests with compilers that require
a flag to specify the language version.
The __STDC_VERSION__ macro may be defined or not depending on the
implementation dialect of C. Test that it is defined before testing
its value.
The CXX tests do not need such a change because they define __cplusplus
in all dialects.
Extend the write_compiler_detection_header interface to allow
specifying a location for supplementary files, and getting the
list of resulting files as a variable.
Add properties and variables corresponding to CXX equivalents.
Add features for c_function_prototypes (C90), c_restrict (C99),
c_variadic_macros (C99) and c_static_assert (C11). This feature
set can be extended later.
Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader
to conditionally represent the c_restrict feature.
Provide a function to write a portable header to detect compiler
features. Generate a preprocessor #error for unknown compilers
and compiler versions whose features are not yet recorded. This
error condition might be relaxed in the future, but for now it
is useful for verification of expectations.