summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* Honor CMAKE_*_LINKER_FLAGS[_<CONFIG>]_INIT set in toolchain filesBrad King2016-07-146-21/+21
| | | | | | | | | | | | | | Document these variables. Change our convention for setting these variables from: set(CMAKE_EXE_LINKER_FLAGS_INIT "...") to string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ...") so that any value previously set by a toolchain file will be used.
* MSVC: Set all CMAKE_*_LINKER_FLAGS_INIT directlyBrad King2016-07-131-28/+19
| | | | Avoid copying CMAKE_EXE_LINKER_FLAGS_INIT to the others.
* Embarcadero: Set all CMAKE_*_LINKER_FLAGS_INIT directlyBrad King2016-07-131-9/+5
| | | | Avoid copying CMAKE_EXE_LINKER_FLAGS_INIT to the others.
* Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain filesBrad King2016-07-0610-46/+46
| | | | | | | | | | | | | | | | | | | | | | | Document these variables. Change our convention for setting these variables from: set(CMAKE_C_FLAGS_INIT "...") to string(APPEND CMAKE_C_FLAGS_INIT " ...") so that any value previously set by a toolchain file will be used. Automate the conversion with: sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \ Modules/Compiler/*.cmake Modules/Platform/*.cmake and follow up with some manual fixes (e.g. to cases that already meant to append). Also revert the automated changes to contexts that are not protected from running multiple times.
* OpenWatcom: Partially modernize platform information modulesBrad King2016-07-065-0/+24
| | | | | | | Migrate from the old `<os>-<cc>.cmake` layout to the modern `<os>-<id>-<lang>.cmake` layout. Keep settings common to C and C++ in a `Windows-OpenWatcom.cmake` helper module with an include blocker. For now just add both C and CXX settings in the helper module.
* Intel: Do not use MSVC-like flags for FortranBrad King2016-07-051-14/+17
| | | | | | | | | | | Teach `Modules/Platform/Windows-MSVC.cmake` not to use MSVC options for Fortran. We use the `__windows_compiler_msvc` for the Intel Fortran compiler on Windows for other settings, but we do not want the flags. Previously this worked only because the options were later overridden by `Modules/Platform/Windows-Intel*.cmake`, but it is cleaner to not set the options in the first place.
* Merge topic 'aix-clang'Brad King2016-06-212-0/+2
|\ | | | | | | | | 5cc34162 AIX: Add support for Clang compiler
| * AIX: Add support for Clang compilerWu Zhao2016-06-202-0/+2
| | | | | | | | | | The platform information module for GNU on AIX can be reused for Clang on AIX because clang accepts almost all of the same options.
* | Merge topic 'revert-vs-clang-minsize'Brad King2016-06-201-1/+1
|\ \ | |/ |/| | | | | 78249be2 VS: Fix regressed mapping for the cl `/Os` compiler flag
| * VS: Fix regressed mapping for the cl `/Os` compiler flagBrad King2016-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.6.0-rc1~279^2~10 (VS: in Clang/C2 toolset, setup correct compiler settings, 2016-02-18) a flag mapping was added for the clang `-Os` flag. However, this collides with a mapping we already had for the MSVC flag of the same name. This is a symptom of a larger problem in that the VS generators need a per-toolset flag map (issue #16153). For now, simply drop the new mapping and drop `-Os` from clang compiler flags in the MinSizeRel configuration. Reported-by: Felix Bruns <felixbruns@gmail.com>
* | 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