Commit Graph

136 Commits

Author SHA1 Message Date
Nicolas Despres dd13ecd005 Doxygen: Improve code documentation. 2011-10-23 22:15:30 +02:00
Nicolas Despres d0b3a7fa48 Fix typo. 2011-10-23 22:15:30 +02:00
Nicolas Despres d3d7e45df2 Remove trailing white-spaces. 2011-10-23 22:15:20 +02:00
Peter Collingbourne 5b114c9bee Introduce a cmLocalGenerator::ConvertToIncludeReference function
This provides a mechanism for the local generator to override how
header search paths are generated.
2011-10-02 18:30:43 +01:00
Peter Collingbourne 903d914b28 Make cmLocalGenerator::ConvertToLinkReference virtual
This provides a mechanism for the local generator to override how
library search paths are generated.
2011-10-02 18:30:43 +01:00
Nicolas Despres 4532d36cc9 Add const versions of some getters. 2011-10-02 18:30:42 +01:00
Brad King 5c0c635a09 Fortran: Add support for free- and fixed-form flags
Define a "Fortran_FORMAT" target and source file property.  Initialize
the target property from a "CMAKE_Fortran_FORMAT" variable.  Interpret
values "FIXED" and "FREE" to indicate the source file format.  Append
corresponding flags to the compiler command line.
2011-08-31 10:24:43 -04:00
Alex Neundorf b976e70063 Make clLocalGenerator::GetTargetFlags() public
This will later on be used for getting the link flags

