summaryrefslogtreecommitdiff
path: root/Modules/Compiler/GNU-CXX.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Project: Guess default standard dialect if compiler was forced (#15852)Brad King2015-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | Prior to commit v3.4.0-rc1~71^2 (Project: Determine default language dialect for the compiler, 2015-09-15) we always guessed the default language standard dialect based on the compiler version. This was not reliable so that commit switched to computing the default language standard dialect while detecting the compiler id. When a toolchain file uses CMakeForceCompiler to set the compiler id then the detection does not occur. Therefore commit v3.4.0-rc1~54^2 (Project: Don't require computed default dialect if compiler was forced, 2015-09-22) made the lack of detection an error only if the compiler was not forced. However, this means that projects using CMakeForceCompiler no longer even get the guess that we had before so <LANG>_COMPILER does not work. Due to the sophistication of CMake's compiler detection logic projects should be ported away from using CMakeForceCompiler. In the meantime, restore a guess of the default language standard dialect when the compiler is forced.
* Project: Don't require computed default dialect if compiler was forced.Stephen Kelly2015-09-221-3/+5
| | | | | | | | | | | | | | | | Commit 7235334a (Project: Determine default language dialect for the compiler., 2015-09-15) introduced a mechanism to determine the default dialect used for the running compiler. If conditions in the <CompilerId>-<Lang>.cmake file are such that compile features for that version of the compiler should be supported, the _DEFAULT_STANDARD is set to the computed value. However, the CMakeForceCompiler module allows users to bypass execution of the compiler by CMake. In that case, do not set the _DEFAULT_STANDARD variable at all, which effectively disables the compile-features where the module is used. No compile features have ever been recorded where the module is used so no functionality is lost.
* Project: Determine default language dialect for the compiler.Stephen Kelly2015-09-181-1/+4
| | | | | | Use the __cplusplus and __STDC_VERSION__ macros to automatically determine the default dialect for the compiler while determining its id and version.
* Record compile features for GNU on Windows (#15443)Brad King2015-03-171-2/+2
| | | | | | Drop the 'UNIX' condition on GNU compiler features. Suggested-by: David Demelier <demelier.david@gmail.com>
* Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.Stephen Kelly2015-02-041-1/+3
| | | | | | If no compiler feature information is known for a given compiler version, do not set a language standard default either. The two settings must be recorded consistently.
* Features: Record for GNU 4.4.Stephen Kelly2015-01-181-3/+3
|
* Features: Record for GNU 4.6.Stephen Kelly2015-01-161-1/+1
| | | | | Adjust the CompileFeatures genex_test for the expectation of the OVERRIDE_CONTROL feature group.
* Features: Record C/CXX dialect flags for GNU 4.6.Stephen Kelly2015-01-151-1/+4
| | | | This release was prior to standardization of C11/CXX11.
* Features: Ensure appropriate return value from feature test macros.Stephen Kelly2015-01-151-2/+0
| | | | | | | GNU-CXX already has complex logic and sets the _result to 0 before tests which may set it to something else. Change the other modules to be consistent with that.
* Record compile features for GNU on Apple.Stephen Kelly2015-01-111-2/+2
| | | | | Tested with GNU 4.8 binary (bottle) from homebrew, and assumed to work with the others.
* Merge topic 'fix-GNU-CXX-dialect-versions'Brad King2014-11-251-4/+3
|\ | | | | | | | | c03c184b Features: Record C++11 dialect switch only for GNU 4.7 and later.
| * Features: Record C++11 dialect switch only for GNU 4.7 and later.Stephen Kelly2014-11-191-4/+3
| | | | | | | | | | Previous versions of GNU are not currently supported by this CMake feature.
* | Features: Run GNU feature tests with std=c++14 when available.Stephen Kelly2014-11-121-1/+4
| |
* | Features: Use the correct dialect flag when recording features.Stephen Kelly2014-11-121-4/+4
|/ | | | | Avoid using -std=c++1y for compilers which support -std=c++14, for example.
* Features: Add support for C++14 features.Stephen Kelly2014-05-221-1/+12
| | | | Record the features implemented by GNU 4.9 and Clang 3.4.
* Merge topic 'GNU-4.7-features'Brad King2014-05-081-1/+1
|\ | | | | | | | | 9cbc63e4 Features: Record for GNU 4.7.
| * Features: Record for GNU 4.7.Stephen Kelly2014-05-071-1/+1
| | | | | | | | | | Update the CompileFeatures test to verify that unsupported features do not work.
* | Features: Decay language flag if requested is not available.Stephen Kelly2014-05-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the highest standard compile flags available if requested language version is too new. This supports use-cases like set(CMAKE_CXX_STANDARD 14) # Compiled with -std=c++11 with GNU 4.7, which has no -std=c++14 # or equivalent flag add_executable(main main.cpp) This can be used in combination with preprocessor defines which communicate the availability of certain language features for optional use.
* | Project: Fix exit-on-error with compile feature tests.Stephen Kelly2014-05-071-4/+3
|/
* Features: Add cxx_template_template_parameters.Stephen Kelly2014-04-161-0/+4
| | | | | Extend the existing feature infrastructure as needed to support both C++11 and C++98 features.
* Features: Add cxx_auto_type.Stephen Kelly2014-04-071-0/+12
| | | | | | | | | | | | | | Record the availability of this feature for GNU 4.8 on (UNIX AND NOT APPLE) only. In the future, availability can be recorded for earlier GNU, for other platforms and for other compilers. Initially the affected configurations are as restricted as possible to allow for easy testing while extending the features vector in only one dimension. The error message when using the set_property API directly is not very good, but follow up commits will provide origin debugging of the property and a target_compile_features command which will provide a configure-time backtrace when possible.
* Add some COMPILE_OPTIONS for specifying C++ dialect.Stephen Kelly2014-04-071-0/+13
| | | | | These are compiler-specific, compiler version specific, extension specific and standard version specific.
* Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.Stephen Kelly2013-06-021-0/+10
| | | | | | | This corresponds to the g++ and clang++ option -fvisibility-inlines-hidden on linux. On Windows with MinGW, this corresponds to -fno-keep-inline-dllexport. That option is not supported by clang currently.
* Split GNU compiler information filesBrad King2009-12-021-1/+2
| | | | | | | | | | | | | | This moves GNU compiler flags into new-style modules Compiler/GNU-<lang>.cmake Platform/<os>-GNU-<lang>.cmake We use language-independent helper modules Compiler/GNU.cmake Platform/<os>-GNU.cmake to define macros consolidating the information.
* ENH: Implicit link info for C, CXX, and FortranBrad King2009-07-231-0/+1
This teaches CMake to detect implicit link information for C, C++, and Fortran compilers. We detect the implicit linker search directories and implicit linker options for UNIX-like environments using verbose output from compiler front-ends. We store results in new variables called CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES The implicit libraries can contain linker flags as well as library names.