summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* Replace http://www.cmake.org URLs with https://cmake.orgBrad King2015-09-251-2/+2
| | | | | | | The latter is now the preferred URL for visiting cmake.org with a browser. Convert using the shell code: git ls-files -z | xargs -0 sed -i 's|http://www\.cmake|https://cmake|g'
* Project: Don't require computed default dialect if compiler was forced.Stephen Kelly2015-09-227-21/+35
| | | | | | | | | | | | | | | | 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-187-15/+34
| | | | | | 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 C on Windows (#15727)Brad King2015-09-091-2/+2
| | | | Drop the 'UNIX' condition on GNU C compiler features.
* GNU-DetermineCompiler: Add support for very old versions of GCCKars de Jong2015-08-131-1/+3
| | | | | | Very old versions of gcc (2.3.1) do not define __GNUC_MINOR__. Signed-off-by: Kars de Jong <kars.dejong@locamation.nl>
* Cray: Fix compiler version detection (#15664)Justin Cook2015-07-301-1/+1
|
* Merge topic 'vs-compiler-feature-2015-update'Brad King2015-07-221-5/+5
|\ | | | | | | | | c2d590c9 Features: Update MSVC features for VS 2015 RTM
| * Features: Update MSVC features for VS 2015 RTMBrad King2015-07-211-5/+5
| | | | | | | | | | VS 2015 RTM completed support for constexpr and attribute features. Update our feature table and test accordingly.
* | Factor an <INCLUDES> placeholder out of <FLAGS> in rule variablesBrad King2015-07-1320-40/+40
| | | | | | | | | | | | | | | | | | | | | | Teach the Makefile and Ninja generators to substitute for an <INCLUDES> placeholder instead of putting -I in <FLAGS>. Update our values for CMAKE_<LANG>_COMPILE_OBJECT, CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE to place <INCLUDES> just before <FLAGS>.
* | AppleClang: Use modern C++14 standard flags for Apple Clang 6.1Brad King2015-07-091-1/+4
| | | | | | | | | | | | | | | | The Apple Clang 6.1 compiler that comes with Xcode 6.3 is aware of the modern -std=c++14 and -std=gnu++14 flags, so use them instead of the "1y" flags. Suggested-by: darkapostle@rule506.net
* | XL: Drop -qalias=noansi from default C flagsBrad King2015-07-022-4/+2
| | | | | | | | | | | | | | | | | | This was added without explanation by commit v2.8.2~1138 (Add initial XL C compiler flags for safer builds, 2009-09-30). It is not consistent with our default C++ flags for XL and disables several optimizations, so drop it from our default flags for C. Suggested-by: Todd Gamblin <tgamblin@llnl.gov>
* | Add support for Concurrent Fortran 77 CompilerBrad King2015-06-181-0/+1
|/ | | | | | | | | The Concurrent Fortran compiler (ccur.com) is available on Linux and can be used much like the GNU Fortran compiler. Currently it has no preprocessor symbols to identify it so we need to detect it by matching compiler output. Suggested-by: Anthony Ette <Anthony.R.Ette@controlsdata.com>
* Add a 'Green Hills MULTI' generator on WindowsGeoff Viola2015-04-203-0/+64
| | | | | | | | | | | | Green Hills MULTI is an IDE for embedded real-time systems. The IDE's product page can be found here: http://www.ghs.com/products/MULTI_IDE.html It supports cross compiling on ARM, Intel x86, and other architectures with various operating systems. The IDE exists on Linux and Windows host systems, but CMake will currently only generate the project files on Windows host systems.
* Features: VS 2013 Update 3 supports initializer lists (#15494)Brad King2015-04-061-6/+11
| | | | | | | | | | | VS 2013 originally claimed to support initializer lists but a bug was found in which it generated bad code silently. For this reason we previously considered support to not be present. However, Update 3 adds a hard error on cases that previously generated bad code, so it is now safe to use initializer lists with VS 2013 Update 3 or greater. At worst a compiler error will be issued in the cases that do not work, but that is no different from any other compiler-specific workaround a project code may need.
* GNU: Do not use -isystem with gfortranBrad King2015-03-261-0/+3
| | | | | | | The compiler documents that USE statements search for ".mod" files in directories specified with -I, but not -isystem. Reported-by: Hugh Sorby <h.sorby@auckland.ac.nz>
* SunPro: Drop non-existent -KPIE flagSteven Vancoillie2015-03-232-2/+0
|
* SunPro: Add position independent code flag for Fortran compilerSteven Vancoillie2015-03-201-0/+1
|
* 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>
* Merge topic 'fix-C-standard-features'Brad King2015-02-0510-13/+26
|\ | | | | | | | | | | | | | | | | fb3487a9 Features: Fix C90 feature detection. 6027798a Features: Allow setting standard dialect below the default. 9d767810 Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers. 72537e44 Features: Add dialect compile flags only if default is known. 82c9d686 AppleClang: Remove redundant UNIX condition.
| * Features: Fix C90 feature detection.Stephen Kelly2015-02-043-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.Stephen Kelly2015-02-047-8/+21
| | | | | | | | | | | | 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.
| * AppleClang: Remove redundant UNIX condition.Stephen Kelly2015-02-042-2/+2
| |
* | Features: Update GNU 5.0 C++14 features.Stephen Kelly2015-01-311-0/+2
|/ | | | | Trunk already has these features and they are listed in the status page. Also confirmed manually by running trunk.
* Features: Record for MSVC 2010-2015Robert Maynard2015-01-302-0/+112
| | | | | | | Also, in WCDH add MSVC Compatibility for cxx_align{of,as}. Co-Author: Stephen Kelly <steveire@gmail.com> Co-Author: Brad King <brad.king@kitware.com>
* Merge topic 'GNU-4.4-compile-features'Brad King2015-01-221-3/+10
|\ | | | | | | | | | | | | 965a50dc Features: Fix GNU 4.4 and 4.5 C standard level flags 7f4154a4 Features: Fix CompileFeatures non-feature tests for space in path f40c19b5 Features: Fix CompileFeatures test for C non-features
| * Features: Fix GNU 4.4 and 4.5 C standard level flagsBrad King2015-01-211-3/+10
| | | | | | | | | | The C90 flags were only the "89" versions until GNU 4.5. The C11 flags were not introduced until GNU 4.6.
* | Merge topic 'GNU-4.4-compile-features'Brad King2015-01-194-14/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | 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.
| * Features: Record for GNU 4.4.Stephen Kelly2015-01-184-13/+11
| |
| * Features: Remove outdated comment.Stephen Kelly2015-01-171-1/+0
| |
* | Features: Record for SolarisStudio 12.4.Stephen Kelly2015-01-172-0/+73
|/ | | | It has similar C++11 capabilities compared to GCC 4.8.
* Features: Record for GNU 4.6.Stephen Kelly2015-01-154-6/+6
| | | | | Adjust the CompileFeatures genex_test for the expectation of the OVERRIDE_CONTROL feature group.
* Features: Test __GXX_EXPERIMENTAL_CXX0X__ macro for GNU < 4.7 compatibility.Stephen Kelly2015-01-151-7/+12
|
* Features: Don't test __cplusplus value for CXX98 on GNU.Stephen Kelly2015-01-151-1/+1
| | | | | | | | The macro is defined to 1 for GNU 4.6, and such a test is only useful for features in language dialects newer than the default (CXX98 for GNU currently). Test only that it has a truthy value.
* Features: Test an old value of __STDC_VERSION__ for GNU < 4.7 compatibility.Stephen Kelly2015-01-151-1/+6
|
* Features: Record C/CXX dialect flags for GNU 4.6.Stephen Kelly2015-01-152-2/+10
| | | | This release was prior to standardization of C11/CXX11.
* Features: Remove wrong content from else() condition.Stephen Kelly2015-01-151-1/+1
| | | | | | | | | | | | As this is not elseif(), the content has no effect. Rather than changing it to an elseif(), remove the conditional content. All versions of GNU prior to 5.0 default to C90/89. Clang-C.cmake has a similar code block which correctly uses elseif() for setting the default C dialect to C99. That may have been updated from a C90 default at some point, so leave the version condition there in place for now.
* Features: Make cxx_noexcept available from GNU 4.6.Stephen Kelly2015-01-151-1/+1
| | | | As listed in the reference document.
* Features: Ensure appropriate return value from feature test macros.Stephen Kelly2015-01-156-12/+5
| | | | | | | 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.
* Merge topic 'Xcode-clang-compile-features'Brad King2015-01-154-17/+44
|\ | | | | | | | | | | | | dcd72a74 Help: Add notes for topic 'Xcode-clang-compile-features' 3ad893b5 Features: Record for historical Xcode clang versions. 98965fb1 Features: Record dialect flags for AppleClang 4.0+.
| * Features: Record for historical Xcode clang versions.Stephen Kelly2015-01-114-15/+39
| |
| * Features: Record dialect flags for AppleClang 4.0+.Stephen Kelly2015-01-112-2/+5
| |
* | Merge topic 'revert-feature_record_msvc'Brad King2015-01-152-120/+0
|\ \ | | | | | | | | | | | | | | | 4ce110bb Tests: Revert workaround for COMPILE_FEATURES genex bug 0b7e7e27 Revert topic 'feature_record_msvc'
| * | Revert topic 'feature_record_msvc'Brad King2015-01-142-120/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Record compile features for GNU on Apple.Stephen Kelly2015-01-112-3/+3
| | | | | | | | | | | | | | | Tested with GNU 4.8 binary (bottle) from homebrew, and assumed to work with the others.
* | | Merge topic 'feature_record_msvc'Brad King2015-01-112-0/+120
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | 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.
| * | Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.Robert Maynard2015-01-112-16/+71
| | | | | | | | | | | | | | | | | | Initializer lists are only properly supported in 2015 and above. Previous Visual Studio releases said they supported initializer lists but silently produced bad code.
| * | Features: Record for MSVC 2010-2013.Stephen Kelly2015-01-111-0/+65
| |/
* | Features: Record cxx_variable_templates for GNU 5.0.Stephen Kelly2015-01-011-0/+7
|/
* 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.