Alex
2011-07-02 17:08:34 +02:00
Brad King 9a0b9bc8b7 Optionally pass include directories with response files
Create platform option CMAKE_<lang>_USE_RESPONSE_FILE_FOR_INCLUDES to
enable use of response files for passing the list of include directories
to compiler command lines.
2011-03-17 17:56:13 -04:00
Brad King 1a29ccaf9a Remove cmLocalGenerator::GetRealLocation
The cmCustomCommandGenerator::GetCommand method completely replaces the
purpose of this method.  Re-implement GetRealLocation inline at the only
remaining call site and remove it.
2010-12-08 17:29:53 -05:00
Brad King ced1d5eccd Skip file-level dependencies on custom targets (#11332)
A custom command may name a target created by add_custom_target in its
DEPENDS field.  Treat this case as a target-level dependency only since
a custom target provides no standard file on which to add a file-level
dependency.
2010-12-08 17:14:17 -05:00
Brad King e30a775f68 Improve signature of cmLocalGenerator::GetRealDependency
Allow file-level custom command dependencies to be skipped.
2010-12-08 17:14:14 -05:00
Brad King d9b2da139d Merge branch 'mingw-response-files' 2010-06-15 13:58:58 -04:00
Alex Neundorf 3901e0408c -improve crosscompiling from Linux to iphone (#10526)
Patch by Karol Krizka

Alex
2010-05-01 20:38:28 +02:00
Brad King 87f0853941 Use forward slashes for objects in response files
Response files are parsed by tools, not by shells.  We teach
cmLocalGenerator::Convert() a new "RESPONSE" output format and use it
for objects listed in response files.  It does not do special slash or
MSYS root translation like the "SHELL" format does.  This is necessary
for GNU tools on Windows to understand response file content.

See issue #10401.
2010-03-11 09:40:24 -05:00
Brad King 867a1cc12c Fix line-too-long style violations
The commit "Define per-target OSX_ARCHITECTURES property" introduced
some long lines.  This wraps them into multiple shorter lines.
2009-10-23 08:02:24 -04:00
Brad King 2dc39b8c32 Define per-target OSX_ARCHITECTURES property
The CMAKE_OSX_ARCHITECTURES variable works only as a global setting.
This commit defines target properties

  OSX_ARCHITECTURES
  OSX_ARCHITECTURES_<CONFIG>

to specify OS X architectures on a per-target and per-configuration
basis.  See issue #8725.
2009-10-21 13:00:49 -04:00
Brad King 1e48243591 Introduce "build feature" lookup framework
This creates cmTarget::GetFeature and cmMakefile::GetFeature methods to
query "build feature" properties.  These methods handle local-to-global
scope and per-configuration property lookup.  Specific build features
will be defined later.
2009-10-02 13:52:01 -04:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King 3fe5f8d960 Optionally force conversion to relative path
In cmLocalGenerator::ConvertToRelativePath we normally convert to
relative path only if the local and remote paths both lie inside the
source tree or both lie inside the build tree.  This commit adds an
optional 'force' argument to allow conversion even when this rule is
violated.
2009-09-22 16:16:56 -04:00
Brad King 3fda5c6463 Factor cmLocalGenerator::Configure input file read
This method tells the cmMakefile to read the input CMakeLists.txt file.
We factor out the call into a ReadInputFile method so it can be extended
without polluting the Configure method.
2009-09-03 08:27:00 -04:00
Brad King 1db5c90644 Factor cmLocalGenerator::Configure object max path
Much of the code in this method was dedicated to computing ObjectMaxPath
after configuring the directory.  We move this last step into its own
ComputeObjectMaxPath method for better organization.
2009-09-03 08:26:46 -04:00
Bill Hoffman 28b1912aa3 ENH: add group support and fix borland error 2009-07-11 00:05:20 -04:00
Bill Hoffman 7491f52992 ENH: first pass at VS 10, can bootstrap CMake, but many tests still fail 2009-06-25 16:41:57 -04:00
Brad King 8c3290b4a3 BUG: Use new include dir suppresson for all gens
This fixes CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES to be used for all
generators instead of just those that construct their own compiler
command lines directly.  See issue #8598.
2009-02-26 09:16:16 -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
Brad King 15c52e9891 ENH: Add rule substitutions useful for launchers
This defines make rule substitutions <LANGUAGE>, <TARGET_NAME>,
<TARGET_TYPE>, and <OUTPUT>.  They will be useful for RULE_LAUNCH_*
property values.
2009-02-10 08:52:07 -05:00
Brad King b604b98c56 ENH: Define RULE_LAUNCH_* properties
This defines global, directory, and target properties
RULE_LAUNCH_COMPILE, RULE_LAUNCH_LINK, and RULE_LAUNCH_CUSTOM.  Their
values specify 'launcher' command lines which are prefixed to compile,
link, and custom build rules by Makefile generators.
2009-02-10 08:51:15 -05:00
Brad King 205fce61b6 ENH: Warn if build dir is too long for filesystem
When an object file directory is too deep to place an object file
without exceeding CMAKE_OBJECT_PATH_MAX, this issues a warning.
Previously we silently ignored the problem.  See issue #7860.
2008-12-16 09:15:18 -05:00
Brad King 3cf9265fa7 ENH: Refactor passing of max length object dir
When computing the maximum length full path to the build directory under
which object files will be placed, pass the actual path instead of just
its length.  This will be useful for error message generation.
2008-12-16 09:14:40 -05:00
Brad King ad44a41a18 ENH: Fix optional use of relative paths.
These changes refactor cmLocalGenerator methods Convert and
ConvertToOutputForExisting to support references inside the build tree
using relative paths.  After this commit, all tests pass with Makefile
generators when relative paths are enabled by default.  See issue #7779.
2008-10-09 15:30:07 -04:00
Brad King f89dae7a94 ENH: Create Info.plist files in OS X Frameworks
A Mac OS X Framework should provide a Resources/Info.plist file
containing meta-data about the framework.  This change generates a
default Info.plist for frameworks and provides an interface for users to
customize it.
2008-09-02 12:06:32 -04:00
Brad King 990c6b0b90 ENH: Allow custom limit on object file path length
Some native build tools, particularly those for cross compiling, may
have a limit on the length of the full path to an object file name that
is lower than the platform otherwise supports.  This change allows the
limit to be set by the project toolchain file through the variable
CMAKE_OBJECT_PATH_MAX.
2008-08-21 09:54:36 -04:00
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 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 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
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
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 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 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 73704ede42 ENH: Enabled color printing of "Scanning dependencies of target ..." message. 2007-12-19 17:15:41 -05:00
Brad King de96fd1df9 ENH: Moved dependency integrity check from CheckBuildSystem over to a per-target UpdateDependencies step. This greatly reduces the startup time for make processes and allows individual targets to be built without a global dependency check. 2007-12-19 16:36:30 -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