Commit Graph

410 Commits

Author SHA1 Message Date
Bill Hoffman 4430bccc70 Change the way 32/64 bit compiles are detected with MSVC and intel makefile builds. Use the platform ID preprocessor approach. 2009-11-19 21:58:42 -05:00
Brad King 537906b467 Fix flags for Intel Fortran on Windows
We replace "/MD" with ifort-specific flags as follows:

  /MD  -> /threads /libs:dll
  /MDd -> /threads /libs:dll /dbglibs

We also enable the "/MD" equivalent for all Fortran configurations.
Previously multithreaded dll runtimes were used for release builds and
threaded static runtimes for debug builds.  For mixed Fortran C/C++
projects, this led to link warnings for Debug but not for Release.

See issue #8744.
2009-10-29 10:06:10 -04:00
Brad King ccdd3e943d Fix Intel Fortran SHARED libraries on Linux
The Intel Fortran compiler needs options '-i_dynamic' and '-nofor_main'
to create shared libraries on Linux (for at least one architecture).
2009-10-27 10:50:43 -04:00
Brad King 707d05e936 Fix Intel and MinGW Fortran DLL import libraries
We add Intel and MinGW Fortran linker options to create the import
library portion of a DLL.  This allows other binaries to link to a
Fortran DLL.

We also update the Fortran test to use a .def file to specify exports
since there is no __declspec(dllexport) markup syntax in Fortran.
2009-10-26 11:07:27 -04:00
Brad King 0653286dc6 Split Borland compiler information files
This commit re-writes Borland compiler build rules.  We split the rules
into modern <os>-<id>-<lang> information modules but share a common
macro between languages to avoid duplication.

We also address a bug in the previous rules that would build some target
types against the static Borland runtime and others against the shared
Borland runtime in one build tree.  Now we always use the shared runtime
as is the default in the rules for MS tools.
2009-10-08 11:56:07 -04:00
Bill Hoffman 0556075034 Teach intel compiler on windows to place .lib files and .pdb files. 2009-10-05 13:17:53 -04:00
Bill Hoffman 57ece74730 Teach intel compiler on windows to place .lib files and .pdb files. 2009-10-05 12:49:51 -04:00
Brad King f98a4e63fd Avoid (Unix|Windows)Paths.cmake multiple include
Block multiple inclusion because "Modules/CMakeCInformation.cmake"
includes "Platform/${CMAKE_SYSTEM_NAME}" even though the generic
module "CMakeSystemSpecificInformation.cmake" already included it.

The extra inclusion is a work-around to address issue #4772 without
intrusive platform file changes.  Once those changes are made the
work-around and these include blockers can be removed.  See issue #9656.
2009-10-05 11:47:25 -04:00
Brad King 3dc80f8d8c Add copyright notice to (Unix|Windows)Paths.cmake
This commit adds our copyright notice to these non-trivial platform
modules.
2009-10-05 11:47:05 -04:00
Brad King c118fd4c55 Find locally installed software first
This commit re-orders the search path prefix list from

  /
  /usr
  /usr/local

to

  /usr/local
  /
  /usr

so that locally-installed software is preferred.

This makes the search consistent with the Filesystem Hierarchy Standard:

  http://www.pathname.com/fhs/

See issue #9657.
2009-10-05 11:09:15 -04:00
Brad King 451d68b7e3 Support GNU/kFreeBSD
GNU/kFreeBSD = FreeBSD kernel + userspace with glibc.  Linux.cmake
doesn't contain anything too OS specific, so we can forward to it.

Here are outputs of /bin/uname on author's machine:
  uname -p ==> i386
  uname -o ==> GNU/kFreeBSD
  uname -s ==> GNU/kFreeBSD
  uname -r ==> 5.4-1-686

Patch from Modestas Vainius.  See issue #9659.
2009-10-05 10:26:50 -04:00
Brad King c513962701 Create INTERPROCEDURAL_OPTIMIZATION build feature
This commit creates target and directory properties to enable the Intel
interprocedural optimization support on Linux.  Enabling it adds the
compiler option '-ipo' and uses 'xiar' to create archives.

See issue #9615.
2009-10-02 13:52:13 -04:00
Brad King d455eeb6d7 Fix typo in Intel xiar search code
This renames the variable '_intel_xair_hints' to '_intel_xiar_hints'.
2009-10-02 13:24:32 -04:00
Brad King 6d434ee6cc Split XL compiler information files
This moves platform-independent XL compiler flags into separate
"Compiler/XL-<lang>.cmake" modules.  Platform-specific flags go in
"Platform/<os>-XL-<lang>.cmake" modules.
2009-09-30 09:37:35 -04:00
Brad King f40406ed6b Fix default install prefix on Haiku
Since Haiku does not have /usr (and therefore /usr/local), this commit
changes the default install prefix to the equivalent directory of
/boot/common.

