summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Avoid () in environment variable referencesBen Boeckel2014-05-081-2/+3
| | | | Use nested variable evaluation instead.
* Merge topic 'osx-iframework'Brad King2014-05-072-0/+7
|\ | | | | | | | | 1bed75a5 OS X: Use -iframework for system framework directories
| * OS X: Use -iframework for system framework directoriesMikołaj Siedlarek2014-05-072-0/+7
| | | | | | | | | | | | | | Just like -I flag has its -isystem counterpart which marks an include directory as a system directory and prevents unwanted warnings, on Apple systems there is -iframework -- a system directory replacement for -F. Use this flag to implement include_directories(SYSTEM) for frameworks.
* | Merge topic 'xcode-sdkroot'Brad King2014-05-071-14/+29
|\ \ | |/ |/| | | | | 5dfe9b7d Xcode: Find fallback SDK if one matching the OS version doesn't exist.
| * Xcode: Find fallback SDK if one matching the OS version doesn't exist.Clinton Stimpson2014-05-061-14/+29
| | | | | | | | | | | | | | | | For example if one installs Xcode 4.6 on OS X 10.9, it doesn't contain a 10.9 SDK, so fallback to the next newest version which, in this case, happens to be a 10.8 SDK. This fixes bug #14572.
* | Merge branch 'master' into osx-init-earlyBrad King2014-04-298-61/+79
|\ \ | |/ |/| | | | | Resolve conflict in Source/cmGlobalGenerator.cxx by integrating changes from both sides.
| * Merge topic 'implicit-libNN-dirs'Brad King2014-04-171-1/+1
| |\ | | | | | | | | | | | | cc57ff5c Drop /lib32 and /lib64 from link directories and RPATH (#14875)
| * \ Merge topic 'mingw-archive-no-replace'Brad King2014-04-151-2/+2
| |\ \ | | | | | | | | | | | | | | | | 39d0ade0 Windows-GNU: Support duplicate object names in large archives (#14874)
| | * | Windows-GNU: Support duplicate object names in large archives (#14874)Brad King2014-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v2.6.0~388 (Added build rule variables CMAKE_<LANG>_ARCHIVE_..., 2008-01-29) we use separate "ar cr ..." and "ar r ..." steps to incrementally add a large list of object files to an archive. Since the "r" command replaces existing objects of the same name in an archive, if multiple objects have the same file name and appear in separate append steps then one overwrites the other. Instead, use "ar cq ..." and "ar q ..." to always append to the archive. We already remove the archive before creating it so this will not cause objects to be appended to existing archives on incremental rebuilds.
| * | | Merge topic 'matches-cleanup'Brad King2014-04-154-5/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f21ac16e Replace MATCHES test on numbers with EQUAL test 7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL "" 3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs 5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible 2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
| | * | | Remove .* expressions from beginning and end of MATCHES regexsRolf Eike Beer2014-04-143-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All these expressions work the same: "foo" ".*foo.*" "^.*foo.*$" This assumes that the "Intel*" expressions were meant to be "Intel.*".
| | * | | Replace string(REGEX REPLACE) with string(REPLACE) where possibleRolf Eike Beer2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | The simple replacement is much faster.
| * | | | MinGW: link like on Unix and use compile flags when linkingPeter Kümmel2014-04-151-2/+2
| |/ / /
| * | | Merge topic 'revert-Android-platform'Brad King2014-04-111-5/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | 4b31f064 Revert "Modules: Add an Andriod platform file"
| | * | | Revert "Modules: Add an Andriod platform file"Stephen Kelly2014-04-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 77f06b145d57c4665ff5d71b89a70c54a009ad14. It may be re-added in the future when the requirements for that platform are better known and supported by CMake.
| * | | | Watcom: Use single quote for all file/path items in wlink commandJiri Malak2014-04-081-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | Watcom Linker use single quote if necessary for quoting target name, libraries names and libraries search path. Object names were already fixed.
| * | | Watcom: Cleanup Windows-wcl386 configurationJiri Malak2014-04-021-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove Watcom linker caseexact options already defined in system definition. * Use win_dll system for SHARED_LIBRARY and SHARED_MODULE. * Use explicit target definition -bt=.. option for proper initialization of compiler Windows environment (predefined macros) * Reorganize compiler options to global options and configuration specific options * Use option to optimize out stack checking code for release version
| * | | Merge topic 'link-line-quoting'Brad King2014-04-011-0/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | 423009c1 Makefile: Generate single-quoted object lists for Watcom a863a8fe cmLocalUnixMakefileGenerator3: Re-organize ConvertToQuotedOutputPath
| | * | | Makefile: Generate single-quoted object lists for WatcomJiri Malak2014-03-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile generators. The underlying problem is with the Watcom linker, not with WMake. The Watcom linker wants object files to be single-quoted. Add <LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the generators to use Watcom-style single quotes for object files on link lines. On Windows, Watcom uses the GetCommandLine API to get the original command-line string and do custom parsing that expects single quotes. On POSIX systems, Watcom approximates the original command line by joining all argv[] entries separated by a single space. Therefore we need to double-quote the single-quoted arguments so that the shell does not consume them and they are available for the parser to see.
| * | | | Haiku: Fix compiler detection when using distccAdrien Destugues2014-03-211-11/+16
| |/ / / | | | | | | | | | | | | Also remove outdated include directories.
| * | | Merge topic 'watcom-updates'Brad King2014-03-201-11/+13
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 64c2342a Watcom: Enable 'WMake Makefiles' generator on Linux 5d9aa66c Watcom: Introduce OpenWatcom compiler id and fix compiler version 9292d3b8 Watcom: Detect compiler target architecture and platform fbc883c9 Watcom: Add one blank line to Makefile for better readability
| | * | | Watcom: Introduce OpenWatcom compiler id and fix compiler versionJiri Malak2014-03-171-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Distinguish "Open Watcom" from old "Watcom" by introducing a new "OpenWatcom" compiler id. The __WATCOMC__ format is "VVRP" for Watcom and "VVRP + 1100" for Open Watcom.
| * | | | Modules: Add an Andriod platform fileStephen Kelly2014-03-201-0/+5
| |/ / / | | | | | | | | | | | | It is much like Linux but has no SONAME or RPATH.
| * | | Windows: Use response files to specify link libraries for GNU toolsBrad King2014-03-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work around the command-line-length limit by using an @linklibs.rsp response file to pass the flags for link libraries. This allows very long lists of libraries to be used in addition to the existing support for passing object files via response file. Suggested-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
| * | | 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.
* | | OS X: Factor a Darwin-Initialize module out of Platform/DarwinBrad King2014-04-292-137/+136
| |/ |/| | | | | | | | | Initialize variables CMAKE_OSX_SYSROOT, CMAKE_OSX_DEPLOYMENT_TARGET, and CMAKE_OSX_ARCHITECTURES prior to enabling any languages. This will allow compiler identification to consider these values.
* | Drop /lib32 and /lib64 from link directories and RPATH (#14875)Brad King2014-04-161-1/+1
|/ | | | | | | Extend CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES with these paths. We already have the equivalents under /usr. Systems that have these directories have their dynamic loaders configured already. Do not allow them to appear in the RPATH explicitly.
* 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