Commit Graph

38 Commits

Author SHA1 Message Date
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Brad King 5f0a25955f Factor HP compiler flags into per-platform/per-compiler files
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.
2011-03-02 17:24:36 -05: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
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 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
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 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 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 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 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 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
Brad King b2a5495922 STYLE: Updated comment about link type flags and passing directly to ld. 2006-09-15 15:18:34 -04:00
Brad King e21b65cbb9 BUG: Fix CMAKE_SHARED_*_LINK_*_C_FLAGS to pass link type selection flags directly to the linker. 2006-09-15 15:14:55 -04:00
Brad King 3079a67133 ENH: Enabling link type selection flags for this platform. See bug#1644 for details. 2006-09-15 14:58:30 -04:00
Brad King 3b99b5ede3 ENH: Enabling preprocessed source and asembly source generation rules on HP aCC and cc. 2006-08-09 13:10:01 -04:00
Andy Cedilnik b9947a91d4 ENH: Cleanup link libraries. Remove -l from -ldl 2006-04-20 10:23:17 -04:00
Bill Hoffman d33021924d ENH: add more search paths and add UnixPaths to all unix platforms 2006-03-27 10:46:42 -05:00
Brad King 33587ce376 ENH: Added platform settings CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES to allow customized searching for libraries. 2006-02-09 15:05:13 -05:00
Bill Hoffman 692ba48c4e ENH: major changes to support addition of languages from cmake modules directory. 2004-09-22 14:42:05 -04:00
Bill Hoffman 3708ed4ec8 try to fix fortran on hp 2004-09-09 11:50:14 -04:00
Bill Hoffman 66a08c10e5 ENH: more uniform approach to enable language, one step closer to being able to enable a language without modifing cmake source code 2004-08-26 14:55:55 -04:00
Brad King 830e1ac1d9 BUG#895: Adding -DNDEBUG to C and C++ flags for release builds. 2004-06-01 14:08:04 -04:00
Brad King 18112d0854 ENH: Added CMAKE_SHARED_LIBRARY_SONAME_FLAG setting to enable shared library version support for HP-UX. 2003-12-12 14:44:03 -05:00
Bill Hoffman c3530dd01f BUG: fix for bug 383 gcc flags are now always set if the compiler is gnu 2003-11-14 10:44:12 -05:00
Bill Hoffman e0d166ec72 fix default release flags for hp 2003-02-05 14:55:51 -05:00
Brad King 415eca1fbb BUG: Added missing link flag to export symbols from an executable. 2003-01-24 13:53:21 -05:00
Brad King 61cd9298cd ENH: Added <LINK_FLAGS> to link rules. 2002-12-31 13:08:44 -05:00
Berk Geveci 435282e538 temp fix for hp 2002-11-14 16:29:15 -05:00
Berk Geveci 3118795db0 fix flags for hp 2002-11-14 16:12:46 -05:00
Bill Hoffman d1051bb575 clean up flags with _init flags 2002-11-11 12:31:46 -05:00
Bill Hoffman 538f38596f BUG: fix setting of c flags 2002-11-10 10:02:52 -05:00
Bill Hoffman ac481e0ee9 fix for cxxflags 2002-11-09 13:43:16 -05:00
Brad King 3a6d52f4c5 ENH: Moved caching of C*_FLAGS* settings down to CMakeSystemSpecificInformation.cmake. The platform files can set the defaults on the first run, and then the settings are cached at the end. 2002-11-08 18:06:53 -05:00
Bill Hoffman f5d95fb078 Complete rework of makefile generators expect trouble 2002-11-08 15:46:08 -05:00