See issue #9607.
2009-09-30 08:31:53 -04:00
Brad King 869440f75a Fix shared library creation flag for XL on Linux
See issue #9617.
2009-09-29 13:56:57 -04:00
Brad King 180c60a86f Fix check for -isysroot on OS X
Previously we checked for this flag by parsing the version number of GCC
out of 'gcc --version', but this is not reliable because the format can
vary greatly.  Now we run 'gcc -v --help' and look for '-isysroot' in
the list of options.

We also now store the result on a per-language basis in the per-compiler
info file "CMake<LANG>Compiler.cmake".  This is necessary to make it
accessible from try-compile projects so that they generate correctly.
2009-09-19 10:14:31 -04:00
Bill Hoffman 58818d5168 Add detection of gcc versions that do not support isysroot option and do not use it for them. 2009-09-18 14:22:20 -04:00
Bill Hoffman ea282284d5 Fix for bug #9466. Change the implementation of OSX arch lists. If no ARCHs are specified by the user then no flags are set. We no longer use CMAKE_OSX_ARCHITECTURES_DEFAULT. 2009-09-17 11:53:02 -04:00
Brad King b5e558e291 Fix XL C++ compiler flags on Linux
In Platform/Linux.cmake we add GNU flags as default for the platform
which breaks non-GNU compilers.  Later we should refactor these flag
files to put compiler-specific flags only in files loaded for each
compiler.  Until then this commit fixes the XL C++ compiler flags on
Linux by erasing the GNU flags.  See issue #9469.
2009-09-16 12:33:24 -04:00
Bill Hoffman 8710cc6422 Add support for embeded manifests for Intel C/C++/Fortran compilers 2009-09-01 16:33:51 -04:00
Bill Hoffman 76d059e3fb Add a module to determine if the intel linker supports manifest creation 2009-09-01 16:23:07 -04:00
Bill Hoffman e9a170b108 Move /MANIFEST flag into -E vs_link. This is so it can be used by the intel compilers without having to specifiy it in the intel compiler files 2009-09-01 14:33:26 -04:00
Brad King 2eca4dd2d1 Use Intel for Linux flags only on Linux
The commit "Split Intel compiler information files" moved some Linux
specific flags into the platform-independent Intel compiler info files.
This moves them back.
2009-09-01 13:55:13 -04:00
Brad King 9ee0f9801a Split SunPro compiler information files
This moves platform-independent SunPro compiler flags into separate
"Compiler/SunPro-<lang>.cmake" modules.  Platform-specific flags are
left untouched.
2009-08-21 10:32:26 -04:00
Brad King 2ce6a7d0fb Split Intel compiler information files
This moves platform-independent Intel compiler flags into separate
"Compiler/Intel-<lang>.cmake" modules.  Platform-specific flags are
left untouched.
2009-08-21 09:54:42 -04:00
Brad King 45313dc943 Quote the target name for Borland tlib tool
The Borland librarian tool "tlib" requires that the output target name
be quoted if it contains the character '-' (and perhaps a few others).
This commit restores the use of the TARGET_QUOTED rule variable
replacement for this purpose.  Otherwise no static library can have a
'-' in its name.

This problem was exposed by the 'Testing' test when it builds the
pcStatic library with the '-dbg' suffix.
2009-08-12 09:09:41 -04:00
Brad King 115ecc5750 Teach compiler id about VisualAge -> XL rebranding
IBM rebranded its VisualAge compiler to XL starting at version 8.0.  We
use the compiler id "XL" for newer versions and "VisualAge" for older
versions.  We now also recognize the "z/OS" compiler, which is distinct
from XL.
2009-08-07 10:13:07 -04:00
Brad King 34c6588b6e Move flag to Compiler/VisualAge-Fortran module
The CMAKE_Fortran_DEFINE_FLAG value applies to the IBM Fortran compilers
on all platforms.  This moves the setting to the platform-independent
compiler information file.
2009-08-07 10:12:34 -04:00
Brad King ee7231c03f Use NetBSD to initialize OpenBSD configuration
We teach Modules/Platform/OpenBSD.cmake to load NetBSD first since the
platforms are so similar.  This enables RPATH support on OpenBSD.
2009-08-07 09:56:20 -04:00
Brad King 071ce33ec9 ENH: Install all Modules and Templates
This removes the file-wise installation rules for Modules and Templates
and instead installs the whole directories.  This approach is much less
error-prone.  The old approach was left from before CMake had the
install(DIRECTORY) command.
2009-07-24 13:17:41 -04:00
Bill Hoffman d10d57fedd ENH: remove debug message 2009-07-15 12:43:09 -04:00
Bill Hoffman 6d80f66456 ENH: do not use /INCREMENTAL:YES with VS 10 compiler 2009-07-15 12:18:37 -04:00
Brad King 82c081ba35 BUG: Fix rpath-link flag for SunPro C++ on Linux
This teaches Modules/Platform/Linux-SunPro-CXX.cmake the -rpath-link flag.  The
SunPro C++ compiler does not have a '-Wl,' option, so we just pass the flag
directly.

