summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'watcom-wlib-quoting'Brad King2014-03-031-2/+2
|\ | | | | | | | | 5c5be193 Watcom: Fix static library name quoting for wlib
| * Watcom: Fix static library name quoting for wlibJiri Malak2014-02-281-2/+2
| | | | | | | | | | Use double-quotes instead of single-quotes around the static library target name in 'wlib' invocations.
* | Watcom: Fix creation of DLLs without any exported symbolsBrad King2014-02-271-4/+3
|/ | | | | | | | | | | | Create each DLL import library by passing "option implib=..." to the linker for its SHARED library. This works even when there are no symbols to be exported. Leave the option out for MODULE libraries because we do not need an import library for them. For executables, retain the separate invocation of wlib because we want an import library only when the ENABLE_EXPORTS property is set, and in that case the project should provide symbols. Suggested-by: J Decker <d3ck0r@gmail.com>
* MSVC: Add properties to configure compiler PDB files (#14762)Brad King2014-02-261-1/+1
| | | | | | | | | | Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files 2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY properties. Those properties now exclusively handle linker PDB files. Since STATIC libraries do not link their compiler PDB file becomes more important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB file location and pass the value to the MSVC /Fd option.
* Merge topic 'isystemForIcpc'Brad King2014-02-172-0/+2
|\ | | | | | | | | cab5ebd4 Intel compiler: add -isystem flag under Linux
| * Intel compiler: add -isystem flag under LinuxAlex Neundorf2014-02-062-0/+2
| | | | | | | | | | | | | | This makes the SYSTEM keyword work with the Intel compiler under Linux. AFAIK this is supported neither under Windows nor OSX. Alex
* | OS X: Split Intel compiler information filesBrad King2014-02-116-134/+36
| | | | | | | | | | | | | | | | Create platform information modules Platform/Darwin-Intel-(C|CXX).cmake and helper module Platform/Darwin-Intel.cmake. Teach existing module Platform/Darwin-Intel-Fortran.cmake to use the helper too. Move information from Platform/Darwin-icc.cmake into these files and drop information already in Platform/Darwin.cmake to avoid duplication.
* | Visibility: the Intel compiler does not support -fvisibility on windowsNils Gladitz2014-02-072-0/+10
|/
* QNX: Introduce QCC compiler id for that QNX platform compiler.Stephen Kelly2014-01-223-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | Introduce policy CMP0047 to control resetting the id for compatibility. De-duplicate content in the QNX platform file by including the GNU one. QNX is a form of GNU platform. Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables. They are populated again later by the Compiler/GNU.cmake file anyway. Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC compiler id is in use, and the language is CXX. Use the QNX recommended flag for QCC instead of the gcc compatible -x flag. Populate new module files to handle system includes and depfiles when using the QCC compiler. Remove code which unsets the system include and depfiles related variables. When a GNU driver is used instead of the QCC one, the appropriate flags will be used. These variables were previously cleared for lowest-common-denominator compatibility with both drivers.
* Add MirBSD platform support (#14659)Brad King2013-12-191-0/+1
| | | | | Add a Modules/Platform/MirBSD.cmake module that just includes the OpenBSD platform module.
* OS X: Fix app bundle search path during cross compiling (#14603)Flynn Marquardt2013-12-021-1/+3
| | | | | In "Modules/Platform/Darwin.cmake" the variable _apps_paths stays empty if cross compiling. Do not de-duplicate an empty list.
* Introduce CMAKE_STAGING_PREFIX variable.Stephen Kelly2013-11-212-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | This variable can be useful in cross-compiling contexts where the sysroot is read-only or where the sysroot should otherwise remain pristine. If the new CMAKE_STAGING_PREFIX variable is set, it is used instead of CMAKE_INSTALL_PREFIX when generating the installation rules in cmake_install.cmake. This way, the CMAKE_INSTALL_PREFIX variable always refers to the installation prefix on the target device, regardless of whether host==target. If any -rpath paths passed to the linker contain the CMAKE_STAGING_PREFIX, the matching path fragments are replaced with the CMAKE_INSTALL_PREFIX. Matching paths in the -rpath-link are not transformed. The cross-prefix usr-move workaround is assumed not to require extension regarding CMAKE_STAGING_PREFIX. The staging area is a single prefix, so there is no scope for cross-prefix symlinks. The CMAKE_INSTALL_PREFIX is still used to determine the workaround path, and that variable remains the relevant one even if CMAKE_STAGING_PREFIX is used. If the generated export files are deployed to the target, the workaround will still be in place, and still be employed if required.
* Add compiler target compile options.Stephen Kelly2013-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | For clang, this allows passing -target <triple> to the compiler, and for qcc, -V<arch> using toolchain files containing something like set(triple arm-linux-gnueabihf) set(CMAKE_C_COMPILER "/usr/bin/clang") set(CMAKE_C_COMPILER_TARGET ${triple}) set(CMAKE_CXX_COMPILER "/usr/bin/clang++") set(CMAKE_CXX_COMPILER_TARGET ${triple}) or set(arch gcc_ntoarmv7le) set(CMAKE_C_COMPILER /opt/qnx650/host/linux/x86/usr/bin/qcc) set(CMAKE_C_COMPILER_TARGET ${arch}) set(CMAKE_CXX_COMPILER /opt/qnx650/host/linux/x86/usr/bin/QCC) set(CMAKE_CXX_COMPILER_TARGET ${arch}) Both clang and qcc are inherently cross compiler( driver)s. When cross-compiling with clang, use the CMAKE_${lang}_COMPILER_TARGET as the _CMAKE_TOOLCHAIN_PREFIX to find the appropriate binutils. When cross-compiling with QNX qcc, use the CMAKE_${lang}_COMPILER_TARGET to set the appropriate _CMAKE_TOOLCHAIN_PREFIX.
* Allow disabling adding the install prefix to the prefix search path.Stephen Kelly2013-10-312-9/+18
| | | | | | | In certain scenarios, it is preferable to keep a 'dirty' install prefix than to clear it, and to expect that content will not be found there. Add a CMAKE_FIND_NO_INSTALL_PREFIX variable that can be set to disable searching the install prefix.
* Merge topic 'QNX-ninja-generator'Brad King2013-10-261-0/+3
|\ | | | | | | | | 02cf77f QNX: Don't attempt to create depfiles
| * QNX: Don't attempt to create depfilesStephen Kelly2013-10-251-0/+3
| | | | | | | | | | The qcc driver can not handle the flags. This makes it possible to use qcc with the Ninja generator.
* | Merge topic 'intel-no-i_dynamic'Brad King2013-10-261-2/+2
|\ \ | | | | | | | | | | | | f61bcbc Intel: Drop deprecated -i_dynamic flag from Fortran (#14507)
| * | Intel: Drop deprecated -i_dynamic flag from Fortran (#14507)Brad King2013-10-241-2/+2
| |/ | | | | | | | | | | | | The -i_dynamic flag is deprecated and not even listed in the manual for Intel Composer XE 2013. Reported-by: Izaak Beekman <zbeekman@gmail.com>
* | Drop compatibility with CMake < 2.4Brad King2013-10-232-11/+0
|/ | | | | | | | | | | | Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
* Merge topic 'vs12-parallel-cl-FS'Brad King2013-10-213-1/+7
|\ | | | | | | | | 216afc8 MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492)
| * MSVC: Add /FS flag for cl >= 18 to allow parallel compilation (#14492)Brad King2013-10-183-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In generators such as Ninja that can run multiple "cl" processes that refer to the same compiler .pdb file (/Fd) at the same time, MSVC from Visual Studio 2013 complains: fatal error C1041: cannot open program database '.../vc120.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS According to "cl /?": /FS force to use MSPDBSRV.EXE Add the flag to compilation lines for this compiler version just after the /Fd option.
* | Intel: When simulating MSVC, re-use Windows-MSVC (#14476)Brad King2013-10-183-93/+16
| | | | | | | | | | | | | | | | | | Teach CMake(C|CXX|Fortran)CompilerId* to report the MSVC version simulated by the Intel compiler, if any. Refactor the Windows-Intel platform information helper module to load Windows-MSVC instead of duplicating the information. Teach Windows-MSVC to understand when it is loaded as the simulated Fortran compiler (its preprocessor is simulated).
* | OS X: Encode -F framework search flag in per-language platform variableBrad King2013-10-101-0/+5
| | | | | | | | | | | | | | | | | | Compilers for languages other than C and C++ on OS X may not understand the -F framework search flag. Create a new platform information variable CMAKE_<LANG>_FRAMEWORK_SEARCH_FLAG to hold the flag, and set it for C and CXX lanugages in the Platform/Darwin module. Reported-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge topic 'haiku-updates'Brad King2013-10-091-13/+114
|\ \ | | | | | | | | | | | | | | | | | | | | | 54ef2be Haiku: Include files cleanup in cmCTest 38d5555 Haiku: Remove outdated preprocessor checks 1dc61f8 Haiku: Remove use of B_COMMON_DIRECTORY 7ebc1cb Haiku: Several fixes to platform module
| * | Haiku: Several fixes to platform moduleAdrien Destugues2013-10-081-13/+114
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Do not define BEOS anymore (this includes workarounds which we don't need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the cmake files instead). * On the other hand, do define UNIX (we are trying to be compliant) and HAIKU (there is still a number of things we don't do like the average UNIX clone) * Do not use UnixPaths, as our filesystem hierarchy isn't anything like what it expects. * Do not use -nostart, which the compiler doesn't know about anymore. This used to be an Haiku extension to gcc, and is equivalent to -shared which is the default gcc option. * While "dl" functions are provided in libroot, this is always implicitly linked so there is no need to tell cmake about it. * Forcing position-independent code is not needed, so remove it. * On the other hand, include appropriate linker options for executables and shared libraries. * Support for the two available compilers in Haiku (gcc2 and gcc4) and pick the right headers and libraries according to the currently selected one. * With the adoption of the package manager, the directory layout was changed. Tell cmake where to look for header files and libraries. * As we don't define BEOS anymore, enable the workaround we still need for HAIKU as well. This is the lack of a libm (it is part of the implicitly linked in libroot) Applied-by: Rolf Eike Beer <eike@sf-mail.de>
* | Merge topic 'apple-clang-id'Brad King2013-10-092-0/+2
|\ \ | | | | | | | | | | | | | | | | | | 1763c31 Set policy CMP0025 to NEW while building CMake itself aa53ee5 Add policy CMP0025 for Apple Clang compiler id compatibility ab65862 Clang: Add separate "AppleClang" compiler id
| * | Clang: Add separate "AppleClang" compiler idBrad King2013-10-082-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | Apple distributes their own Clang build with their own version numbers that differ from upstream Clang. Use the __apple_build_version__ symbol to identify the Apple Clang compiler and report the Apple Build Version as the fourth version component in CMAKE_<LANG>_COMPILER_VERSION. Add Compiler/AppleClang-<lang> and Platform/Darwin-AppleClang-<lang> modules that simply include the upstream equivalents. Fix comparisons of CMAKE_<LANG>_COMPILER_ID to Clang in CMake's own source and tests to account for AppleClang.
* | Clang: Support Windows variants for GNU and MSVC (#13035, #14458)Brad King2013-10-044-2/+42
|/ | | | | | | | | | | | | | | | Teach the compiler identification preprocessor tests to report when Clang simulates MSVC, and what version. If not MSVC, assume GNU. Teach compiler information modules Clang-(C|CXX) to recognize when Clang simulates MSVC and skip loading the GNU information. Teach the Windows-MSVC platform information to recognize when it is loaded as the simulated compiler and use that version information instead of the real compiler's (different) version scheme. Add platform modules Windows-Clang-(C|CXX) and support module Windows-Clang to load either Windows-MSVC or Windows-GNU and wrap the corresponding information macros.
* OS X: Search system SDKs for frameworksBrad King2013-09-271-0/+9
| | | | | | | | In Modules/Platform/Darwin.cmake set CMAKE_SYSTEM_FRAMEWORK_PATH to include framework directories from inside the system SDK corresponding to CMAKE_OSX_SYSROOT. Suggested-by: Sean McBride <sean@rogue-research.com>
* MSVC: Fix WinCE arch family preprocessor symbol (#14436)Patrick Gansterer2013-09-251-4/+11
| | | | | | | | | In commit bd827f98 (Use COFF file header header for architecture detection, 2013-08-05) the MSVC_<lang>_ARCHITECTURE_ID value computed by CMakeDetermineCompilerId.cmake changed for WinCE architectures to be the exact architecture read from the PE header. Fix platform preprocessor definitions in Modules/Platform/Windows-MSVC.cmake to correspond to the architecture family (ARM or SHx) instead of the specific architecture.
* MSVC: Fix version test for linking corelibc on Windows CE (#14420)Patrick Gansterer2013-09-231-1/+1
| | | | | | In commit 8fcf0ab0 (Add support for new Windows CE compiler, 2013-08-04) we made corelibc conditional on the MSVC version, but the version value was incorrect. Update it to use corelibc for VS 2008 and below.
* MSVC: Drop /link from executable link lines with NinjaBrad King2013-09-111-1/+0
| | | | | | | In commit fb9f73de (MSVC: Invoke 'link' directly for executables, 2013-04-08) we forgot to remove the /link option handling added by commit e31df039 (Ninja: move <OBJECTS> in front of the first linker option, 2012-09-27) to the Platform/Windows-MSVC module. Drop it now.
* OS X: Do not default to non-existent deployment target SDKBrad King2013-08-141-2/+14
| | | | | | | Since commit 95f78e08 (OS X: Search for SDK based on deployment target, 2013-08-02) we select the default OS X SDK path to match the deployment target. Fix this behavior in the case that the matching SDK does not exist and fall back to the SDK for the current host OS X version.
* Revert "Add compiler target compile options."Stephen Kelly2013-08-091-3/+0
| | | | This reverts commit 2d9ec1dadfdd10043a98d425abb25d0aef117699.
* Merge topic 'wince800'Brad King2013-08-081-1/+5
|\ | | | | | | | | | | 0416a0e VS11: Add support for Windows CE SDKs 8fcf0ab Add support for new Windows CE compiler
| * Add support for new Windows CE compilerPatrick Gansterer2013-08-071-1/+5
| | | | | | | | | | The new compiler versions do not need corelibc.lib as a default link library and a architecture detection workaround.
* | Merge topic 'osx-no-command-line-tools'Brad King2013-08-071-0/+6
|\ \ | |/ |/| | | | | 03ab170 OS X: Enable command-line build without tools in PATH
| * OS X: Enable command-line build without tools in PATHBrad King2013-08-061-0/+6
| | | | | | | | | | | | | | | | | | | | Teach modules CMakeDetermineCompiler and CMakeUnixFindMake to ask Xcode where to find the compiler or make tools, using 'xcrun --find', if none is found in the PATH. Teach module Platform/Darwin to add the path to the SDK to CMAKE_SYSTEM_PREFIX_PATH so that find_* command look there. Also add the SDK /usr/include directory to the implicit include list in CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES to suppress explicit -I options for it.
* | WIN: Use COFF file header header for architecture detection (#14083)Patrick Gansterer2013-08-051-7/+0
|/ | | | | Read the machine field from the COFF file header to get the exact target architecture for ARM and SHx on the Windows platform.
* OS X: Search for SDK based on deployment target (#14324)Brad King2013-08-021-1/+5
| | | | | | | | When available, use CMAKE_OSX_DEPLOYMENT_TARGET instead of the host OS X version to select the default SDK. This makes sense because one should use the SDK matching the deployment target. Suggested-by: John Ralls <jralls@ceridwen.us>
* OS X: Add Fortran library version flags (#14249)Graham Markall2013-07-164-0/+31
| | | | | | | | | The linker flags for setting the compatibility and current versions of libraries on Darwin are set for the supported Fortran compilers. Set CMAKE_Fortran_CREATE_SHARED_LIBRARY for the NAG Fortran compiler to have no space after <SONAME_FLAG> so the NAG compiler can parse the argument correctly.
* OS X: Add copyright notices to Darwin-*-Fortran.cmakeBrad King2013-07-163-0/+39
|
* Merge branch 'master' into vs12-generatorBrad King2013-06-287-21/+23
|\ | | | | | | | | Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping the side from 'master'.
| * Embarcadero: Use response files only for includes, objects, and libsBrad King2013-06-271-3/+4
| | | | | | | | | | | | Leave other flags directly in the Makefile command lines and outside any special inline response file syntax. Otherwise Borland does not support flags with quotes in response files.
| * Add compiler target compile options.Stephen Kelly2013-06-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For clang, this allows passing -target <triple> to the compiler, and for qcc, -V<arch> using toolchain files containing something like set(triple arm-linux-gnueabihf) set(CMAKE_C_COMPILER "/usr/bin/clang") set(CMAKE_C_COMPILER_TARGET ${triple}) set(CMAKE_CXX_COMPILER "/usr/bin/clang++") set(CMAKE_CXX_COMPILER_TARGET ${triple}) or set(arch gcc_ntoarmv7le) set(CMAKE_C_COMPILER /opt/qnx650/host/linux/x86/usr/bin/qcc) set(CMAKE_C_COMPILER_TARGET ${arch}) set(CMAKE_CXX_COMPILER /opt/qnx650/host/linux/x86/usr/bin/QCC) set(CMAKE_CXX_COMPILER_TARGET ${arch}) Both clang and qcc are inherently cross compiler( driver)s.
| * Merge topic 'rpath-on-mac'Brad King2013-06-031-0/+5
| |\ | | | | | | | | | | | | | | | | | | | | | dc1d025 OS X: Add test for rpaths on Mac. 8576b3f OS X: Add support for @rpath in export files. 00d71bd Xcode: Add rpath support in Xcode generator. 94e7fef OS X: Add RPATH support for Mac.
| | * OS X: Add RPATH support for Mac.Clinton Stimpson2013-06-031-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | RPATH support is activated on targets that have the MACOSX_RPATH property turned on. For install time, it is also useful to set INSTALL_RPATH to help find dependent libraries with an @rpath in their install name. Also adding detection of rpath conflicts when using frameworks.
| * | Merge topic 'xcode-shlib-versioning'Brad King2013-06-031-6/+2
| |\ \ | | |/ | | | | | | | | | cbe3f20 Xcode: Add support for shared library versioning
| | * Xcode: Add support for shared library versioningClinton Stimpson2013-05-291-6/+2
| | | | | | | | | | | | | | | Add a post-build command to shared library targets to create the versioning symbolic links.
| * | Merge topic 'vs-configurations'Brad King2013-05-162-5/+0
| |\ \ | | | | | | | | | | | | | | | | 42bb42d VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators