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.
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.
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.
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.
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.
- 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
- 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.