Commit Graph

632 Commits

Author SHA1 Message Date
Brad King 9f46051490 Merge topic 'cygwin'
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
2010-12-21 14:06:32 -05:00
Brad King 98d9611ffa Merge topic 'gnu-compiler-windows-info'
e8d380f Remove unused old-style g++ info file
2010-12-21 13:58:46 -05:00
Brad King 6f2482aa97 Merge topic 'intel-compiler-windows-info'
cd43636 Modernize Intel compiler info on Windows
58c73c4 Detect Fortran target architecture on Windows
2010-12-21 13:58:39 -05:00
Brad King 92631c14d9 Merge topic 'intel-config-definitions'
3fb088e Make Intel defines consistent with MSVC on Windows (#9904)
2010-12-21 13:58:29 -05:00
Brad King 85c0a69a92 Cygwin: Do not define 'WIN32' (#10122)
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.
2010-12-17 14:19:58 -05:00
Brad King 3a6c480908 Merge topic 'cygwin-module-prefix'
1dcc977 Cygwin: Use 'cyg' prefix for module DLLs (#10122)
2010-12-16 14:00:06 -05:00
Brad King 72163de0a5 Merge topic 'NAG-Fortran'
09d1c10 FortranCInterface: Recognize NAG Fortran module symbols
af2ad90 Add NAG Fortran compiler information files
24cc3d4 Recognize the NAG Fortran compiler
83892c4 Allow Fortran platform files to set empty values
fe3f878 Detect object files in implicit link information
2010-12-16 13:59:52 -05:00
Brad King e8d380f90d Remove unused old-style g++ info file
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.
2010-12-16 10:09:29 -05:00
Brad King cd43636c95 Modernize Intel compiler info on Windows
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.
2010-12-16 09:50:05 -05:00
Brad King 58c73c43f6 Detect Fortran target architecture on Windows
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.
2010-12-16 09:33:06 -05:00
Brad King 3fb088e521 Make Intel defines consistent with MSVC on Windows (#9904)
Add /DWIN32 and /D_WINDOWS to default config-independent flags.
Add /D[_N]DEBUG to default flags for each configuration.
2010-12-15 17:56:24 -05:00
Yaakov Selkowitz 1dcc9777a7 Cygwin: Use 'cyg' prefix for module DLLs (#10122)
Cygwin now uses the prefix 'cyg' for plugin DLLs instead of 'lib'.
2010-12-13 14:21:07 -05:00
Brad King af2ad90991 Add NAG Fortran compiler information files
On Linux the NAG Fortran compiler uses gcc under the hood to link.  Use
"-Wl,-v" to pass "-v" to the underlying gcc compiler to get verbose link
output.  Detect the NAG Fortran directory (using -dryrun) and then honor
object files in the directory referenced in the implicit link line.
Pass real linker options with "-Wl,-Xlinker,".  The -Wl, gets through
the NAG front-end and the -Xlinker gets through the gcc front-end.
2010-12-09 18:12:34 -05:00
Bill Hoffman cddcad5102 Fix incremental linking for VS2010 with nmake or make.
VS2010 deprecated /INCREMENTAL:YES.  This change makes
/INCREMENTAL the flag to use for incremental linking with
VS2010.
2010-12-09 13:32:48 -05:00
Brad King eda7841fd2 Pass Mac linker flag through PGI compiler using "-Wl,"
The Mac linker defines -headerpad_max_install_names and the GCC
front-end passes this flag through.  The PGI compiler does not know
about this flag, so we must use -Wl,-headerpad_max_install_names to pass
it to the linker instead.
2010-11-22 08:43:13 -05:00
Brad King 14d5ea7438 Merge topic 'mingw-long-object-lists'
5f05a3c MinGW: Support long object file lists
2d9bb33 Evaluate <OBJECT_DIR> rule variable for executables
2010-09-22 13:52:24 -04:00
Brad King b7539e3832 Merge topic 'compaq-fortran-moddir-flag'
c04af06 Add module-dir flag for Compaq Visual Fortran (#11248)
2010-09-21 10:41:02 -04:00
Brad King c04af06009 Add module-dir flag for Compaq Visual Fortran (#11248)
This compiler uses "-module:" to specify where modules should be placed.
2010-09-20 09:53:45 -04:00
Brad King 5f05a3c25e MinGW: Support long object file lists
Use a combination of response files and the archiver to support long
object file lists that do not fit in the Windows command-line length
limit.  This can work only with GCC >= 4 because the MinGW GCC 3.x
front-ends do not support response-file syntax.
2010-09-17 09:25:36 -04:00
Brad King 048c905f05 Merge topic 'hpux-required-runtime-path-10571'
11a917d HP-UX: Always add /usr/lib to rpath (#10571)
2010-09-08 11:08:13 -04:00
Brad King 02e3f42a6a Merge topic 'watcom_fixes'
3b7da53 Fix for bug 10388, fix various default flags.
2010-09-08 11:08:01 -04:00
Brad King 11a917d04e HP-UX: Always add /usr/lib to rpath (#10571)
Set CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH in the HP-UX platform file to
tell CMake to pass -Wl,+b,/usr/lib no matter whether RPATH is enabled or
not.  This corrects the behavior of -Wl,+nodefaultrpath to look in this
default library path as documented.
2010-09-07 08:44:19 -04:00
Bill Hoffman 3b7da5396d Fix for bug 10388, fix various default flags. 2010-09-02 14:35:17 -04:00
Brad King eae45a67e7 Search MacPorts /opt/local prefix on Mac
Include this prefix in CMAKE_SYSTEM_PREFIX_PATH so that it will be used
for all find* commands.  Previously only find_library and find_path
would look under /opt/local/lib and /opt/local/include, respectively.
2010-09-01 08:50:51 -04:00
Brad King da6fc97f19 Merge topic 'tg/BlueGeneP'
7083c81 Add platform files for BlueGene/P systems
2010-08-17 15:14:07 -04:00
Brad King 32ebe21ad8 Merge topic 'intel-response-files'
4b1e5f0 Pass objects to Intel linker using a response file
2010-08-17 15:09:12 -04:00
Todd Gamblin 7083c81db7 Add platform files for BlueGene/P systems
BlueGeneP-base:    Internal base shared by static and dynamic files
BlueGeneP-static:  Platform file for all-static builds
BlueGeneP-dynamic: Platform file for "default" dynamic builds
2010-08-13 12:17:57 -04:00
Brad King cc31f89c17 Merge topic 'module-header-spelling'
2cde67a Modules: Fix spelling 'To distributed' -> 'To distribute'
2010-08-10 14:33:47 -04:00
Brad King 4b432328a2 Merge topic 'mingw-response-files'
b03f4ec No response files with GNU ld <= 2.16 (#10913)
2010-08-10 14:33:01 -04:00
Arjen Verweij 4b1e5f0152 Pass objects to Intel linker using a response file
Use response files for C and CXX languages with the Intel compiler on
Windows.  We already used them for Fortran.  This enables creation of
libraries and executables with a very large number of object files.
2010-08-10 09:34:12 -04:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King b03f4ec09d No response files with GNU ld <= 2.16 (#10913)
Older GNU ld does not support the @FILE syntax for response files.
Check the ld version on MinGW and MSYS before enabling the syntax.
2010-08-06 09:34:53 -04:00
Pino Toscano 90467d6294 GNU/Hurd platform support fixes (#9873)
Define use of -rpath-link and --export-dynamic flags.  The toolchain on
Hurd is GNU-based so we can use the values from Linux.
2010-07-29 10:43:03 -04:00
Brad King 5444bd6ca3 Merge branch 'tru64-make-includes' 2010-06-15 14:03:26 -04:00
Brad King d9b2da139d Merge branch 'mingw-response-files' 2010-06-15 13:58:58 -04:00
Brad King c592df8377 Tru64: Use full-path include directives in Makefiles (#10569)
Tru64's make(1) resolves relative paths in "include" directives with
respect to the includer.  This is inconsistent with all other known make
tools.  Note that this make tool treats the path literally so we cannot
use our standard FULL path code which escapes spaces.  Instead qualify
the paths with $(CMAKE_BINARY_DIR) to avoid the problem.
2010-06-14 13:06:39 -04:00
Brad King 6f9bb934d4 Merge branch 'sunCC-5.11-rpath-link' 2010-06-08 09:23:11 -04:00
Brad King 6cf1ccd632 Merge branch 'per-config-link-flags' 2010-06-07 14:36:28 -04:00
Brad King ec66c9db8c Merge branch 'cygwin-exe-export-all' 2010-06-07 14:30:21 -04:00
Brad King 693f98c105 Fix rpath-link flag for SunPro C++ 5.11 on Linux
Commit 82c081ba (Fix rpath-link flag for SunPro C++ on Linux,
2009-07-13) taught CMake to pass '-rpath-link' because SunPro C++ 5.9
does not support '-Wl,'.  Now SunPro C++ 5.11 does not recognize the
option without using '-Wl,'.  Detect whether to use '-Wl,' based on the
output of "sunCC -flags".
2010-06-07 10:15:58 -04:00
Brad King 9622fe5e9a Watcom: Use LINK_FLAGS and STATIC_LIBRARY_FLAGS
Add the <LINK_FLAGS> rule variable in Watcom command lines.
2010-06-01 14:40:28 -04:00
Yaakov Selkowitz cd3a4f0025 Cygwin: Export all symbols with ENABLE_EXPORTS
The ENABLE_EXPORTS property exports all symbols from executables on
UNIX-like platforms, typically for use by plugins.  Honor this behavior
on Cygwin.  See issue #10122.
2010-05-27 14:41:38 -04:00
Brad King 571dc74891 Recognize Clang C and C++ compilers (see #10693)
Map to the platform and compiler information for GNU because the
compilers are command-line compatible for common operations.  Later we
can add Clang-specific features as necessary.  We honor the preferred
capitalization is "Clang", not the common mis-spelling "CLang".
2010-05-17 14:11:20 -04:00
David Cole e0acb6ca5f Fix Windows-cl.cmake so that at most one MSVC** variable is defined.
The expectation of users of the MSVC60, MSVC70, MSVC71, MSVC80, MSVC90
and the new MSVC10 variables is that at most one of them will be set
for any given build tree. This change enforces that expectation for
build trees using Makefile generators. It also fixes the one mismatch
in that expectation to be found in the Visual Studio generator world:
previously, the VS 7.1 generator would set *both* MSVC70 and MSVC71;
now, it only sets MSVC71.

With these changes, user expectations are now met, and the recently
introduced CheckCompilerRelatedVariables test should pass everywhere.
2010-05-05 17:08:06 -04:00
David Cole 2938263636 Fix missing set of MSVC10 and add CheckCompilerRelatedVariables test. 2010-04-30 00:46:24 -04:00
Alex Neundorf d827b9f21d -add basic search directories for the "Generic" platform
As reported on the mailing list, find_path/file/library/program() basically don't work
at all if CMAKE_FIND_ROOT_PATH is set and searching in the host system directories
is disabled. This patch adds /include, /lib and /bin to the search directories, so they
will be appended to CMAKE_FIND_ROOT_PATH so this will work for the "Generic" platform (embedded
systems without OS)

Alex
2010-04-14 22:09:19 +02:00
Chuck Atkins e750761857 OpenBSD: Work-around static/runtime linker inconsistency
Detect the runtime linker's search path and add to the compile time
linker's search path.  This is needed because OpenBSD's static linker
does not search for shared library dependencies in the same places as
the runtime linker.
2010-03-26 09:33:28 -04:00
Bill Hoffman 570ceeb4a4 Teach CMake how to work with G95 on mingw. 2010-03-23 11:32:40 -04:00
Brad King 00477de1c9 Use response file for objects on MinGW and MSYS
Windows command lines are limited to about 32K so we need to use
response files for linking very large lists of object files.

See issue #10401.
2010-03-11 09:46:18 -05:00
Brad King 4eba05de42 Suppress GNU flag -fPIC on Windows
Commit "Modernize GNU compiler info on Windows" (2009-12-02) reorganized
GNU flags on Windows but let -fPIC slip through for compilation of
objects in shared libraries.  While this flag is valid on most GNU
compiler platforms we need to suppress it in Windows-GNU.cmake just as
we already do in CYGWIN-GNU.cmake.
2010-02-19 08:23:31 -05:00
David Cole 6ee87b2e5c Fix issue #10155 - default value of CMAKE_OSX_DEPLOYMENT_TARGET should always be the empty string. When the value of CMAKE_OSX_DEPLOYMENT_TARGET is the empty string, the -mmacosx-version-min flag should not show up on the compiler command line. The logic for selecting default value of CMAKE_OSX_SYSROOT is orthogonal to and independent of the value of the deployment target. The default value for CMAKE_OSX_SYSROOT is the SDK that corresponds to the current version of Mac OSX on which cmake is running. 2010-01-29 11:56:35 -05:00
Brad King 3684f62340 Do not export all symbols from DLLs on Cygwin
In commit "use export all symbols on cygwin" (2003-01-21) we started
passing -Wl,--export-all-symbols when linking shared libraries.  Now
cygwin exports all symbols automatically if no symbols are explicitly
exported.  When symbols are explicitly exported we want to honor that
narrow interface.  Therefore this flag should not be passed.

Change based on patch from issue #10122.
2010-01-21 15:03:32 -05:00
Brad King 41024b006b Fix CMAKE_DL_LIBS on Cygwin
The variable should contain the name of a library needed to link the
symbol equivalent to dlopen.  On Cygwin no special library is needed,
and certainly not "gdi32".

Change based on patch from issue #10122.
2010-01-21 15:03:17 -05:00
Brad King 1804c6bfe2 Add PathScale shared library flags on Linux
We add platform-specific compiler information files

  Platform/Linux-PathScale-<lang>.cmake

to enable -fPIC and -shared flags for shared libraries.
2010-01-21 09:09:27 -05:00
Brad King e46e8fb937 Do not find cyg*.dll on Cygwin
While Cygwin supports linking directly to .dll files, the behavior is
now discouraged.  All Cygwin packages now provide import libraries of
the form lib*.dll.a and CMake has built the import libraries for years.

We believe it is now safe to stop explicitly searching for .dll files
because their import libraries will always be available when the
corresponding header files are available.  Users can always set
find_library cache entries to point at a .dll file by hand if they
really must use one.

Change based on patch from issue #10122.
2010-01-13 14:12:29 -05:00
Brad King 12dcf9e4fb Search prefix /usr before root prefix /
Commit "Find locally installed software first" made /usr/local the first
prefix searched to be consistent with the Filesystem Hierarchy Standard:

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

The standard also implies that the root prefix "/" should not have any
package or development files.  The "/bin" and "/lib" directories should
have only minimal contents to boot the system.  No "/include" ever
exists.  This commit re-orders the search path prefix list from

  /usr/local
  /
  /usr

to

  /usr/local
  /usr
  /

to prefer package and development files over low-level system files.
See issue #10136.

On Cygwin /usr/lib == /lib and /usr/bin == /bin.  This change also makes
search results report locations as "/usr/..." instead of "/lib/...".
See issue #10122.
2010-01-13 13:36:03 -05:00
Brad King 9ef3f8e820 Restore -rdynamic in Linux build rules
The commit "Drop -rdynamic from Linux build rules" removed default use
of the flag on Linux.  It was expected to be compatible because any
project using plugins should set ENABLE_EXPORTS on its executables to
export their symbols for use by the plugins in a cross-platform way.
However, it is possible to build without ENABLE_EXPORTS and load plugins
that do not link to any symbols from the executable explicitly.  These
plugins may need to see RTTI and other executable symbols needed by the
language implementation.  Executables using such plugins were broken by
the change.

If we want to remove the -rdynamic flag in the future we should do so in
a compatible way.  At that time we should also remove equivalent flags
on other platforms (like -bexpall on AIX).  We will either need a policy
or an explicit API to disable symbol exports on executables.

The primary purpose of the above-mentioned commit was to avoid passing
the -rdynamic flag to compilers on Linux that do not support it.  In
this commit we restore the flag but only on GNU and Intel compilers
which are known to support it.

See issue #9985.
2010-01-13 08:13:46 -05:00
Brad King 7b106a6fb3 Create Linux GNU compiler flag consolidation macro
This macro will be used for GNU compiler flags that are specific to
Linux but not to any language.
2010-01-13 08:13:19 -05:00
David Cole 8d88de4b4a Fix issue with SDK not matching initial deployment target chosen by setting the MACOSX_DEPLOYMENT_TARGET environment variable. The problem was that we were setting the initial SDK value based on our own internal default value for deplyment target rather than the user's environment variable choice. The solution is to base the default value for the SDK on the deployment target variable after initially caching the deployment target... Every time I'm in this code I think I leave it cleaner, only to be proven otherwise. Let's give this one a whirl. Bleh. 2009-12-23 12:08:25 -05:00
David Cole a830786c44 Fix issues #9959 and #9898 - do not set CMAKE_OSX_DEPLOYMENT_TARGET if CMAKE_OSX_SYSROOT is set.
Default to "" for CMAKE_OSX_DEPLOYMENT_TARGET if CMAKE_OSX_SYSROOT is set. Also, add new error message to detect the case where there is a deployment target, but no SDK has been set. Fix args to STRING REGEX call so that it works even if _sdk_path variable is empty inside sanity check function.
2009-12-15 11:10:15 -05:00
Brad King af14f1f2c3 Remove GNU-specific flags from Linux.cmake
We remove the shared library compile/link flags "-fPIC" and "-shared"
because they are not provided by all compilers on Linux.  This allows us
to drop code from the Linux-XL-*.cmake files that erases the bad flags.
All other supported compilers already provide their correct flags for
Linux in their own platform information files.
2009-12-04 10:22:30 -05:00
Brad King c106cb2e2f Generalize support for Portland Group Compiler
We factor flags from Platform/Linux-PGI-Fortran.cmake into language
independent helper modules

  Compiler/PGI.cmake
  Platform/Linux-PGI.cmake

and invoke the macros from

  Compiler/PGI-<lang>.cmake
  Platform/Linux-PGI-<lang>.cmake

This enables general support for the PGI compilers.
2009-12-04 10:21:57 -05:00
Brad King 2d948e94bf Remove duplicate info from Linux SunPro info files
The CMAKE_DL_LIBS variable is set platform-wide by Linux.cmake so we do
not need to duplicate it in Linux-SunPro-<lang>.cmake files.
2009-12-04 09:20:59 -05:00
Brad King e208397976 Consolidate Linux Intel compiler information
We consolidate duplicate code from Platform/Linux-Intel-<lang>.cmake
files into a macro defined in Platform/Linux-Intel.cmake.
2009-12-04 09:20:24 -05:00
Brad King 77ded39645 Fix GNU C and Fortran flags on SunOS
The commit "Split GNU compiler information files" intended to move GNU
flags from the platform-wide Platform/SunOS.cmake module into

  Platform/SunOS-GNU-<lang>.cmake

using a helper module Platform/SunOS-GNU.cmake to consolidate flags.
However, it accidentally put Fortran flags in the C language module and
left out the Fortran module altogether.  This fixes those mistakes.
2009-12-04 08:51:46 -05:00
Brad King 3e37ca8ecc Move GNU flags from SunOS.cmake to SunOS-GNU.cmake
The GNU-specific link-type flags do not belong in the platform-wide
file.
2009-12-02 16:58:52 -05:00
Brad King 4d72006bd6 Reduce duplication in Platform/<os>.cmake files
Several platform-wide linker flag variables are defined in
Modules/Platform/<os>.cmake files for C and then copied by the
Modules/CMake<lang>Information.cmake file for each language.
We now use this approach for the variables

  CMAKE_EXE_EXPORTS_${lang}_FLAG
  CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG
  CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS

to avoid duplication for multiple languages in each platform file.
2009-12-02 15:17:53 -05:00
Brad King 58d6057a52 Fix OS X dylib and module GNU flags
The commit "Split GNU compiler information files" broke the settings of

  CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS
  CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS

and started using just "-shared" for them.  This worked when tested on newer
Mac machines, but older ones really need "-dynamiclib" and "-bundle" (which are
the documented flags anyway).
2009-12-02 15:09:03 -05:00
Brad King aff3147917 Modernize GNU compiler info on Windows
This moves GNU compiler info on Windows into new-style modules

  Platform/Windows-GNU-<lang>.cmake

using language-independent helper module

  Platform/Windows-GNU.cmake

to define macros consolidating the information.
2009-12-02 11:27:59 -05:00
Brad King e28c16b482 Split GNU compiler information files
This moves GNU compiler flags into new-style modules

  Compiler/GNU-<lang>.cmake
  Platform/<os>-GNU-<lang>.cmake

We use language-independent helper modules

  Compiler/GNU.cmake
  Platform/<os>-GNU.cmake

to define macros consolidating the information.
2009-12-02 09:52:00 -05:00
Brad King 1f06c33f8e Drop -rdynamic from Linux build rules
This is a GNU-specific option that should not be specified for all
compilers on Linux.  It tells the GNU compiler to pass -export-dynamic
to the linker to export symbols from executables for use by plugins.
Since we provide the ENABLE_EXPORTS target property to do the same thing
in a cross-platform way, there is no need to pass -rdynamic always.

Since the option is not useful for GNU tools and breaks other tools on
Linux we simply remove it from CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS.
This also allows us to stop setting the variable in other Linux compiler
files just to erase the bad flag.

See issue #9985.
2009-12-01 14:25:21 -05:00
Brad King 4f43c1f276 Singly-quote target names for Watcom linker
The Watcom tools do their own command-line parsing and do not accept
double-quotes.  Instead we single-quote the target output name when
invoking wlink and other Watcom tools.  This fixes support for spaces in
the target output directory path when it is not under the build tree.
2009-11-30 11:16:24 -05:00
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
David Cole 1dee719cdc BUG: Fix issue #6195. Add CMAKE_OSX_DEPLOYMENT_TARGET cache variable to specify the target deployment runtime OS version of the built executables on Mac OSX. Thanks to Mike Jackson for the patch. 2009-01-27 10:30:55 -05:00
David Cole b640257884 BUG: Fix install_name_tool problem on the Mac when a PROJECT(... NONE) is followed by multiple calls to ENABLE_LANGUAGE. Use find_program to set the CMAKE_INSTALL_NAME_TOOL variable so it gets saved in the cache as a full path to the install_name_tool executable rather than a simple set which eventually goes out of scope. 2008-12-30 09:11:54 -05:00
Brad King d5c1191349 ENH: Use 32-bit and 64-bit Program Files folders
On 64-bit Windows there may be two Program Files folders, one for 32-bit
binaries and one for 64-bit binaries.  When we compute
CMAKE_SYSTEM_PREFIX_PATH we should put both folders in the path.
2008-12-17 09:23:30 -05:00
Bill Hoffman c553c29e9f ENH: fix curses on haiku 2008-12-03 16:13:17 -05:00
Bill Hoffman 619151d014 ENH: fix fortran flags on g77 windows 2008-11-11 13:58:55 -05:00
Bill Hoffman a4f04d5817 ENH: fix fortran flags on sun 2008-11-11 13:58:31 -05:00
Bill Hoffman 9d9582ffef ENH: fix problem where rc language recursively included itself because CMAKE_BASE_NAME was used from c compiler, do the same fix for other uses of CMAKE_BASE_NAME 2008-10-14 16:07:11 -04:00
Bill Hoffman 9430c3f335 ENH: better error message for mis-configured nmake environment 2008-10-14 11:42:45 -04:00
Bill Hoffman 9d6cec87e0 BUG: fix for 5705, link in standard libs for mingw 2008-10-02 12:11:02 -04:00
Bill Hoffman 6a1a1b632d BUG: fix for bug 4772, enable_language should now work on linux with correct flags 2008-10-01 13:24:51 -04:00
Bill Hoffman cf5609221b BUG: fix for 7704 2008-09-25 17:02:06 -04:00
Brad King 434a99bbeb ENH: Teach find_library to find OpenBSD-style libs
OpenBSD shared libraries use a ".so.<major>.<minor>" extension and do
not have a symlink with just a ".so" extension.  Its "ld" is capable of
finding the library with the best version.  This change adds support for
finding such libraries.  See issue #3470.
2008-09-22 11:08:17 -04:00
Bill Hoffman 64fc597de2 ENH: add initial support for HAIKU OS from bug# 7425 2008-09-15 17:53:28 -04:00
Bill Hoffman 3c96dc6086 BUG: make sure the intel compiler uses the intel linker 2008-09-02 14:47:41 -04:00
Bill Hoffman 736da84b4f BUG: fix for 6710 CMAKE_OSX_SYSROOT should be a PATH 2008-08-19 14:23:38 -04:00
Bill Hoffman 0ea69917d9 ENH: add platform file for bounds checker 2008-08-15 15:07:56 -04:00
Brad King 397336a244 ENH: Add preprocessor and assembly rules for Intel 2008-08-06 16:05:01 -04:00
Brad King 4e5e3161a3 BUG: Fix dylib versioning flags for old OSX.
- ld flags -dylib_compatibility_version and -dylib_current_version
    are libtool flags -compatibility_version and -current_version
  - OSX 10.3 does not like the dylib_ prefixes.
2008-07-09 17:45:45 -04:00
Brad King 0d54001276 ENH: Set version info for shared libs on OSX.
- Map SOVERSION major.minor.patch to compatibility_version
  - Map VERSION major.minor.patch to current_version
  - See issue #4383.
2008-07-09 10:09:46 -04:00
Bill Hoffman 6b12da90ea ENH: undo optional because we need it 2008-06-24 16:47:31 -04:00
Bill Hoffman 32d4be94a9 ENH: rc is not so optional at least with 2005 and newer, as it is used to embed the manifest files 2008-06-24 15:50:17 -04:00
Bill Hoffman 2b21d8e16b ENH: make rc optional 2008-06-23 13:37:58 -04:00
Brad King 1203774d52 ENH: Add basic flags for Portland Group fortran compiler. 2008-05-17 17:35:35 -04:00
Brad King 5515515086 ENH: Add Linux-PGI-Fortran platform file to support the Portland Group Fortran compiler (PGI). 2008-05-16 17:56:43 -04:00
Brad King a56e04593a ENH: Make /opt/SUNWspro/lib, /opt/SUNWspro/prod/lib, and /usr/ccs/lib implicit link directories on the Sun when using the SunPro compiler. 2008-04-30 14:13:11 -04:00
Bill Hoffman e1b2fb4c75 ENH: add more fortran flags 2008-04-30 11:33:54 -04:00
Bill Hoffman d4fdbeed64 ENH: allow users to set sysroot 2008-04-28 13:53:14 -04:00
Bill Hoffman 7c6c8fc365 ENH: remove c flags from cxx config file 2008-04-25 09:49:42 -04:00
Bill Hoffman 764229b5a2 ENH: rename Linux-ifort to Linux-Intel-Fortran 2008-04-25 09:43:01 -04:00
Bill Hoffman 0bc5e03dce ENH: do not force the intel ar on C from CXX 2008-04-24 22:00:08 -04:00
Bill Hoffman a3e1dde968 ENH: support intel compiler on linux 2008-04-24 21:54:13 -04:00
Bill Hoffman 20e9be907f ENH: use xiar for the intel compiler 2008-04-21 18:26:09 -04:00
David Cole b03c246a00 ENH: Add Intel compiler module files for the Mac. Thanks to Mike Jackson for contributing. 2008-03-31 08:04:12 -04:00
Brad King 9f54e1f043 ENH: Patch from Maik to add per-configuration default flags to GCC and Intel Fortran compilers on Linux. 2008-03-17 08:55:05 -04:00
Bill Hoffman ed795d283f ENH: fix c flags for 2003 free command line tools 2008-03-13 16:42:31 -04:00
Brad King 230c8972f7 BUG: Do not place $(CMAKE_COMMAND) in link scripts. 2008-03-01 09:08:34 -05:00
Brad King dfe2ea6406 ENH: Handle large object file lists on some platforms
- Use a response file when enabled by
    CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_OBJECTS
  - Enable for C and CXX with cl (MSVC)
  - Enable for Fortran with ifort (Intel Fortran)
2008-02-27 17:10:45 -05:00
Brad King e840a9dff3 BUG: Apply patch from bug#6445. Add preprocessor definitions to assembly and preprocessing build rules. 2008-02-27 14:31:09 -05:00
Brad King 58480575a3 ENH: Simplify make build rule generation by removing use of OBJECTS_QUOTED and TARGET_QUOTED rule variables and updating the generation of OBJECTS to always use the newer cmLocalGenerator::Convert method. 2008-02-24 14:05:21 -05:00
Brad King fd37a6ec3d ENH: Better linker search path computation.
- Use linker search path -L.. -lfoo for lib w/out soname
    when platform sets CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME
  - Rename cmOrderRuntimeDirectories to cmOrderDirectories
    and generalize it for both soname constraints and link
    library constraints
  - Use cmOrderDirectories to order -L directories based
    on all needed constraints
  - Avoid processing implicit link directories
  - For CMAKE_OLD_LINK_PATHS add constraints from libs
    producing them to produce old ordering
2008-02-21 11:41:11 -05:00
Brad King 068d0d9b91 BUG: Fix passing of nodefaultrpath flag to linker through c++ compiler. 2008-02-18 12:01:41 -05:00
Brad King ed76198b84 ENH: Cleanup building of OS X bundle content
- Fixes repeated rebuild of bundles by Makefile generators
 - Add special rules to copy sources to their
   MACOSX_PACKAGE_LOCATION bundle directory
 - Remove MacOSX_Content language hack
   - Remove EXTRA_CONTENT property
   - Remove MACOSX_CONTENT
   - Remove corresponding special cases in object names
2008-02-15 11:22:23 -05:00
Brad King f0cee3fe4c ENH: Fix eCos.cmake to not require a forced compiler
- Search for libtarget.a explicitly
  - Do not complain about compiler id during try-compile
2008-02-11 17:01:02 -05:00
Brad King 5a834b0bb0 ENH: Remove CMAKE_ANSI_CFLAGS variable and instead always add ansi flags to CMAKE_C_COMPILE_OBJECT. We should not require every project to reference CMAKE_ANSI_CFLAGS. 2008-02-11 15:31:32 -05:00
Brad King 847c8403fe BUG: Added TARGET_ARCHIVES_MAY_BE_SHARED_LIBS global property to help compute proper rpath information on AIX when shared libraries have names like "libfoo.a". 2008-02-04 15:22:10 -05:00
Brad King f2dfa8925b ENH: Enable dependent library search paths on more platforms
- NetBSD needs dependent library paths in -rpath-link option.
  - kFreeBSD needs dependent library paths in -rpath-link option.
2008-02-02 08:58:53 -05:00
Brad King f49ec94e9f ENH: Enable dependent library search paths on more platforms
- HP-UX needs dependent library paths as -L options.
  - IRIX needs dependent library paths as -L options.
  - Sun needs dependent library paths as -L options.
  - FreeBSD needs dependent library paths in -rpath-link option.
2008-02-01 09:57:41 -05:00
Brad King 82fcaebe28 ENH: Pass dependent library search path to linker on some platforms.
- Move runtime path ordering out of cmComputeLinkInformation
    into its own class cmOrderRuntimeDirectories.
  - Create an instance of cmOrderRuntimeDirectories for runtime
    path ordering and another instance for dependent library
    path ordering.
  - Replace CMAKE_DEPENDENT_SHARED_LIBRARY_MODE with explicit
    CMAKE_LINK_DEPENDENT_LIBRARY_FILES boolean.
  - Create CMAKE_LINK_DEPENDENT_LIBRARY_DIRS boolean.
  - Create variables to specify -rpath-link flags:
      CMAKE_SHARED_LIBRARY_RPATH_LINK_<LANG>_FLAG
      CMAKE_EXECUTABLE_RPATH_LINK_<LANG>_FLAG
  - Enable -rpath-link flag on Linux and QNX.
  - Documentation and error message updates
2008-02-01 08:56:00 -05:00
Brad King 2cff26fa52 ENH: Support linking to shared libs with dependent libs
- Split IMPORTED_LINK_LIBRARIES into two parts:
      IMPORTED_LINK_INTERFACE_LIBRARIES
      IMPORTED_LINK_DEPENDENT_LIBRARIES
  - Add CMAKE_DEPENDENT_SHARED_LIBRARY_MODE to select behavior
  - Set mode to LINK for Darwin (fixes universal binary problem)
  - Update ExportImport test to account for changes
2008-01-31 15:45:31 -05:00
Brad King 3a05425309 BUG: Move decision to switch library paths found in implicit link directories to use -l options from cmFindLibraryCommand to cmComputeLinkInformation. Existing projects may depend on find_library returning a full path. This slightly weakens cmComputeLinkInformation but is necessary for compatibility. 2008-01-31 07:50:40 -05:00
Brad King 66e0b4212f ENH: Added build rule variables CMAKE_<LANG>_ARCHIVE_CREATE, CMAKE_<LANG>_ARCHIVE_APPEND, and CMAKE_<LANG>_ARCHIVE_FINISH to support creation of static archive libraries out of a large number of objects. See bug #6284. 2008-01-29 20:46:25 -05:00
Brad King b4b9e1d44b BUG: Fix dynamic exports executable link option for Sun C compiler on Linux. 2008-01-29 07:48:22 -05:00
Brad King 09af624dee BUG: Fix generation of Watcom link lines.
- Work-around bug in Watcom command line parsing for spaces in paths.
  - Add 'library' option before libraries specified by file path.
2008-01-23 13:30:55 -05:00
Brad King 96fd5909d9 ENH: Implement linking with paths to library files instead of -L and -l separation. See bug #3832
- This is purely an implementation improvement.  No interface has changed.
  - Create cmComputeLinkInformation class
  - Move and re-implement logic from:
      cmLocalGenerator::ComputeLinkInformation
      cmOrderLinkDirectories
  - Link libraries to targets with their full path (if it is known)
  - Dirs specified with link_directories command still added with -L
  - Make link type specific to library names without paths
    (name libfoo.a without path becomes -Wl,-Bstatic -lfoo)
  - Make directory ordering specific to a runtime path computation feature
    (look for conflicting SONAMEs instead of library names)
  - Implement proper rpath support on HP-UX and AIX.
2008-01-22 09:13:04 -05:00
Bill Hoffman c0bb73787d ENH: make sure msvc90 gets set 2008-01-18 16:06:10 -05:00
Bill Hoffman e5a4da5b3c ENH: make sure MSVC90 is set 2008-01-18 15:19:19 -05:00
Brad King 8d1d5500c8 ENH: Enable use of COMPILE_DEFINITIONS property for Fortran sources. 2008-01-17 19:58:01 -05:00
Brad King b8357db11d ENH: Rename SET_PROPERITES command to SET_PROPERTY and give it a more powerful signature. 2008-01-17 15:54:49 -05:00
Brad King 18b9e7db6c ENH: Enable CMAKE_<lang>_DEFINE_FLAG for COMPILE_DEFINITIONS property implementation. 2008-01-17 10:00:19 -05:00
Brad King 2a78288064 ENH: Convert Modules/Platform specification of system search paths to use CMAKE_SYSTEM_PREFIX_PATH when possible. 2008-01-16 09:51:57 -05:00
Bill Hoffman c598da4328 BUG: fix for bug 6231, bad regex for sunos, worked by chance, but better to have it right 2008-01-15 14:19:32 -05:00
Brad King 8262ccfd4e ENH: Create COMPILE_DEFINITIONS property for targets and source files. Create <config>_COMPILE_DEFINITIONS property as per-configuration version. Add Preprocess test to test the feature. Document limitations on Xcode and VS6 generators. 2008-01-14 09:20:58 -05:00
Bill Hoffman 3f45a27a6b ENH: add support for xlf with -WF,-D for -D 2008-01-11 17:38:41 -05:00
Bill Hoffman c3b7f618d1 ENH: add support for xlf with -WF,-D for -D 2008-01-11 17:37:38 -05:00
Brad King d6a21fc25c BUG: Removed stray debugging message. 2008-01-10 14:47:19 -05:00
Bill Hoffman a40147abce ENH: add support for visual age fortran on linux 2008-01-10 10:50:46 -05:00
Brad King b761da39c1 ENH: Patch from Maik to add preprocessor directive handling to Fortran dependency scanning. Also added -fpp flag to Intel Fortran compiler on Windows by default. 2008-01-09 10:30:11 -05:00
Bill Hoffman b479c6a8a9 ENH: add ability to have manifest files and incremental linking with make and nmake 2008-01-01 15:13:41 -05:00
Brad King 19037da40f ENH: Add SunPro fortran module flags on SunOS. 2007-12-30 16:34:49 -05:00
Brad King b2e8c07af8 ENH: Implemented Fortran module output directory and search path flags. 2007-12-30 16:11:38 -05:00
Alexander Neundorf e3c84cf5a6 ENH: add support for the Syllable OS (http://www.syllable.org)
major issues:
-access() doesn't return false for an empty string (#ifdefed in cmake)
-dlopen() doesn't return 0 on failure (#ifdefed in cmake and fixed now in Syllable)
-the kwsys and Bootstrap tests fail with timeout due to the fact that I'm doing all that in qemu, which is quite slow
-RPATH is now supported, so without modifying the test adapting DLL_PATH in Syllable is required for the tests to succeed
-the Plugin test fails with an undefined reference to example_exe_function() in example_mod_1, it seems this isn't supported under Syllable

Alex
2007-11-23 20:45:49 -05:00
Bill Hoffman 90e6f983de ENH: add support for env var and better default for CMAKE_OSX_SYSROOT 2007-11-15 13:14:41 -05:00
Bill Hoffman 2f23d79969 ENH: fix bug in default arch, it was using the environment variable which is not a default 2007-11-08 14:31:56 -05:00
David Cole e3572607f4 BUG: Do not us the search_paths_first flag on older Mac OSX (10.2 and earlier) systems. 2007-11-08 09:09:14 -05:00
Bill Hoffman 5765fbbb88 ENH: fix spelling error 2007-10-22 14:01:49 -04:00
Bill Hoffman 397d7ff29d ENH: try to fix boostrap on 10.5 2007-10-22 10:17:31 -04:00
Bill Hoffman 613c35e033 ENH: do not always add -arch flags 2007-10-19 22:24:00 -04:00
Alin Elena 680cff0b9f ENH: FindBLAS.cmake and FindLAPACK.cmake modules added. They locate various implementations of blas and lapack libraries. CheckFortranFunctionExists.cmake provides a test function to check if the library is usabale. I have also changed the -KPIC flag to -fPIC in Linux-ifort.cmake. 2007-10-10 17:47:37 -04:00