summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* Oracle/Sun: Fix Fortran preprocessor rule generationBrad King2014-12-231-1/+1
| | | | | | | | | The SunPro Fortran compiler uses "-F" instead of "-E" to request preprocessing. The output does not go to stdout so use "-o" to specify the output file. This fixes the guess originally made by commit b6b37e30 (Makefile: Add assembly and preprocessed targets for Fortran, 2014-11-05).
* Features: Record for AppleClang 5.1Stephen Kelly2014-12-224-0/+104
| | | | | Apple's Clang 5.1 already supports most of the C and C++ features CMake enumerates.
* Merge topic 'C-features-Wundef'Brad King2014-11-262-4/+4
|\ | | | | | | | | d0af0fae WCDH: Make the header -Wundef safe for the C language.
| * WCDH: Make the header -Wundef safe for the C language.Stephen Kelly2014-11-252-4/+4
| | | | | | | | | | | | | | | | | | 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.
* | 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.
* | Merge branch 'default-lang-dialect' into step2Stephen Kelly2014-11-202-5/+12
|\ \ | | | | | | | | | | | | Conflicts: Modules/Compiler/Clang-C.cmake
| * | Features: Fix the default C dialect for Clang and GNU.Stephen Kelly2014-11-202-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang 3.4 uses C99 by default, and Clang 3.6 uses C11 by default: http://thread.gmane.org/gmane.comp.compilers.clang.devel/39379 GNU 4.9 uses C90 by default, and GNU 5.0 uses C11 by default: https://gcc.gnu.org/gcc-5/changes.html Test that the default compiler settings result in the expected dialect macros being defined for both C and CXX. Remove the unused main.c file from the CompileFeatures unit test.
| * | Features: Fix references to CXX compiler version in Clang-C.cmake.Stephen Kelly2014-11-181-2/+2
| |/
* | Avoid if() quoted auto-dereference when checking for "MSVC"Fraser Hutchison2014-11-193-4/+4
| | | | | | | | | | When testing CMAKE_<LANG>_COMPILER_ID values against "MSVC", do not allow the definition of the "MSVC" variable to be expanded.
* | Merge topic 'no-AppleClang-C-features'Brad King2014-11-131-1/+2
|\ \ | |/ | | | | | | ded30405 Features: Don't record for AppleClang
| * Features: Don't record for AppleClangStephen Kelly2014-11-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Features are currently recorded accidentally for all versions of AppleClang > 3.4 (I have no idea how that relates to upstream Clang). Presumably that version has the features which are accidentally recorded, but in the future features will be recorded initially for only AppleClang >= 5.1, which would appear as a feature regression. Commit v3.1.0-rc1~635^2~11 (Don't load Clang-CXX from AppleClang-CXX., 2013-11-11) ajusted the logic for the CXX language. Make a similar change for the C language.
* | 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-124-16/+16
| | | | | | | | | | Avoid using -std=c++1y for compilers which support -std=c++14, for example.
* | Features: Reorder the GNU C dialect feature testsStephen Kelly2014-11-121-2/+2
| | | | | | | | | | This doesn't make a difference, but the consistency with other files is easier to reason about.
* | Features: Split the Clang testable features to a separate file.Stephen Kelly2014-11-112-53/+55
| | | | | | | | These tests can be shared with the AppleClang compile feature tests.
* | Makefile: Add assembly and preprocessed targets for FortranTim Gallagher2014-11-106-11/+10
|/ | | | Extend the FortranOnly test to cover "make <src>.i" targets.
* Clang: Enable c++14 dialect flag with Clang 3.5.Stephen Kelly2014-09-171-1/+4
|
* Clang: Don't overwrite c++11 compile option value with c++14 flag.Stephen Kelly2014-09-171-2/+2
|
* Add Fujitsu compiler detectionErik Lindahl2014-08-111-0/+2
| | | | | | The Fujitsu C/C++ compilers are the default ones for K computer. Detect both native and cross compilers by looking for the __FUJITSU preprocessor definition.
* Merge topic 'fix-QCC-compile-flags'Brad King2014-07-213-0/+38
|\ | | | | | | | | 3151024d QNX: Add missing flags for configurations and artifact creation.
| * QNX: Add missing flags for configurations and artifact creation.Stephen Kelly2014-07-173-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit v3.0.0-rc1~111^2 (QNX: Introduce QCC compiler id for that QNX platform compiler., 2014-01-20) split handling of the QNX QCC compiler into a separate compiler-id. That refactoring results in the QCC compiler not using the CMake-compiler-id "GNU", which means that the __compiler_gnu macro is no longer executed for it. Add Compiler/QCC*.cmake modules to define and call the __compiler_qcc macro and teach it to call __compiler_gnu internally. Remove the corresponding pieces from the Platform/QNX*.cmake modules. It is also necessary to change the language conditional to dereference the lang macro parameter, which is another bug introduced by the same commit. The extra -lang-c++ flag is only necessary when the CXX compiler is specified as 'qcc' instead of 'QCC' in the toolchain file, which is why this bug was not noticed before. The flag is also necessary in that case when linking in order to find the appropriate standard libraries. The flag was not previously added when linking executables, so linking failed even with CMake 2.8.12 with the lower-case compiler-id. Co-Author: Brad King <brad.king@kitware.com>
* | Project: Add configurable name for version computation macros.Stephen Kelly2014-06-0525-87/+87
| |
* | Project: Separate simulated compiler id from version detection.Stephen Kelly2014-06-052-2/+10
| |
* | Features: Add support for C++14 features.Stephen Kelly2014-05-223-1/+49
| | | | | | | | Record the features implemented by GNU 4.9 and Clang 3.4.
* | Features: Record for Clang 3.4Stephen Kelly2014-05-204-1/+142
| | | | | | | | Clang 3.4 supports all features currently known to CMake.
* | Merge topic 'compile-features-C-language'Brad King2014-05-202-0/+44
|\ \ | | | | | | | | | | | | e0890d03 Features: Extend concept to C language.
| * | Features: Extend concept to C language.Stephen Kelly2014-05-142-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Features: Only require AppleClang policy to be NEW on APPLE.Stephen Kelly2014-05-141-1/+1
|/ /
* | Merge topic 'features-gnu-oldest-supported'Brad King2014-05-121-10/+9
|\ \ | | | | | | | | | | | | f782417b Features: Record the oldest supported compiler.
| * | Features: Record the oldest supported compiler.Stephen Kelly2014-05-081-10/+9
| | | | | | | | | | | | | | | This may be used to ensure that features are reported correctly only if the compiler minimum version is met.
* | | Features: Fix GNU 4.8.1 version test.Stephen Kelly2014-05-101-1/+1
| | |
* | | Tests: Make CompileFeature tests use highest standard known.Stephen Kelly2014-05-091-0/+2
|/ / | | | | | | | | | | | | | | Remove the use of check_cxx_source_compiles which is now just getting in the way. Blacklist the cxx_alignof feature in the test with GNU 4.7. The test file compiles, but it is documented as available first in GNU 4.8.
* | Merge topic 'GNU-4.7-features'Brad King2014-05-082-4/+3
|\ \ | | | | | | | | | | | | 9cbc63e4 Features: Record for GNU 4.7.
| * | Features: Record for GNU 4.7.Stephen Kelly2014-05-072-4/+3
| | | | | | | | | | | | | | | Update the CompileFeatures test to verify that unsupported features do not work.
* | | Merge topic 'minor-cleanups'Brad King2014-05-081-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 47795421 Fix whitespace in docs. aa283b6b Features: Fix test for GNU 4.8.1. bbfd4cd4 Features: Include the language of the compiler in error messages.
| * | | Features: Fix test for GNU 4.8.1.Stephen Kelly2014-05-071-1/+1
| | | |
* | | | Merge topic 'hp-cpp98-tests'Brad King2014-05-081-0/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | b0f277db HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards
| * | | | HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwardsRolf Eike Beer2014-04-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old versions of aCC need a special compiler flag to get full C++98 template support as e.g. CMake itself or the Complex and ComplexOneConfig tests need. The same versions need a special flag to get a proper C++ library, too.
* | | | | Merge topic 'decay-language-version'Brad King2014-05-081-4/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 205215fb cmTarget: Add CXX_STANDARD_REQUIRED to control decay. 1df2116b Features: Decay language flag if requested is not available. c4f4dac2 Project: Fix exit-on-error with compile feature tests. 5bb7ce72 Project: Use nullary form of main for compile feature tests. 64254e7a Project: Remove extern from static string in feature tests. 0d9c99bf Help: Fix order of help entries. dc7639bd Tests: Fix name of cache variable.
| * | | | | 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
| | |/ / | |/| |
* | | | Project: Refactor C compiler determination into multiple files.Stephen Kelly2014-05-079-0/+61
| | | |
* | | | CompilerId: Allow specifying a prefix for preprocessor defines.Stephen Kelly2014-05-0720-71/+71
| | | |
* | | | Project: Generate the CXX compiler Id test from multiple files.Stephen Kelly2014-05-0726-0/+225
|/ / / | | | | | | | | | | | | | | | This will allow sharing of the logic of the order to test compilers in and the preprocessor macros used to do that and to determine the version components.
* | | Features: Add cxx_template_template_parameters.Stephen Kelly2014-04-162-0/+5
|/ / | | | | | | | | Extend the existing feature infrastructure as needed to support both C++11 and C++98 features.
* | Features: Add cxx_defaulted_move_initializers.Stephen Kelly2014-04-081-0/+1
| |
* | Features: Add cxx_long_long_type.Stephen Kelly2014-04-081-0/+1
| |
* | Features: Add cxx_func_identifier.Stephen Kelly2014-04-081-0/+1
| |
* | Features: Add cxx_local_type_template_args.Stephen Kelly2014-04-081-0/+1
| |