This problem was exposed by the ExportImport test now that it links an
executable through the C++ compiler with the -rpath-link flag.
2009-07-13 10:40:15 -04:00
Brad King b4b52451ae BUG: Look in arch-specific HPUX implicit link dirs
On HP-UX machines some system libraries appear in architecture-specific
implicit linker search paths.  We need to add these paths to our system
library search path.  However, at the time we construct the search path
we do not know the target architecture.

A full solution requires re-organizing platform configuration files so
that the target architecture can be known when needed.  Until that
happens we can avoid the problem by searching in both 32-bit and 64-bit
implicit link directories.  By telling CMake that they are implicit
directories the generated link lines will never pass the paths, leaving
the linker free to find the library of the proper architecture even if
the find_library call finds the wrong one.
2009-06-19 17:09:36 -04:00
Bill Hoffman b6fc0a78ff ENH: put the 64 bit paths first 2009-06-15 13:17:54 -04:00
Bill Hoffman 62a634aeba ENH: add more search paths on HPUX 2009-06-15 12:39:12 -04:00
Bill Hoffman 8446a48054 ENH: use .exe on vms 2009-06-11 15:25:48 -04:00
Brad King 41b0f92c6a ENH: Enable basic OpenVMS platform support
This adds the Modules/Platform/OpenVMS.cmake platform file for OpenVMS.
We just use Unix-like rules to work with the GNV compiler front-end.

A problem with process execution currently prevents CMake link scripts
from working, so we avoid using them.
2009-06-10 13:04:04 -04:00
Brad King d2b108150f BUG: Recognize .so shared libraries on HP-UX
HP-UX uses both .sl and .so as extensions for shared libraries.  This
teaches CMake to recognize .so shared libraries so they are treated
properly during link dependency analysis.
2009-06-03 15:08:30 -04:00
Brad King a6bc1c34b1 ENH: Auto-import symbols for cygwin executables
This enables the --enable-auto-import linker flag on Cygwin when linking
executables.  It works with the old gcc 3.x compiler and is necessary
for the new gcc 4.x compiler.  See issue #9071.
2009-05-27 11:33:37 -04:00
Brad King cb788e8f6d ENH: Re-enable system include dir suppression
This creates variable CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES to
specify implicit include directories on a per-language basis.  This
replaces the previous platform-wide variable.  It is necessary to
avoid explicit specification of -I/usr/include on some compilers
(such as HP aCC) because:

  1.) It may break ordering among system include directories defined
      internally by the compiler, thus getting wrong system headers.
  2.) It tells the compiler to treat the system include directory
      as a user include directory, enabling warnings in the headers.

See issue #8598.
2009-02-25 11:44:46 -05:00
Brad King 39f8b91125 BUG: Remove implicit include dir suppression
We used to suppress generation of -I/usr/include (and on OSX also
-I/usr/local/include).  This behavior seems to cause more trouble than
it's worth, so I'm removing it until someone encounters the original
problem it fixed.  See issue #8598.
2009-02-24 15:37:09 -05:00
David Cole 553ddde8d1 BUG: Allow third component of Mac OSX sw_vers output to be empty. Mac OSX 10.5 was recently reinstalled on dashmacmini3 and pointed out the fact that this expression is faulty when the reported version is simply 10.5 rather than 10.5.x... for example. This fixes it. 2009-02-17 16:59:58 -05:00
David Cole 75fb6798ab BUG: Remove unnecessary double quotes from SET statements. Hopefully resolves the strange and difficult to diagnose (or reproduce) test failures on the dashmacmini2 Continuous dashboard. 2009-01-29 14:57:38 -05:00
Brad King 7ca59f1724 BUG: Fix OS X dylib version flags for more linkers
Some OS X linkers want a 'dylib_' prefix on the -compatiblity_version
and -current_version flags while others do not.  This passes the flags
through gcc instead since it never wants the prefix and translates the
flags for the linker correctly.
2009-01-29 13:41:58 -05:00
Bill Hoffman 9b0fe5738b BUG: fix for # 8413 add more haiku searching 2009-01-29 11:42:07 -05:00
David Cole 2cd839142d BUG: Fix careless typo that only caused test failures on clean builds... 2009-01-28 06:10:12 -05:00
David Cole 9e3705b5b8 BUG: Try to fix the universal binary continuous dashboard on dashmacmini2. I am deducing that the value of CMAKE_OSX_ARCHITECTURES_DEFAULT is responsible for the failure, although I cannot reproduce it on other builds or even by running the test via ctest interactively *on* the continuous dashboard's build... 2009-01-27 15:51:43 -05:00
David Cole 2853326e7a BUG: Only set CMAKE_OSX_DEPLOYMENT_TARGET on Mac OSX 10.4 or later. The gcc that runs on 10.3 and earlier does not understand the compiler flag it maps to... 2009-01-27 11:50:41 -05:00