Commit Graph

265 Commits

Author SHA1 Message Date
Brad King 67f8c0fd10 ENH: Allow multiple OS X applications bundles to be created in a single build directory. Converted Info.plist files to be generated directly instead of configured with make variables. The MACOSX_BUNDLE_* variables are now properties (and vars for compatibility). 2008-02-14 15:31:08 -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 52b3f85642 ENH: Enable use of link script whenever incremental archive construction rules are available. Enable use of archive construction rules on MSYS. 2008-01-29 21:16:49 -05:00
Brad King ffac622a85 ENH: Add cmTarget::GetLinkInformation method to allow several places in the generators to share link information while only computing it once per configuration for a target. Use it to simplify the chrpath feature. 2008-01-29 15:07:33 -05:00
Brad King 5594ad4885 ENH: Updated exporting and importing of targets to support libraries and configurations.
- Created cmExportFileGenerator hierarchy to implement export file generation
  - Installed exports use per-config import files loaded by a central one.
  - Include soname of shared libraries in import information
  - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands
  - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators
  - Import files compute the installation prefix relative to their location when loaded
  - Add mapping of importer configurations to importee configurations
  - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries
  - Scope IMPORTED targets within directories to isolate them
  - Place all properties created by import files in the IMPORTED namespace
  - Document INSTALL(EXPORT) and EXPORT() commands.
  - Document IMPORTED signature of add_executable and add_library
  - Enable finding of imported targets in cmComputeLinkDepends
2008-01-28 08:38:36 -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 865c2bc6d6 BUG: Work-around bug in MSVC 6 command line parsing. 2008-01-23 13:03:03 -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
Ken Martin c3ab83150c ENH: improve backwards compatibility 2008-01-19 15:09:36 -05:00
Ken Martin 7c473d4828 BUG: fix bugs 5539 (progress going beyond 100% when new files are added) and 5889 (tests are not found in some cases when using add_subdirectory to .. etc) 2008-01-18 10:25:25 -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 433099ecdd ENH: Converted cmMakefile DefineFlags added by ADD_DEFINITIONS command into a COMPILE_DEFINITIONS directory property. 2008-01-17 19:29:43 -05:00
Ken Martin 456631225b ENH: use CTestTestfile.txt 2008-01-17 12:44:59 -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 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
Brad King 340468a090 BUG: Removed stray debugging statement. 2008-01-13 16:59:09 -05:00
Brad King 857e2e15dd ENH: Improved escaping in kwsys/System. Added escape of % for NMake. Added escape of ; for the VS IDE. 2008-01-13 16:36:20 -05:00
Bill Hoffman ee886fbbdb ENH: add CMAKE_DEFINE_FLAG_(LANG) that can replace -D flags with what the compiler actually uses 2008-01-11 13:00:29 -05:00
Brad King 52eb0ccac7 BUG: Restore old interface of "make foo.o" and "make foo.i" even though object file names now include source extensions. For Java we also need to always remove the source extension (.java -> .class). This fixes the re-opening of bug #6169. 2008-01-07 16:12:37 -05:00
Brad King 3efc6e40cb BUG: Do not remove the source file extension when computing an object file name. This addresses bug #6169. If CMAKE_BACKWARDS_COMPATIBILITY is 2.4 or lower maintain the old behavior so that existing build trees and old project releases are not affected. 2007-12-28 23:07:26 -05:00
Brad King f872c10b7e ENH: Added method cmLocalGenerator::GetBackwardsCompatibility to reduce parsing of CMAKE_BACKWARDS_COMPATIBILITY variable. Add cmLocalGenerator::NeedBackwardsCompatibility to simplify checks for compatibility requirements. 2007-12-28 23:07:14 -05:00
Brad King 850721f9af COMP: Fixed data loss warning. 2007-12-20 09:27:59 -05:00
Alexander Neundorf ac017f7aba STYLE: fix warnings: comparison signed/unsigned, unused variable
Alex
2007-12-19 03:56:13 -05:00
Alexander Neundorf 3ae731fab7 ENH: add support for chrpath, so the RPATH in ELF files can be changed when
installing without having to link the target again -> can save a lot of time

chrpath is handled very similar to install_name_tool on the mac. If the
RPATH in the build tree file is to short, it is padded using the separator
character.
This is currently disabled by default, it can be enabled using the option
CMAKE_USE_CHRPATH. There are additional checks whether it is safe to enable
it. I will rework them and use FILE(READ) instead to detect whether the
binaries are actually ELF files.

chrpath is available here
http://www.tux.org/pub/X-Windows/ftp.hungry.com/chrpath/
or kde svn (since a few days): http://websvn.kde.org/trunk/kdesupport/chrpath/

Alex
2007-12-18 17:50:27 -05:00
Alexander Neundorf f2bb0af819 STYLE: restructure OutputLinkLibraries() a bit, so that new there is a
function which returns the RPATH, so e.g. the install rpath can be queried
when the command for the build rpath is created. This is a first step for
supporting chrpath.

