summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: allow spaces in source pathPeter Kuemmel2012-06-081-18/+0
| | | | And make /showIncude prefix visible for all build rules
* Ninja: add wrapper for cl to extract dependenciesPeter Kuemmel2012-06-081-0/+18
| | | | | | | | | | | cmcldeps wraps cl and adds /showInclude before calling cl. It parses the output of cl for used headers, drops system headers and writes them to a GCC like dependency file. cmcldeps uses ATM ninja code for process handling, but could be ported later to SystemTools. TODO: Why needs ninja multiple calls in the BuildDepends test?
* Mac: Add guards to CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE defaultsCharlie Sharpsteen2012-05-312-6/+12
| | | | | | | | The default for `CMAKE_FIND_FRAMEWORK`, defined in `Darwin.cmake` and `Darwin-icc.cmake`, is now guarded so that it will not override command line arguments passed by users. Similarly for `CMAKE_FIND_APPBUNDLE`
* Merge topic 'module-no-soname'David Cole2012-05-013-9/+9
|\ | | | | | | | | | | fdb3f87 Test NO_SONAME property (#13155) e1409ac Support building shared libraries or modules without soname (#13155)
| * Support building shared libraries or modules without soname (#13155)Modestas Vainius2012-04-303-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean target property NO_SONAME which may be used to disable soname for the specified shared library or module even if the platform supports it. This property should be useful for private shared libraries or various plugins which live in private directories and have not been designed to be found or loaded globally. Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and hard-coded -install_name flags with a conditional <SONAME_FLAG> which is expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG definition as long as soname supports is enabled for the target in question. Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in rules in case third party projects still use it. Such projects would not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be expanded. Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well. Since -install_name is soname on OS X, this should not be a problem if this variable is expanded only if soname is enabled. The Ninja generator performs rule variable substitution only once globally per rule to put its own placeholders. Final substitution is performed by ninja at build time. Therefore we cannot conditionally replace the soname placeholders on a per-target basis. Rather than omitting $SONAME from rules.ninja, simply do not write its contents for targets which have NO_SONAME. Since 3 variables are affected by NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if soname is enabled.
* | Intel: On Windows use /RTC1 instead of deprecated /GZ (#13174)Brad King2012-04-301-1/+1
| |
* | Intel: On Windows use /EHsc instead of deprecated /GX (#13163)Brad King2012-04-241-1/+1
|/ | | | | | | | | | Use of the deprecated option with Intel 2011 produces icl: command line remark #10010: option '/GX' is deprecated and will be removed in a future release. See '/help deprecated' so use its replacement option which has been supported for several older versions anyway.
* OS X: Mark find_program results as advancedDavid Cole2012-04-061-0/+2
| | | | | Avoid cluttering the gui with variables nearly nobody needs to see.
* OS X: Use correct extra path when searching for applicaton bundles (#13066)David Cole2012-04-061-3/+15
| | | | | | | | | The parent commit added a search path relative to OSX_DEVELOPER_ROOT. But with Xcode 4.3 the nested Applications folder is in a different relative location compared to that root. This commit makes the intent of the previous commit work with older and newer Xcode directory layouts. Furthermore, it only adds paths that exist to the search path.
* OS X: Use OSX_DEVELOPER_ROOT for app search path (#13066)Kashif Rasul2012-03-261-1/+1
| | | | | | | Since commit 4693cf84 (Xcode: Detect new default locations of Xcode 4.3 bits and pieces) Darwin.cmake detects the developer application directory instead of hard-coding /Developer. Replace the hard-coded path in CMAKE_SYSTEM_APPBUNDLE_PATH using the computed result.
* guard eCos.cmake against multiple inclusion (#12987)Alex Neundorf2012-03-201-1/+8
| | | | Alex
* Merge topic 'fix-12621-xcode43'Brad King2012-03-191-13/+20
|\ | | | | | | | | | | 0f4dfa6 CPack: Use real path to PackageMaker to find its version file (#12621) 4693cf8 Xcode: Detect new default locations of Xcode 4.3 bits and pieces (#12621)
| * Xcode: Detect new default locations of Xcode 4.3 bits and pieces (#12621)David Cole2012-03-091-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xcode 4.3 installs into "/Applications" by default, from the Mac App Store. Also, the paths to the available SDKs changed: they are now within the Xcode.app bundle. PackageMaker is installed as a separate program, and may be installed anywhere. It is not installed with Xcode 4.3 by default anymore. Download the "Auxiliary Tools for Xcode" to get PackageMaker. Put PackageMaker inside the Xcode.app bundle, in its nested Applications folder, or put it alongside Xcode in "/Applications" and CMake will find it. Update references to "find" paths: add new possible locations for finding Xcode.app and PackageMaker.app. Prefer the most recent version's locations first, but keep the old locations as fallback search paths, too. Thanks to all the contributors who provided and tested out various patches for fixing this issue. Especially, but by no means limited to: Francisco Requena EspĂ­, Jamie Kirkpatrick and drfrogsplat.
* | Merge topic 'ninja-generator'Brad King2012-03-191-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8485208 Ninja: shell escape $(CMAKE_SOURCE_DIR) and $(CMAKE_BINARY_DIR) df84767 Ninja: add support for OBJECT_OUTPUTS, fix PrecompiledHeader test case 48eb7fc Ninja: Avoid using 'this' in member initializers bba37dd Ninja: Fix for PDB files with spaces in the path. ac800f4 Ninja: Constify use of cmCustomCommand 9a0d5a8 Ninja: add /DEF: flag to linker call d40eebd Ninja: Add a cache option CMAKE_ENABLE_NINJA to enable the ninja generator. 8c63433 Ninja: Add friend struct so it can access the private ConvertToNinjaPath. dbe3dce Ninja: add .def file support f1bb08f Ninja: ensure the output dir exists at compile time 7a6b5f4 Ninja: Remove an unnecessary variable 80ff210 Ninja: Use cmSystemTools::ExpandListArgument to split compile/link commands d2731a3 Ninja: Add a missed license header eabc9b0 Ninja: CMake: Adapt Ninja generator for per-target include dirs bada88e Merge branch 'target-include-directories' into ninja-generator 54bd175 Ninja: windows msvc: create for each target a .pdb file ...
| * Ninja: don't define MSVC_IDE when using the ninja generatorPeter Kuemmel2012-02-181-2/+2
| | | | | | | | Thanks to Oscar Fuentes
* | Recognize Embarcadero compiler (#12604)Brad King2012-02-205-26/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Borland compiler was re-branded as CodeGear during 2007-2009 and since 2009 is the Embarcadero compiler. They offer predefined macros: http://docwiki.embarcadero.com/RADStudio/en/Predefined_Macros and distinguish themselves by __CODEGEARC__ and __CODEGEARC_VERSION__. Version 6.30 (C++Builder XE) changed the meaning of some flags: http://docwiki.embarcadero.com/RADStudio/en/C%2B%2B_Compiler_Option_Changes_for_XE Teach Embarcadero compiler information files to generate build rules with flags matching the compiler version. Leave the flags unchanged for old Borland versions. Always set the BORLAND toolchain indicator for compatibility with existing projects that test it. Also set the EMBARCADERO indicator for newer toolchains.
* | Rename Modules/Platform/Windows-{Borland => Embarcadero}.cmakeBrad King2012-02-173-7/+7
|/ | | | | | | The Borland compiler is now the Embarcadero compiler. Rename the shared platform information file to reflect this. This does not change the interface, as old versions are still "Borland", but will allow new versions released by Embarcadero to be supported cleanly.
* Intel: Fix Windows per-config Fortran flags (#12642)Brad King2012-01-021-3/+3
| | | | | | | | Fix typo introduced in commit 66a08c10 (more uniform approach to enable language, 2004-08-26). The optimization option should be /O2 for Release configurations and /O1 for MinSizeRel. Suggested-by: He Yuqi <yuqi.he@gmail.com>
* Merge topic 'GNU-to-MS'David Cole2011-12-161-1/+1
|\ | | | | | | | | c213eb9 Windows-GNU: Remove extra quotes in GNUtoMS rule variable
| * Windows-GNU: Remove extra quotes in GNUtoMS rule variableBrad King2011-12-081-1/+1
| | | | | | | | | | CMake replaces the <TARGET...> tokens with properly quoted values so we do not need an extra set of quotes around them.
* | Merge topic 'osx-dependent-libraries'David Cole2011-12-161-5/+7
|\ \ | | | | | | | | | | | | 5d99343 Do not link private dependent shared libraries on OS X > 10.4
| * | Do not link private dependent shared libraries on OS X > 10.4Brad King2011-12-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default OS X 10.4 linker incorrectly searches for dependencies of linked shared libraries only under the -isysroot location. It fails to find dependencies of linked shared libraries in cases such as the ExportImport test. It produces errors like: /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic library: libtestLib3Imp.dylib referenced from: /.../ExportImport/Root/lib/libtestLib3lib.1.2.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: _testLib3Imp referenced from libtestLib3lib expected to be defined in libtestLib3Imp.dylib or with CMAKE_SKIP_RPATH off to enable install_name in the Export side: /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/.../ExportImport/Export/impl/libtestLib3Imp.dylib referenced from: /.../ExportImport/Export/libtestLib3lib.1.2.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:_testLib3Imp referenced from libtestLib3lib expected to be defined in /.../ExportImport/Export/impl/libtestLib3Imp.dylib Note how "/Developer/SDKs/MacOSX10.4u.sdk" is prepended to the dependent library path. Commit 2cff26fa (Support linking to shared libs with dependent libs, 2008-01-31) and commit 82fcaebe (Pass dependent library search path to linker on some platforms, 2008-02-01) worked around the problem by defining platform variable CMAKE_LINK_DEPENDENT_LIBRARY_FILES. It tells CMake to link to dependent libraries explicitly by their path thus telling the linker where to find them. Unfortunately the workaround had the side effect of linking dependent libraries and defeats most benefits of LINK_INTERFACE_LIBRARIES. Fortunately OS X 10.5 and above do not need to find transitive dependencies at all so we can avoid the workaround on Modern OS X.
* | | HP: Drive shared library linking with compiler front endBrad King2011-12-145-23/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we linked C, Fortran, and ASM shared libraries compiled with the HP compiler using a direct invocation of the linker (ld). This behavior was left historically from support for an ancient HP C compiler that did not know how to create shared libraries. Fortran shared libraries need to be linked with the compiler to get the language runtime library dependencies as is already done for C++. Update the HP-UX-HP* platform information to use the compiler front end when linking shared libraries. This works on modern HP tools and produces correct behavior. If there is a need to support older tools again we can add a special case for them.
* | Merge topic 'GNU-to-MS'David Cole2011-12-067-0/+73
|\ \ | |/ | | | | | | | | | | | | | | ae62a1c Test CMAKE_GNUtoMS option in ExportImport on MinGW and MSys afb00fe Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .lib 61e8629 Factor makefile generator link rule lookup into helper function a603250 Load platform files that need to know the ABI when possible ecd8414 Fortran: Detect pointer size in gfortran on MinGW
| * Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .libBrad King2011-12-056-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the Windows-GNU.cmake platform file to look for Visual Studio tools matching the target ABI. Add an extra step to the link command for shared libraries and executables that export symbols and on which a new GNUtoMS property is set (initialized by the CMAKE_GNUtoMS option). Tell the GNU linker to output a module definition (.def) file listing exported symbols in addition to the GNU-format import library (.dll.a). Pass the .def file to the MS "lib" tool to construct a MS-format DLL import library (.lib). Teach the install(TARGETS) command to install the MS import library next to the GNU one. Teach the install(EXPORT) and export() command to set the IMPORTED_IMPLIB property pointing at the import library to use the import library matching the tools in the importing project.
| * Fortran: Detect pointer size in gfortran on MinGWBrad King2011-12-051-0/+3
| | | | | | | | | | | | Use __SIZEOF_POINTER__ which the GNU Fortran compiler defines at least on 64-bit MinGW. Assume default size 4 on MinGW if gfortran does not define the size.
* | TinyCC: Add compiler info for shared libs on Linux (#12605)Brad King2011-12-021-0/+4
|/ | | | | | 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.
* Fixed link bugs in BlueGeneP build.Todd Gamblin2011-08-291-10/+13
| | | | | | | - Build wasn't properly using -soname linker args, so installed libraries could depend on relative paths from the build directory. - Consolidated GNU linker args to one place in the BlueGeneP-base platform file, since ld is used by both XL and GNU toolchains on BlueGene.
* Merge topic 'fix-old-VisualAge-Fortran'David Cole2011-08-161-0/+1
|\ | | | | | | | | ad542d8 XL: Fix old VisualAge branding of Fortran compiler
| * XL: Fix old VisualAge branding of Fortran compilerBrad King2011-08-021-0/+1
| | | | | | | | | | | | | | | | Commit 6d434ee6 (Split XL compiler information files, 2009-09-30) added Platform/AIX-(XL|VisualAge)-(C|CXX|Fortran).cmake modules to support the old and new compiler branding for all languages. Add the "AIX-VisualAge-Fortran" combination that was left out accidentally.
* | Merge topic 'fix-11866-add-watcom-sys-libs'David Cole2011-08-021-0/+38
|\ \ | | | | | | | | | | | | | | | ff59716 Watcom: Use correct args for execute_process call (#11866) 80769cd Add Watcom support to InstallRequiredSystemLibraries (#11866)
| * | Watcom: Use correct args for execute_process call (#11866)David Cole2011-08-011-2/+2
| | | | | | | | | | | | | | | I botched an exec_program to execute_process translation on Friday. RESULT_VARIABLE is the correct argument to execute_process.
| * | Add Watcom support to InstallRequiredSystemLibraries (#11866)David Cole2011-07-291-0/+38
| | | | | | | | | | | | | | | | | | | | | Also adds code to determine the version of the Watcom compiler in use. Thanks to J Decker for the patch.
* | | Watcom: Add -c flag to wlib calls (#12245)David Cole2011-07-291-2/+2
|/ / | | | | | | | | | | | | Allows wlib to generate proper exports if two routines have the same spelling, but different case (like Scale and scale). Thanks to J Decker for the patch.
* | Add VisualStudio 9 and 10 generators for Itanium platformMatej Hribernik2011-06-201-2/+2
| |
* | multiarch: Set CMAKE_LIBRARY_ARCHITECTURE_REGEX for Linux|Hurd|kFreeBSDModestas Vainius2011-06-133-1/+5
| | | | | | | | | | | | | | | | | | * Fix linux CMAKE_LIBRARY_ARCHITECTURE_REGEX to support armel-linux-gnueabi. * Add CMAKE_LIBRARY_ARCHITECTURE_REGEX on kFreeBSD. * Add CMAKE_LIBRARY_ARCHITECTURE_REGEX on GNU (Hurd). Also regex is improved to support quadlets. Even if I have not seen this in the wild yet, reportedly they are possible.
* | Teach find_(library|package) about Linux multiarch (#12037)Brad King2011-06-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Implement support for multiarch as specified here: http://wiki.debian.org/Multiarch https://wiki.ubuntu.com/MultiarchSpec Detect the <arch> part of <prefix>/lib/<arch> from the implicit library search path from each compiler to set CMAKE_<lang>_LIBRARY_ARCHITECTURE. Define CMAKE_LIBRARY_ARCHITECTURE using one of these values (they should all be the same). Teach the find_library and find_package commands to search <prefix>/lib/<arch> whenever they would search <prefix>/lib.
* | Merge topic 'absoft-fortran-compiler'Brad King2011-05-242-0/+2
|\ \ | | | | | | | | | | | | | | | | | | 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
| * | Absoft: Detect implicit link libraries on Linux and MacBrad King2011-05-202-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use the "-X -v" flag to the Absoft front-end to pass "-v" to the gcc it invokes under the hood. Teach CMakeParseImplicitLinkInfo to exclude linker version lines from consideration as link lines. Fix parsing of Sun's linker search path option "-Y..." to avoid conflict with the Mac linker option "-Y<num>".
* | | Merge topic 'include-flags-response-file'Brad King2011-03-221-0/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 86cb17b Pass include directories with response files to GNU on Windows 9a0b9bc Optionally pass include directories with response files 6e8a67f Generate target-wide flags before individual build rules d099546 Factor old-style -D flags out from -I flag generation
| * | | Pass include directories with response files to GNU on WindowsBrad King2011-03-171-0/+3
| |/ / | | | | | | | | | | | | | | | | | | The GNU 4.x toolchain on MinGW (and therefore MSYS) allows compiler options to be passed via response files. Use this to pass include directory -I options. This allows the include file search path to be very long despite shell and mingw32-make command line length limits.
* | | Add ASM platform information for HP compiler on HPBrad King2011-03-022-0/+7
| | | | | | | | | | | | | | | Among other flags this sets RPATH flags correctly so that CMake knows how to treat CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH for the ASM language.
* | | Merge branch 'hp-compiler-info' into ReworkedAsmSupportBrad King2011-03-025-65/+67
|\ \ \
| * | | Factor HP compiler flags into per-platform/per-compiler filesBrad King2011-03-025-65/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move HP flags out of Platform/HP-UX.cmake into platform-specific compiler information files "Platform/HP-UX-HP-<lang>.cmake". Factor common values into "Platform/HP-UX-HP.cmake" and load it from the per-language files.
* | | | Add ASM platform information for XL compiler on AIXBrad King2011-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | Among other flags this sets RPATH flags correctly so that CMake knows how to treat CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH for the ASM language.
* | | | Merge branch 'aix-xl-platform-info' into ReworkedAsmSupportBrad King2011-03-028-15/+39
|\ \ \ \
| * | | | Move RPATH flags to AIX per-compiler information filesBrad King2011-03-023-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move RPATH flags out of Platform/AIX.cmake into platform-specific compiler information files Platform/AIX-XL and Platform/AIX-GNU. The flags need to be set for each compiler of each language.
| * | | | Factor AIX and XL compiler flags into common moduleBrad King2011-03-024-12/+32
| |/ / / | | | | | | | | | | | | | | | | Factor duplicate flag information from Platform/AIX-XL-*.cmake into Platform/AIX-XL.cmake and load it from the original files.
| * | | Merge topic 'mingw-module-definition'Brad King2011-02-241-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | 6c4b249 Fix Fortran test .def file symbol mangling 7616216 Pass .def files directly to MinGW tools (#9997)
| | * | | Pass .def files directly to MinGW tools (#9997)Brad King2011-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6a61a8a5 (Honor module .def files with MinGW tools, 2011-02-21) set CMAKE_LINK_DEF_FILE_FLAG to "-Wl," to enable passing .def files to the linker on MinGW. However, older GNU tools in the MSYS shell do not know how to translate "-Wl,/c/..." to "c:/..." and complain that the file does not exist. Instead set the flag to just "" which tells CMake it can pass the file through the front-end with no special flag.