Commit Graph

116 Commits

Author SHA1 Message Date
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
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
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
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 9d4f3a0686 STYLE: remove duplicate non-const accessors GetLocalGenerator(int) and
GetLocaGenerators(cmLocalGenerators) from cmGlobalGenerator(). Now there is
one const accessor which is even faster since it returns a reference
(instead of copying a vector)
-more const to ensure that this the returned local generators don't actually
get modified
-removed duplicated code in GetCTestCommand() and GetCPackCommand()
-added some const accessors

Alex
2007-06-15 10:10:24 -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
Bill Hoffman 76dd86b410 BUG: fix -D escaped quotes for watcom 2007-05-10 14:43:55 -04:00
Alexander Neundorf 8245f437b6 BUG: fix problem for non-C/CXX languages with Visual Studio, the
dependencies for the custom commands added for java were not handled
correctly. Needs more work.

Alex
2007-05-09 14:41:38 -04:00
Alexander Neundorf 7f11536704 ENH: now target names can be used in add_custom_command() and
add_custom_target() as COMMAND, and cmake will recognize them and replace
them with the actual output path of these executables. Also the dependency
will be added automatically. Test included.
ENH: moved TraceVSDependencies() to the end of GlobalGenerator::Configure(),
so it is done now in one central place

Alex
2007-05-09 08:25:45 -04:00
Brad King 1f639ee76c ENH: Added computation of object file names that are almost always short enough to not exceed the filesystem path length limitation. This is useful when a source file from outside the tree is referenced with a long full path. The object file name previously would contain the entire path which when combined with the build output directory could exceed the filesystem limit. Now CMake recognizes this case and replaces enough of the beginning of the full path to the source file with an md5sum of the replaced portion to make the name fit on disk. This addresses bug#4520. 2007-03-16 10:34:25 -04:00
Ken Martin b99129d2d8 ENH: some code cleanup 2007-03-12 10:26:59 -04:00
Brad King 2f2b5b2503 ENH: SetupPathConversions is now called automatically on demand. 2007-03-08 08:38:40 -05:00
Brad King 4036627487 ENH: Improved computation of RelativePathTopSource and RelativePathTopBinary to use higher relative path tops when the source directories jump around in a tree below the original source top. 2007-03-07 17:32:35 -05:00
Brad King 073076e0f7 COMP: Fix ConvertToRelativePath change for Xcode generator. 2007-03-07 16:32:29 -05:00
Brad King fc19882e8f ENH: Moved ConvertToRelativePath from cmGlobalGenerator to cmLocalGenerator. This is in preparation for setting up each local generator to have its own RelativePathTopSource and RelativePathTopBinary based on its ancestor directories. 2007-03-07 15:15:46 -05:00
Andy Cedilnik 8ad3430931 ENH: Make EXCLUDE_FROM_ALL a target and directory properties. Also, make IsInAll use EXCLUDE_FROM_ALL. Also, enable the test that tests this 2007-02-23 09:46:27 -05:00
Bill Hoffman ca0230a33e ENH: check in initial conv library stuff 2007-02-16 16:12:17 -05:00
Brad King 54731fa2c8 ENH: Adding support for # escape in Watcom WMake. 2006-10-25 11:23:04 -04:00
Brad King b155f3aa1c ENH: Adding image version number (major.minor) property to windows binaries. Default is 0.0, but the VERSION target property may change the value. Windows now has first-class support for dll and exe versioning. This addresses bug#1219. 2006-10-16 18:17:14 -04:00
Brad King 406f3554c7 BUG: Fixed display of custom command comments with quotes, dollars, and other special characters in them. 2006-10-04 18:52:29 -04:00
Brad King 019dabc97f BUG: MSYS makefile shell needs posix paths to executables in some cases and it does not hurt to do it always. 2006-09-28 10:37:19 -04:00