summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * | | | Merge topic 'mingw-module-definition'Brad King2011-02-221-0/+1
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | 6a61a8a Honor module .def files with MinGW tools (#9997)
| | * | | Honor module .def files with MinGW tools (#9997)Brad King2011-02-211-0/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 024d05ad (Fix use of module .def files for MS tools, 2009-09-29) module .def files work for any platform that sets CMAKE_LINK_DEF_FILE_FLAG correctly. Set it in the Windows-GNU platform information file to enable support with MinGW tools. Also enable the test added by commit 0db2c850 (Test use of module .def files for MS tools, 2009-09-29) for MinGW and MSYS generators.
| * | | Strip trailing space from xcode-select output (#10723)David Cole2011-02-011-1/+2
| |/ / | | | | | | | | | | | | Otherwise, subsequent use of the output does not work as intended.
* | | Add support for the Intel compiler used for ASM under WindowsAlex Neundorf2011-03-021-0/+2
|/ / | | | | | | Alex
* | Factor SCO compiler info out of platform file (#11700)Brad King2011-01-171-3/+0
| | | | | | | | | | Move these flags out of the SCO_SV platform file so that other compilers may be used on that platform without interference.
* | Merge topic 'add_support_for_windres'Brad King2011-01-044-1/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | 971692c Build enable_language command during bootstrap 960ace1 Add testing for windows resources for mingw/msys/cygwin and remove for watcom. 060d6e8 Add support for windres to cygwin. b2f308c Add support for windows resources with mingw/msys.
| * | Add support for windres to cygwin.Bill Hoffman2010-12-232-1/+3
| | |
| * | Add support for windows resources with mingw/msys.Bill Hoffman2010-12-232-0/+3
| | |
* | | Enable resource building with the intel compiler on windows.Bill Hoffman2011-01-031-0/+4
| | |
* | | Merge topic 'mac-headerpad_max_install_names-passthru'Brad King2010-12-282-6/+6
|\ \ \ | | | | | | | | | | | | | | | | e498527 Pass Mac linker flag through all compilers with -Wl,
| * | | Pass Mac linker flag through all compilers with -Wl,Brad King2010-12-222-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Mac linker defines flag -headerpad_max_install_names but not all front-ends recognize the flag and pass it through (many did in the past, such as the Apple port of GCC). Use the -Wl, option prefix to tell front-ends to pass it through without trying to interpret it.
* | | | Merge topic 'cygwin'Brad King2010-12-211-1/+45
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 85c0a69 Cygwin: Do not define 'WIN32' (#10122) 62c6d2d Merge branch 'cmake_--system-information_min-version' into cygwin 72db20f Merge branch 'tests-if-CYGWIN' into cygwin 5adef16 Merge branch 'cygwin-module-prefix' into cygwin cbc3258 Merge branch 'try-compile-min-version' into cygwin
| * | | | Cygwin: Do not define 'WIN32' (#10122)Brad King2010-12-171-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of Cygwin's goals is to build projects using the POSIX API with no Windows awareness. Many CMake-built projects have been written to test for UNIX and WIN32 but not CYGWIN. The preferred behavior under Cygwin in such projects is to take the UNIX path but not the WIN32 path. Unfortunately this change is BACKWARDS INCOMPATIBLE for Cygwin-aware CMake projects! Some projects that previously built under Cygwin and are Cygwin-aware when they test for WIN32 may now behave differently. Eventually these projects will need to be updated, but to help users build them in the meantime we print a warning about the change in behavior. Furthermore, one may set CMAKE_LEGACY_CYGWIN_WIN32 to request old behavior during the transition. Normally we avoid backwards incompatible changes, but we make an exception in this case for a few reasons: (1) This behavior is preferred by Cygwin's design goals. (2) A warning provides a clear path forward for everyone who may see incompatible behavior, and CMAKE_LEGACY_CYGWIN_WIN32 provides a compatibility option. The warning and compatibility option both disappear when the minimum required version of CMake in a project is sufficiently new, so this issue will simply go away over time as projects are updated to account for the change. (3) The fixes required to update projects are fairly insignificant. Furthermore, the Cygwin distribution has no releases itself so project versions that predate said fixes tend to be difficult to build anyway. (4) This change enables many CMake-built projects that did not previously build under Cygwin to work out-of-the-box. From bug #10122: "I have built over 120 different source packages with (my patched) CMake, including most of KDE4, and have found that NOT defining WIN32 on Cygwin is much more accurate." -- Yaakov Selkowitz A fully compatible change would require patches on top of these project releases for Cygwin even though they otherwise need not be aware of it. (5) Yaakov has been maintaining a fork of CMake with this change for the Cygwin Ports distribution. It works well in practice. By accepting the change in upstream CMake we avoid confusion between the versions. CMake itself builds without WIN32 defined on Cygwin. Simply disable CMAKE_LEGACY_CYGWIN_WIN32 explicitly in our own CMakeLists.txt file.
* | | | | Merge topic 'gnu-compiler-windows-info'Brad King2010-12-211-1/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | e8d380f Remove unused old-style g++ info file
| * | | | | Remove unused old-style g++ info fileBrad King2010-12-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit aff31479 (Modernize GNU compiler info on Windows, 2009-12-02) the file Modules/Platform/Windows-g++.cmake has been unused. It just includes the non-existent Modules/Platform/Windows-gcc.cmake so remove it outright.
* | | | | | Merge topic 'intel-compiler-windows-info'Brad King2010-12-216-189/+104
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd43636 Modernize Intel compiler info on Windows 58c73c4 Detect Fortran target architecture on Windows
| * | | | | | Modernize Intel compiler info on WindowsBrad King2010-12-166-192/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves Intel compiler info on Windows into new-style modules Platform/Windows-Intel-<lang>.cmake using language-independent helper module Platform/Windows-Intel.cmake to define macros consolidating the information.
| * | | | | | Detect Fortran target architecture on WindowsBrad King2010-12-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4430bccc (Change the way 32/64 bit compiles are detected with MSVC and intel, 2009-11-19) added detection of the target processor to C and CXX language builds with MS and Intel tools. Do the same for Intel Fortran for Windows (ifort). Use /machine:<arch> to link executables.