summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* Teach find_library and find_package to search lib32 paths (#11260)Daniel Scharrer2016-06-103-2/+5
| | | | | | | Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the ``FIND_LIBRARY_USE_LIB64_PATHS`` property. This helps find commands on multilib systems that use ``lib32`` directories and either do not have ``lib`` symlinks or point ``lib`` to ``lib64``.
* Merge topic 'SunOS-PathScale'Brad King2016-06-074-0/+37
|\ | | | | | | | | fcfe121f Platform: add flag definitions for PathScale compiler on SunOS (#16135)
| * Platform: add flag definitions for PathScale compiler on SunOS (#16135)Michał Górny2016-06-064-0/+37
| |
* | Modules: Rename internal platform-specific compiler determination modulesBrad King2016-06-024-0/+0
|/ | | | | | | Rename Modules/Platform/<os>-<lang>.cmake files to Modules/Platform/<os>-Determine-<lang>.cmake to clarify their role. For compatibility with user-provided modules, load the old names if they exist.
* OS X: Drop warning about SDK and deployment target version mismatchBrad King2016-05-261-10/+0
| | | | | | | | | OS X supports using the SDK for any version equal to or newer than the deployment target. There is no reason to warn if the versions do not match exactly. Suggested-by: James Burgess <jamesrburgess@mac.com> Suggested-by: Clinton Stimpson <clinton@elemtech.com>
* AIX,HP: Allow user to override the default runtime path (libpath)Matthew Hanna2016-05-172-2/+6
| | | | | | | | | The `CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH` is used by CMake to always append `-Wl,-blibpath:/usr/lib:/lib` to the link line. This is needed by default on these platforms but needs to be overridden in some use cases (e.g. an environment in which one maintains versioned shared libraries). Change our logic to set this value only if it not already set by the user, project, or toolchain file.
* MSVC: Drop space in `/DNDEBUG` flag for consistency (#16052)Brad King2016-04-072-9/+9
| | | | | | | | We define `NDEBUG` without a space after the `-D` option for most compilers. Remove the space for MSVC (and Intel Fortran) for consistency. The MS compiler technically does not document that the `-D` argument may be separated from its value, though every version to date supports it.
* Fix spelling typos in comments and documentation (#16037)Felix Geyer2016-03-292-2/+2
| | | | | The Debian package checker tool (lintian) detected several typos in CMake.
* ASM: Add missing <INCLUDES> placeholder for "compile" rulesGregor Jasny2016-03-292-2/+2
| | | | | | | | This placeholder was added to the compilation rules for other languages by commit v3.4.0-rc1~342^2 (Factor an <INCLUDES> placeholder out of <FLAGS> in rule variables, 2015-07-13) but ASM was incorrectly left out. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* Cygwin: Add support for Clang compilerHan Sangjin2016-03-102-0/+2
| | | | | The platform information module for GNU on CYGWIN can be reused for Clang on CYGWIN because clang accepts almost all of the same options.
* Merge topic 'remove-vs6-generator'Brad King2016-03-102-7/+0
|\ | | | | | | | | | | b42866a3 Drop Visual Studio 6 generator cd9ba3ec cmLocalVisualStudio7Generator: Fix name of helper function
| * Drop Visual Studio 6 generatorBrad King2016-03-092-7/+0
| | | | | | | | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* | Merge topic 'clang-iframework-version'Brad King2016-03-101-1/+1
|\ \ | | | | | | | | | | | | 63c4133b OS X: Use -iframework with Clang only on version >= 3.2
| * | OS X: Use -iframework with Clang only on version >= 3.2Jean-Christophe Fillion-Robin2016-03-091-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.1.0-rc1~564^2 (OS X: Use -iframework for system framework directories, 2014-05-05) we test the version of Clang is smaller that 3.1 to see if it supports -iframework. Considering that "iframework" support has been added in clang@r142418 (Frontend: Support -iframework.) prior to clang 3.1, this made sense. That said, considering that support for multiple -iframework parameters has been added later in clang@r164607 (-iframework should allow separate arguments. ) prior to clang 3.2, this commit updates the check to enable framework support only if version is >= 3.2
* | VS: in Clang/C2 toolset, setup correct compiler settingsMariusz Pluciński2016-03-101-7/+23
|/
* Windows: Find Program Files directories more robustly from environmentBrad King2016-01-151-33/+19
| | | | | | | | | | | In Modules/Platform/WindowsPaths.cmake our previously recorded environment variable combinations no longer seem to be correct. For example, a 64-bit cmake binary may see ProgramW6432 in the environment and end up not considering the "ProgramFiles(x86)" variable. Instead check for all possible environment variables in the preferred order and then remove duplicates. Reported-by: Shawn Waldon <shawn.waldon@kitware.com>
* Merge topic 'fix-CMP0065-NEW-AIX-HP'Brad King2015-12-144-4/+28
|\ | | | | | | | | f254276f AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW
| * AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEWMarc Chevrier2015-12-114-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS setting has always been meant for flags needed to export symbols from executables for use by shared library plugins. Since commit v3.4.0-rc1~58^2~1 (CMP0065: Restrict the use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS, 2015-08-24) this is made explicit by using the flags only for executables with ENABLE_EXPORTS, guarded by CMP0065 for compatibility. On some platforms we were accidentally using this setting to pass other flags to the linker: * AIX: -bnoipath, -brtl * HP-UX: +s, +nodefaultrpath These flags are incorrectly dropped when CMP0065 is set to NEW. Fix this by moving the flags to more appropriate places for linking executables.
* | Merge topic 'detect-cray-wrappers'Brad King2015-12-092-182/+64
|\ \ | | | | | | | | | | | | | | | | | | a7ef0225 Cray: Refactor the Cray platform files to use compiler wrapper checks 0763a836 Cray: Add macro tests to detect the Cray compiler wrappers 5eaac0c9 Compiler: Add infrastructure for detecting compiler wrappers
| * | Cray: Refactor the Cray platform files to use compiler wrapper checksChuck Atkins2015-12-092-182/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an extensive refactoring of the Cray compiler wrapper usage. Using the new compiler wrapper checks, the CrayPrgEnv info files have been moved from Platform/ to Compiler/. The adjusted naming convention allows the compiler-wrapper information files to be loaded for both the CrayLinuxEnvironment platform when cross-compiling and the Linux platform if building natively on the Cray compute nodes. It also creates a separation of common arguments for compiler id and language information used to perform the appropriate introspection of implicit arguments and libraries used by the compiler wrappers based on the loaded module environment.
* | | Embarcadero: Fix bug where duplicate Ninja job pools would be created.James Johnston2015-12-031-1/+5
|/ / | | | | | | | | If the platform file was included multiple times, it was possible that duplicate Ninja job pools would be created.
* | Merge topic 'add-cray-linux-platform'Brad King2015-11-191-66/+88
|\ \ | | | | | | | | | | | | 743fcf1e Cray: Fix static / dynamic detection logic and parse more driver flags
| * | Cray: Fix static / dynamic detection logic and parse more driver flagsChuck Atkins2015-11-181-66/+88
| | |
* | | SunOS: Remove obsolete Studio compiler library directoriesApril Chin2015-11-161-6/+0
|/ / | | | | | | | | | | | | | | | | | | Our CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES setting is no longer needed because CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES is now populated with the actual implicit link directories for the current toolchain. The old values we hard-coded in CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES are not relevant to modern toolchains, so simply drop them. Co-Author: Shawn Walker-Salas <shawn.walker@oracle.com>
* | Cray: New platform file for Cray Linux Environment and PrgEnvChuck Atkins2015-11-142-0/+239
| |
* | Ninja: Refactor selection of 'deps = ' value for MS-compatible toolchainsBrad King2015-10-201-0/+2
|/ | | | | | Set variables in the platform information modules to tell the Ninja generator what deps type to use instead of hard-coding conditions in the generator itself.
* Xcode: Adjust deployment target SDK version to host versionGregor Jasny2015-10-121-0/+4
| | | | | | | | | | If the automatically selected SDK is newer than the host OS version and no deployment version has been set then adjust the deployment version to the host OS version. Otherwise the user won't be able to launch the executables on the build host. This is for example a problem on a MacOSX 10.10 host with Xcode 7 which only provides a MacOSX10.11 SDK.
* MSVC: Add system libs for WindowsStore on VS 2015Gilles Khouzam2015-10-021-1/+3
| | | | Use WindowsApp.lib for a Universal Application Platform project.
* Add support for *.manifest source files with MSVC toolsBrad King2015-09-171-2/+2
| | | | | | | | Classify .manifest sources separately, add dependencies on them, and pass them to the MS manifest tool to merge with linker-generated manifest files. Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
* MSVC: Rewrite manifest file handling with Makefile and NinjaBrad King2015-09-171-2/+2
| | | | | | | | | Add a helper class private to "cmcmd.cxx" to contain the implementation. Update the link logic to use the intermediate files directory for each target to hold manifest and resource files before embedding into the binary. Preserve the old behavior of placing the .manifest file next to the binary when not linking incrementally even though it will be embedded.
* Merge topic 'ar-option-order'Brad King2015-09-101-1/+1
|\ | | | | | | | | 08659ff4 Re-order 'ar' options 'cq' => 'qc'
| * Re-order 'ar' options 'cq' => 'qc'Brad King2015-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | The documetnation of binutils: https://sourceware.org/binutils/docs/binutils/ar-cmdline.html suggests to use the parameters "q" and "c" in this order ("q" is operation, and "c" is the modifier). Suggested-by: Дилян Палаузов <dilyan.palauzov@aegee.org>
* | GHS: Find latest 'int' directoryGeoff Viola2015-09-091-7/+29
|/
* Darwin: Add support for tbd library stub filesGregor Jasny2015-08-241-1/+1
| | | | | | | | Starting with Xcode 7 the OSX and iOS SDKs contain only stub files for dynamic system libraries. These stub files contain some meta data and a list of exported sysbols in plain text. They are handled by the toolchain like regular dylibs.
* Merge topic 'hp-ux-itanium-shared-libs'Brad King2015-08-211-3/+5
|\ | | | | | | | | 625225bb HP-UX: Do not use ".sl" extension for shared libs on Itanium
| * HP-UX: Do not use ".sl" extension for shared libs on ItaniumBrad King2015-08-181-3/+5
| | | | | | | | | | | | Instead use the standard ".so" extension. Suggested-by: Gerhard Grimm <gerhard.grimm@detec.com>
* | Add support for ARTOS platform using GNU C with ac compiler driverKars de Jong2015-08-172-0/+26
| | | | | | | | | | | | Add platform and compiler descriptions for ARTOS RTOS (locamation.com). Signed-off-by: Kars de Jong <kars.dejong@locamation.nl>
* | HP-UX: Fix linker search type flags for C shared libs on HP-UXChuck Atkins2015-08-121-12/+5
|/ | | | | | | Since commit v2.8.7~31^2 (HP: Drive shared library linking with compiler front end, 2011-12-12) the C compiler is used to link shared libraries instead of calling the linker directly, so linker options need to be wrapped as -Wl,-foo instead of -foo.
* SunOS: Drop special case for linking C++ shared libraries with gcc (#15673)Brad King2015-07-301-8/+0
| | | | | | | | Since commit v2.4.0~4325 (...use gcc -shared, even for C++ libraries, 2003-03-13) we use the C compiler "gcc" to link C++ shared libraries compiled with "g++". At the time "g++" did not know how to link shared libraries correctly. This has long since been fixed so simply drop the special case.
* Merge topic 'osx-iframework'Brad King2015-07-232-0/+10
|\ | | | | | | | | e68f0cb3 OS X: Use -iframework with AppleClang only on version >= 4.2
| * OS X: Use -iframework with AppleClang only on version >= 4.2Brad King2015-07-222-0/+10
| | | | | | | | | | | | | | Since commit v3.1.0-rc1~564^2 (OS X: Use -iframework for system framework directories, 2014-05-05) we test the version of Clang to see if it supports -iframework. Fix the version test used for AppleClang since it uses a different version scheme than upstream Clang.
* | Add EUROS RTOS platform description fileStanimir Kabaivanov2015-07-141-0/+19
| | | | | | | | | | | | Add a basic platform module for EUROS RTOS (euros-embedded.com). Co-Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
* | Factor an <INCLUDES> placeholder out of <FLAGS> in rule variablesBrad King2015-07-1312-26/+26
| | | | | | | | | | | | | | | | | | | | | | 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>.
* | Place <DEFINES> before <FLAGS> consistently across compilersBrad King2015-07-135-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | Update our values for CMAKE_<LANG>_COMPILE_OBJECT, CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE to place <DEFINES> before <FLAGS> consistently across supported compilers. We already do this for most compilers, so update the rest for consistency.
* | Merge topic 'auto_export_dll_symbols'Brad King2015-07-081-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8f86407c Windows: Optionally generate DLL module definition files automatically 069aa93b bindexplib: Add support for "/bigobj" format objects 61bbbdcf bindexplib: Fix treatment of some symbols de70c922 bindexplib: Teach DumpFile to return errors 8ea69dfe bindexplib: Build source as part of CMakeLib 2963cb2a bindexplib: Wrap long lines 4ff09893 bindexplib: Drop code that CMake does not need 7de8276c bindexplib: Add copyright/license notice block 65086ad7 bindexplib: Import original implementation from CERN
| * | Windows: Optionally generate DLL module definition files automaticallyBill Hoffman2015-07-061-0/+2
| | | | | | | | | | | | | | | | | | | | | Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically generate a module definition file from MS-compatible .obj files and give it to the linker in order to export all symbols from the .dll part of a SHARED library.
* | | VS: Add /machine: flag to Librarian tool (#11240)Brad King2015-06-261-0/+1
|/ / | | | | | | | | | | | | | | If a Windows resource (.rc) source file is included in a STATIC library, the VS "link" tool will process the compiled ".res" file and needs to know the target architecture. Without it, we may get a LNK4068 warning and possibly a LNK1112 error. Add /machine: to the default static library flags to give the link tool the information it needs.
* | Merge topic 'ConcurrentFortran-compiler-id'Brad King2015-06-191-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 54676a0e Help: Add notes for topic 'ConcurrentFortran-compiler-id' 7cd539b1 Add support for Concurrent Fortran 77 Compiler 0d204c1c CMakeDetermineCompilerId: Try matching compiler output to detect id 5f0dad75 CMakeDetermineCompilerId: Refactor id build/check loop logic c65a060e CMakeDetermineCompilerId: Optionally try some flags before no flags
| * | 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>
* | | Embarcadero: Run at most one linker invocation at a time (#15620)James Johnston2015-06-181-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least some versions (e.g. C++ Builder 5) of the bcc32 linker are known to write temporary files with a constant name to the current directory (e.g. "turboc.$ln"). (This can be verified by using Process Monitor to watch the file writes that bcc32 / ilink32 / implib make). This causes problems with some generators that keep a constant current directory and run concurrent linkers. For example, the Ninja generator, by default, always has the current directory set to the top of the build tree - resulting in conflicts between the linkers that are simultaneously trying to write to "turboc.$ln". Symptoms include direct errors regarding the "turboc.$ln" file, or later build steps failing due to corrupted output from previous links that happened to link "successfully." This is not a problem for the Borland Makefiles generator which does not run jobs in parallel. For the Ninja generator, work around this problem by using a link job pool of size 1.