Alex
2007-11-26 17:57:39 -05:00
Bill Hoffman 5765fbbb88 ENH: fix spelling error 2007-10-22 14:01:49 -04:00
Bill Hoffman 613c35e033 ENH: do not always add -arch flags 2007-10-19 22:24:00 -04:00
David Cole c8e832dcf5 BUG: Fix #5868 - add COMPONENT handling to the SCRIPT and CODE signatures of the INSTALL command. 2007-10-15 07:08:15 -04:00
Bill Hoffman 79d9041d81 BUG: fix for bug 0003618 , allow one arch in OSX_ARCHS to work 2007-10-12 10:58:59 -04:00
Alexander Neundorf c3b42e90ed ENH: add flag so a terminating slash for the link path can be specified (needed by the Digital Mars D compiler)
Alex
2007-08-28 16:19:01 -04:00
Alexander Neundorf 7ff741f14d STYLE: more space in the cmake_install.cmake script (easier to read)
Alex
2007-08-21 16:22:55 -04:00
Brad King ea874415d9 ENH: Moved GetTargetDirectory method up to cmLocalGenerator. This provides a common interface to something that was implemented in most local generators anyway. 2007-08-01 15:25:40 -04:00
David Cole ee91e25499 BUG: Only pay attention to the FRAMEWORK target property for SHARED library targets 2007-08-01 13:04:45 -04:00
Alexander Neundorf dddbad259c PERF: micro optimization: the (*pos1) && (*pos1=='/') were redundant, and
hasDoubleSlash is false in most cases, so in most cases 3 comparisons were
done, now only one

Alex
2007-07-23 09:06:48 -04:00
Alexander Neundorf a4429ad30a STYLE: fix line lengths and add "remove -f" to the docs
Alex
2007-07-17 10:44:09 -04:00
Alexander Neundorf 95a8331edb ENH: produce a lot more output when running with --debug-output
-try to fix build error on HPUX

Alex
2007-07-17 09:25:08 -04:00
Alexander Neundorf e126db1f71 BUG: handle dependencies to imported targets better: don't create a
dependency if the target name was not listed in DEPENDS, if it was listed in
DEPENDS, create a dependency to the file

Seems to work, but have to check with Brad.

Alex
2007-06-21 13:08:22 -04:00
Brad King 35936433e1 ENH: Merging changes from branch CMake-SourceFile2-b between tags
CMake-SourceFile2-bp and CMake-SourceFile2-b-mp1 to trunk.  This
commit is surrounded by tags CMake-SourceFile2-b-mp1-pre and
CMake-SourceFile2-b-mp1-post on the trunk.

The changes re-implement cmSourceFile and the use of it to allow
instances to be created much earlier.  The use of cmSourceFileLocation
allows locating a source file referenced by a user to be much simpler
and more robust.  The two SetName methods are no longer needed so some
duplicate code has been removed.  The strange "SourceName" stuff is
gone.  Code that created cmSourceFile instances on the stack and then
sent them to cmMakefile::AddSource has been simplified and converted
to getting cmSourceFile instances from cmMakefile.  The CPluginAPI has
preserved the old API through a compatibility interface.

Source lists are gone.  Targets now get real instances of cmSourceFile
right away instead of storing a list of strings until the final pass.

TraceVSDependencies has been re-written to avoid the use of
SourceName.  It is now called TraceDependencies since it is not just
for VS.  It is now implemented with a helper object which makes the
code simpler.
2007-06-18 11:59:23 -04:00
Alexander Neundorf 74750610cf ENH: determine typesize by compiling a file and reading strings from the compiled output.
Tested with various gcc, XCode, MSVC7, sdcc
For OSX when doing TRY_COMPILE() CMAKE_OSX_ARCHITECTURES is used, if there are different results an error is generated. CMAKE_OSX_ARCHITECTURES can be overwritten for the TRY_COMPILES with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES.

Alex
2007-06-04 17:08:46 -04:00
Brad King 3f2dd9bc54 ENH: Made cmTarget::GetSourceFiles method return reference to const so addition of cmSourceFile pointers must be done with an access method in cmTarget. 2007-05-28 10:25:03 -04:00
Alexander Neundorf 79756b0e67 BUG: don't use non-imported target when cross compiling as commands in custom commands
STYLE: remove now invalid comments, use this->

Alex
2007-05-24 08:43:31 -04:00
Brad King 5639c69d39 ENH: Removed unused code now that INSTALL_FILES and INSTALL_PROGRAMS are not targets. 2007-05-23 18:23:17 -04:00
Brad King 9d75da9eaf ENH: Removed unused code now that INSTALL_FILES and INSTALL_PROGRAMS are not targets. 2007-05-23 18:22:52 -04:00
Brad King ba7780a3c4 ENH: Fixed INSTALL_FILES and INSTALL_PROGRAMS commands to not create targets. No targets of type cmTarget::INSTALL_FILES or cmTarget::INSTALL_PROGRAMS are created, so we do not need to check for them everywhere anymore. 2007-05-23 15:40:12 -04:00
Alexander Neundorf 4878c00905 ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates an
"imported" executable target. This can then be used e.g. with
ADD_CUSTOM_COMMAND() to generate stuff. It adds a second container for
"imported" targets, and FindTarget() now takes an additional argument bool
useImportedTargets to specify whether you also want to search in the
imported targets or only in the "normal" targets.

Alex
2007-05-22 10:24:59 -04:00
Brad King 92c0f41251 ENH: Use CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES from platform files to block link directories. 2007-05-18 11:36:23 -04:00
Alexander Neundorf 891f2130cf COMP: fix link rules with nmake, the linker command has to be converted to shortpath form for nmake
Alex
2007-05-18 10:32:22 -04:00
Brad King c25d2bfdd2 ENH: Added testing for custom command line arguments containing all special characters on the US keyboard. Fixed curly brace arguments on borland and % arguments in mingw32-make. 2007-05-17 10:53:18 -04:00
Brad King bd78952748 BUG: Do not emit /usr/lib32 or /usr/lib64 as linker paths. Submitted by David Faure. 2007-05-16 09:07:53 -04:00
Bill Hoffman 76dd86b410 BUG: fix -D escaped quotes for watcom 2007-05-10 14:43:55 -04:00