summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
Commit message (Collapse)AuthorAgeFilesLines
* TinyCC: Add compiler info for shared libs on Linux (#12605)Brad King2011-12-021-0/+1
| | | | | | Use the "-shared" option to link shared libraries. The compiler does not support "-Wl," or "-rpath" but does know how to pass "-soname" through to the linker.
* Merge topic 'fortran-format'David Cole2011-09-0712-0/+27
|\ | | | | | | | | | | | | | | 90efed6 Xcode: Honor Fortran_FORMAT target and source file property 5c0c635 Fortran: Add support for free- and fixed-form flags 47a0c75 VS: Map Fortran free- and fixed-format flags to IDE options d6e2a06 VS: Map per-source Fortran flags to IDE options
| * Fortran: Add support for free- and fixed-form flagsBrad King2011-08-3112-0/+27
| | | | | | | | | | | | | | Define a "Fortran_FORMAT" target and source file property. Initialize the target property from a "CMAKE_Fortran_FORMAT" variable. Interpret values "FIXED" and "FREE" to indicate the source file format. Append corresponding flags to the compiler command line.
* | Fix XL compilers on non-AIX machines.Todd Gamblin2011-08-291-10/+15
|/ | | | | | Linking broken on non-AIX machines when using XL compilers due to those machines not using the CreateExportList tool. Made use of this tool conditional on finding it.
* GNU: Fix CMAKE_INCLUDE_SYSTEM_FLAG_<lang> value (#12258)Brad King2011-06-131-1/+1
| | | | | | | | Fix typo introduced by commit e28c16b4 (Split GNU compiler information files, 2009-12-02). Reported-by: Campbell Barton <ideasman42@gmail.com> Suggested-by: Michael Hertling <mhertling@online.de>
* XL: Place Fortran modules with -qmoddir= flag (#12246)Brad King2011-06-011-0/+2
| | | | Suggested-by: Luis Kornblueh <luis.kornblueh@zmaw.de>
* Merge topic 'absoft-fortran-compiler'Brad King2011-05-241-0/+8
|\ | | | | | | | | | | | | 8bd3e51 Absoft: Enable FortranCInterface check in Fortran test d7b376b Absoft: Detect implicit link libraries on Linux and Mac ac5b999 Add Absoft Fortran compiler id and basic flags
| * Add Absoft Fortran compiler id and basic flagsBrad King2011-05-201-0/+8
| | | | | | | | | | Identification at preprocessing time depends on definition of __ABSOFT__ to be added in service pack V11.1.2 of the compiler.
* | XL: Avoid copying archives into shared libraries that link themBrad King2011-04-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XL toolchain supports shared object files stored in archives. Since CMake lists libraries on link lines by full path it is common for a shared library link line to contain the path to an archive file. When linking a shared library the compiler front-end by default runs CreateExportList to construct the list of symbols to be exported. Unfortunately it passes all files found on the command line to the tool so archive and library files get processed along with the object files. The tool returns a list of all symbols in all objects, archives, and libraries on the command line. This causes the linker to copy every object file out of every archive into the shared library whether they are dependencies of the original object files or not. Work around this problem by running CreateExportList ourselves with just the original object files intended for inclusion in the shared library. Then pass the list it produces on the link line to prevent the compiler front-end from constructing its own. This tells the linker to export only the symbols provided by the original source files of the shared library.
* | XL: Consolidate compiler flag informationBrad King2011-04-074-23/+44
| | | | | | | | | | | | Factor duplicate information out of Compiler/XL-<lang>.cmake modules into a macro in a new Compiler/XL.cmake module. Invoke it from the per-language files to produce the original settings.
* | XL: Set C++ and Fortran flags consistently with CBrad King2011-04-072-0/+8
| | | | | | | | | | | | Since commit e1729238 (Add initial XL C compiler flags for safer builds, 2009-09-30) CMake sets the initial XL C flags to include "-qthreaded" and "-qhalt=e". Do the same for C++ and Fortran with this toolchain.
* | Add support for the Intel compiler used for ASM under WindowsAlex Neundorf2011-03-021-1/+5
| | | | | | | | Alex
* | Add assemble- and preprocess commands for HPAlex Neundorf2011-02-232-3/+6
| | | | | | | | | | | | Also restore HP-C.cmake, I had accidentially overwritten it with HP-ASM.cmake Alex
* | Fix the default CMAKE_ASM_COMPILE_OBJECT, make XL-ASM use itAlex Neundorf2011-02-231-2/+0
| | | | | | | | Alex
* | Change the default rules so they fit better to the new ASM handlingAlex Neundorf2011-02-233-6/+0
| | | | | | | | | | | | | | | | CMAKE_ASM_COMPILE_OBJECT is now so that it fits for GNU, Intel, HP and Sun ASM_ATT had to be adjusted. Also adjusted the default CMAKE_ASM_LINK_EXECUTABLE Alex
* | Set the HP asm file suffixAlex Neundorf2011-02-231-0/+2
| | | | | | | | Alex
* | Add support for ASm for the HP compiler.Alex Neundorf2011-02-232-1/+5
| | | | | | | | Alex
* | Add suport for ASM for the IBM XL compilerAlex Neundorf2011-02-231-0/+15
| | | | | | | | Alex
* | Add support for ASM for the SunPro compilerAlex Neundorf2011-02-231-0/+26
| | | | | | | | Alex
* | Actually use CMAKE_ASM_COMPILER for asm, instead of CMAKE_C_COMPILERAlex Neundorf2011-02-231-1/+1
| | | | | | | | Alex
* | Add ASM support for the Intel compilerAlex Neundorf2011-02-232-1/+12
| | | | | | | | Alex
* | Rework the way assembler is handled, use the C/CXX compiler by defaultAlex Neundorf2011-01-301-0/+8
|/ | | | | | | | | | | | | | | This commit changes the way how the assembler support works in cmake. The language "ASM" now always uses the C/Cxx compiler instead of the assembler directly. This fixes #8392, assembler files are not preprocessed. If one wants to use the assembler directly, the specific assembler "dialect" has to be enabled. I.e. to get as/gas, you have to use now ASM-ATT, the same way for ASM_MASM and ASM_NASM. Implemented this now for gcc. SunStudio, IBM, HP and Intel still todo. Alex
* Factor SCO compiler info out of platform file (#11700)Brad King2011-01-173-0/+29
| | | | | Move these flags out of the SCO_SV platform file so that other compilers may be used on that platform without interference.
* Merge topic 'NAG-Fortran'Brad King2010-12-161-0/+32
|\ | | | | | | | | | | | | | | | | 09d1c10 FortranCInterface: Recognize NAG Fortran module symbols af2ad90 Add NAG Fortran compiler information files 24cc3d4 Recognize the NAG Fortran compiler 83892c4 Allow Fortran platform files to set empty values fe3f878 Detect object files in implicit link information
| * Add NAG Fortran compiler information filesBrad King2010-12-091-0/+32
| | | | | | | | | | | | | | | | | | On Linux the NAG Fortran compiler uses gcc under the hood to link. Use "-Wl,-v" to pass "-v" to the underlying gcc compiler to get verbose link output. Detect the NAG Fortran directory (using -dryrun) and then honor object files in the directory referenced in the implicit link line. Pass real linker options with "-Wl,-Xlinker,". The -Wl, gets through the NAG front-end and the -Xlinker gets through the gcc front-end.
* | Teach CMake about Cray C, C++, and Fortran compilersBrad King2010-11-123-0/+6
|/ | | | | | The Cray Fortran compiler needs "-em" to enable module output and also "-J." to place the .mod files in the current working directory (instead of next to the .o file).
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-093-3/+3
|
* Recognize Clang C and C++ compilers (see #10693)Brad King2010-05-172-0/+2
| | | | | | | Map to the platform and compiler information for GNU because the compilers are command-line compatible for common operations. Later we can add Clang-specific features as necessary. We honor the preferred capitalization is "Clang", not the common mis-spelling "CLang".
* Make VERBOSE_FLAG appear as first statement for consistencyKovarththanan Rajaratnam2010-04-174-5/+7
|
* PathScale C/C++/Fortran Compiler InformationBrad King2010-01-134-0/+43
| | | | | | | | | | We add compiler information files Compiler/PathScale-<lang>.cmake to specify PathScale compiler information for C, C++, and Fortran languages. We use a macro in Compiler/PathScale.cmake to consolidate the information common to all languages.
* Generalize support for Portland Group CompilerBrad King2009-12-044-3/+55
| | | | | | | | | | | | | | | We factor flags from Platform/Linux-PGI-Fortran.cmake into language independent helper modules Compiler/PGI.cmake Platform/Linux-PGI.cmake and invoke the macros from Compiler/PGI-<lang>.cmake Platform/Linux-PGI-<lang>.cmake This enables general support for the PGI compilers.
* Split GNU compiler information filesBrad King2009-12-024-3/+56
| | | | | | | | | | | | | | 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.
* Drop -rdynamic from Linux build rulesBrad King2009-12-013-3/+0
| | | | | | | | | | | | | | | This is a GNU-specific option that should not be specified for all compilers on Linux. It tells the GNU compiler to pass -export-dynamic to the linker to export symbols from executables for use by plugins. Since we provide the ENABLE_EXPORTS target property to do the same thing in a cross-platform way, there is no need to pass -rdynamic always. Since the option is not useful for GNU tools and breaks other tools on Linux we simply remove it from CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS. This also allows us to stop setting the variable in other Linux compiler files just to erase the bad flag. See issue #9985.
* Add support for the g95 Fortran compilerBrad King2009-10-231-0/+7
| | | | | | | | | | This commit teaches CMake about the g95 compiler from http://www.g95.org We use 'G95' as the compiler id string, and add some basic flags. See issue #9241.
* Add initial XL C compiler flags for safer buildsBrad King2009-09-301-0/+5
| | | | | | | This commit adds some default initial C flags for the XL compiler. The most important is "-qhalt=e" which causes the compiler to error-out on non-severe error messages. This is necessary to get try-compiles to fail when bad arguments are passed to a function.
* Split XL compiler information filesBrad King2009-09-303-0/+24
| | | | | | This moves platform-independent XL compiler flags into separate "Compiler/XL-<lang>.cmake" modules. Platform-specific flags go in "Platform/<os>-XL-<lang>.cmake" modules.
* The preprocessing and assembly rules also need the <DEFINES>, otherwise ↵Alexander Neundorf2009-09-192-4/+4
| | | | | | different reults are created. Alex
* Use Intel for Linux flags only on LinuxBrad King2009-09-014-39/+0
| | | | | | The commit "Split Intel compiler information files" moved some Linux specific flags into the platform-independent Intel compiler info files. This moves them back.
* Split SunPro compiler information filesBrad King2009-08-213-0/+71
| | | | | | This moves platform-independent SunPro compiler flags into separate "Compiler/SunPro-<lang>.cmake" modules. Platform-specific flags are left untouched.
* Split Intel compiler information filesBrad King2009-08-214-0/+63
| | | | | | This moves platform-independent Intel compiler flags into separate "Compiler/Intel-<lang>.cmake" modules. Platform-specific flags are left untouched.
* Teach compiler id about VisualAge -> XL rebrandingBrad King2009-08-076-4/+7
| | | | | | | IBM rebranded its VisualAge compiler to XL starting at version 8.0. We use the compiler id "XL" for newer versions and "VisualAge" for older versions. We now also recognize the "z/OS" compiler, which is distinct from XL.
* Move flag to Compiler/VisualAge-Fortran moduleBrad King2009-08-071-0/+1
| | | | | | The CMAKE_Fortran_DEFINE_FLAG value applies to the IBM Fortran compilers on all platforms. This moves the setting to the platform-independent compiler information file.
* Set CMAKE_<LANG>_VERBOSE_FLAG variables for PGIBrad King2009-07-293-0/+3
| | | | | | We set the variables to contain "-v", the verbose front-end output option for PGI compilers. This enables detection of implicit link libraries and directories for these compilers.
* Set CMAKE_<LANG>_VERBOSE_FLAG variables for IntelBrad King2009-07-293-0/+3
| | | | | | We set the variables to contain "-v", the verbose front-end output option for Intel compilers. This enables detection of implicit link libraries and directories for these compilers.
* ENH: Implicit link info for C, CXX, and FortranBrad King2009-07-2315-0/+15
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.