Commit Graph

153 Commits

Author SHA1 Message Date
Brad King e79b73d61f BUG: Include less content as input to "rule hash" computation.
- The rule hash should use only commands specified by the user.
  - No make output (echo and progress) rules should be included.
  - No outputs or dependencies need be included.  The native build tool
    will take care of them.
2008-06-03 09:55:28 -04:00
Brad King 6be09c3667 ENH: Introduce "rule hashes" to help rebuild files when rules change.
- In CMake 2.4 custom commands would not rebuild when rules changed.
  - In CMake 2.6.0 custom commands have a dependency on build.make
    which causes them to rebuild when changed, but also when any
    source is added or removed.  This is too often.
  - We cannot have a per-rule file because Windows filesystems
    do not deal well with lots of small files.
  - Instead we add a persistent CMakeFiles/CMakeRuleHashes.txt file
    at the top of the build tree that is updated during each
    CMake Generate step.  It records a hash of the build rule for
    each file to be built.  When the hash changes the file is
    removed so that it will be rebuilt.
2008-06-02 16:44:58 -04:00
Brad King 23a60d561c BUG: Fix makefile generator to have link rules depend on all full path libraries that appear on the link line. This allows projects to relink when imported targets have changed. 2008-05-21 19:57:35 -04:00
Brad King 600e5e274e ENH: Add SKIP_RULE_DEPENDS option for add_custom_command()
- Allows make rules to be created with no dependencies.
  - Such rules will not re-run even if the commands themselves change.
  - Useful to create rules that run only if the output is missing.
2008-05-14 11:38:47 -04:00
Brad King 071725a1c1 BUG: Fix generation of some paths into .cmake files in the build tree to escape strings for the CMake language. This fix allows users to put double quotes in the SOVERSION of a shared library. 2008-05-10 18:39:06 -04:00
Bill Hoffman 7f5446b2ef BUG: fix for bug 6834 RC should not get all COMPILE_FLAGS from a target and should work the same way as it does in the vs ide 2008-04-22 11:10:19 -04:00
Brad King 238d9d9e30 BUG: When MACOSX_PACKAGE_LOCATION specifies Headers/foo we must still create the Headers symlink. 2008-04-14 09:08:35 -04:00
Bill Hoffman b0256fbe1c BUG: make sure OBJECT_DIR is in the path of the SHELL 2008-04-11 13:13:15 -04:00
Brad King 67834f2d53 BUG: Correct Mac OS X framework behavior
- Place the built library in foo.framework/Versions/A/foo
  - Do not create unused content symlinks (like PrivateHeaders)
  - Do not use VERSION/SOVERSION properties for frameworks
  - Make cmTarget::GetDirectory return by value
  - Remove the foo.framework part from cmTarget::GetDirectory
  - Correct install_name construction and conversion on install
  - Fix MACOSX_PACKAGE_LOCATION under Xcode to use the
    Versions/<version> directory for frameworks
  - Update the Framework test to try these things
2008-04-08 00:06:47 -04:00
Bill Hoffman 5514b2811b BUG: response file must be a copy if different or you get relinks every time you run cmake 2008-04-03 11:11:54 -04:00
Brad King dfe2ea6406 ENH: Handle large object file lists on some platforms
- Use a response file when enabled by
    CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_OBJECTS
  - Enable for C and CXX with cl (MSVC)
  - Enable for Fortran with ifort (Intel Fortran)
2008-02-27 17:10:45 -05:00
Brad King 58480575a3 ENH: Simplify make build rule generation by removing use of OBJECTS_QUOTED and TARGET_QUOTED rule variables and updating the generation of OBJECTS to always use the newer cmLocalGenerator::Convert method. 2008-02-24 14:05:21 -05:00
Brad King 454da64c99 BUG: Link scripts should be generated with copy-if-different and included as a dependency of the link rule. 2008-02-20 14:56:29 -05:00
Brad King 9ed4266306 ENH: Cleanup impl of PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE properties 2008-02-18 16:38:34 -05:00
Brad King ed76198b84 ENH: Cleanup building of OS X bundle content
- Fixes repeated rebuild of bundles by Makefile generators
 - Add special rules to copy sources to their
   MACOSX_PACKAGE_LOCATION bundle directory
 - Remove MacOSX_Content language hack
   - Remove EXTRA_CONTENT property
   - Remove MACOSX_CONTENT
   - Remove corresponding special cases in object names
2008-02-15 11:22:23 -05:00
Brad King 66e0b4212f ENH: Added build rule variables CMAKE_<LANG>_ARCHIVE_CREATE, CMAKE_<LANG>_ARCHIVE_APPEND, and CMAKE_<LANG>_ARCHIVE_FINISH to support creation of static archive libraries out of a large number of objects. See bug #6284. 2008-01-29 20:46:25 -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 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 80c2be45e0 ENH: Renamed <CONFIG>_COMPILE_DEFINITIONS to COMPILE_DEFINITIONS_<CONFIG> for better documentation clarity. 2008-01-15 21:02:00 -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 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 b2e8c07af8 ENH: Implemented Fortran module output directory and search path flags. 2007-12-30 16:11:38 -05:00
Brad King 59aa144516 ENH: Simplified and moved link script implementation up from cmMakefileLibraryTargetGenerator to cmMakefileTargetGenerator and use for cmMakefileExecutableTargetGenerator too. This addresses bug #6192. 2007-12-28 14:59:06 -05:00
Brad King 42f3f3c342 ENH: Store in DependInfo.cmake files a list of the corresponding files for the targets to which a target links. This is useful for locating Fortran modules provided by linked targets. See issue #5809. 2007-12-28 11:49:46 -05:00
Brad King d83b4cd255 ENH: Add a depends check step to custom targets. Add support for the IMPLICIT_DEPENDS feature of custom commands when building in custom targets. Convert multiple-output pair checks to be per-target instead of global. 2007-12-21 12:22:12 -05:00
Brad King 6586149d64 BUG: The dependency scanning target should be symbolic. 2007-12-21 11:00:03 -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
Bill Hoffman fd33bf93a5 ENH: fix for bug 6102, allow users to change the compiler 2007-12-13 15:54:29 -05:00
Brad King d48ab19efe STYLE: Fixed line-too-long. 2007-11-23 14:53:06 -05:00
Brad King 2176e40212 ENH: Change compiler working directory to the local build tree location when compiling object files. This simplifies the compiler command line and the usage of the <objBase>.s and <objBase>.i targets. It also helps fortran compilers put their modules in the correct place. 2007-11-21 13:37:14 -05:00
David Cole 8e4c7b99e1 ENH: Finish up the Framework creation code restructuring. Frameworks build and install now. More work needed on the packaging step. See Tests/Framework for example use. 2007-10-10 11:06:15 -04:00
Brad King d7a5d4c191 ENH: Added IMPLICIT_DEPENDS option to ADD_CUSTOM_COMMAND. It currently works only for Makefile generators. It allows a custom command to have implicit dependencies in the form of C or CXX sources. 2007-09-17 10:50:46 -04:00
Brad King 9f542f4ef7 ENH: Added OBJECT_OUTPUTS source file property. Updated PrecompiledHeader test to use it (making the test simpler). 2007-09-13 13:37:45 -04:00
Brad King d926792066 ENH: Replaced dependency integrity map with an explicit map from object file to source file for each language in each target. This simplifies creation of implicit dependency scanning rules and allows more than one object file in a target to start dependency scanning with the same source file. 2007-08-07 13:57:13 -04:00
Brad King 9f2de08f90 ENH: Added cmTarget::GetLanguages method to centralize computation of the list of languages compiled in a target. 2007-08-02 13:38:39 -04:00
Brad King cd6abe486d ENH: Simplify makefile target generator listing of object files to clean. 2007-08-02 09:37:10 -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 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 142210997f BUG: Watcom WMake needs empty rule commands even for symbolic targets. This fixes the cmake_force target. 2007-05-16 13:24:17 -04:00
Brad King c51c245efa BUG: A utility target should not run the custom commands from its source files directly. The target-level rule must add dependencies on the file-level custom commands to drive them. This bug was introduced by the "fix" to bug 4377. This also restores the documented behavior that PRE_BUILD rules are treated as PRE_LINK rules on non-VS generators. Also fixed custom command dependencies on the rule file build.make so that custom commands re-run when the commands themselves change. 2007-05-01 13:51:25 -04:00
Bill Hoffman 5ed2141d12 ENH: make sure default /System framework is not added with -F 2007-03-30 10:53:02 -04:00
Brad King af95f61d76 ENH: Created method cmTarget::GetExportMacro to centralize computation of the export symbol name. This removes duplicate code from all the generators. Also enabled the export definition for executable targets with the ENABLE_EXPORTS property set. 2007-03-27 23:13:25 -04:00
Brad King 31637efbfb ENH: Added cmMakefileTargetGenerator::GenerateExtraOutput to wrap up creation of rules to drive creation of extra outputs generated as side effects of another rule. Reimplemented generation of custom command multiple output rules to use it. Reimplemented soname symlink output dependencies to use it. Now if a symlink is deleted the library will be recreated with the symlink. 2007-03-09 11:29:15 -05:00
Brad King 01dc699d82 ENH: Combined cmTarget::GetDirectory and cmTarget::GetOutputDir since they are nearly the same. This is another step for bug#2240. 2007-03-08 15:33:19 -05:00
Brad King 33ee83714d ENH: Replaced LibraryOutputPath and ExecutableOutputPath variables in Makefile and VS generators to instead ask each target for its output path. This significantly reduces total code size and centralizes previously duplicate code. It is also a step towards bug#2240. 2007-03-08 14:57:28 -05:00
Brad King 4089c76890 BUG: Some calls to Convert() were converting for MAKEFILE but then passing the output to the build shell. The calls have now been converted to call Convert() with SHELL. 2007-03-08 10:31:03 -05:00
Ken Martin 06027d1d2b ENH: fix for Watcom 2007-02-20 12:28:22 -05:00
Ken Martin e7ab8a0e1d ENH: fixed more bugs with spaces in the path 2007-02-19 14:25:45 -05:00
Ken Martin 314f5f60a0 BUG: fix for spaces in path for nmake 2007-02-19 12:26:32 -05:00
Bill Hoffman ca0230a33e ENH: check in initial conv library stuff 2007-02-16 16:12:17 -05:00
Brad King 23d8525d46 BUG: Use the exe/lib output path for .pdb file location. This addresses bug#3277 and bug#4287. 2007-02-01 16:56:36 -05:00
Ken Martin f46704fefe BUG: fix for bug number 3964 2007-02-01 11:33:30 -05:00
Brad King f7611f167c ENH: Made cmMakefileTargetGenerator::GlobalGenerator have full type cmGlobalUnixMakefileGenerator3 to give access to all methods. Fixed broken custom targets with no commands for Borland makefiles when CMAKE_SKIP_RULE_DEPENDENCY is set. 2006-12-14 14:30:41 -05:00
Bill Hoffman f2e8fd06c2 ENH: make sure things do not depend on optimized libraries if they are debug, and the other way around as well 2006-11-27 16:13:41 -05:00
Brad King 0fe0523810 BUG: Fixed out-of-source subdirectories to work when they are also out-of-binary. Updated the OutOfSource test to test this feature. 2006-10-09 21:25:58 -04:00
Brad King e4ec89d036 ENH: Added SYMBOLIC source file property to mark custom command outputs that are never actually created on disk. This is used by the Watcom WMake generator to generate the .SYMBOLIC mark on the files in the make system. 2006-10-02 10:20:53 -04:00
Brad King 9a1d4e92eb BUG: Fix/cleanup custom commands and custom targets. Make empty comment strings work. Fix ZERO_CHECK target always out of date for debugging. Fix Makefile driving of custom commands in a custom target. Fix dependencies on custom targets not in ALL in VS generators. 2006-09-28 16:40:35 -04:00
Bill Hoffman eb3da1cdf3 ENH: put the if in the right place 2006-09-12 10:21:47 -04:00
Bill Hoffman 0406aace34 ENH: fix for BUG: #739 again, makefiles did not depend on external full path libraries 2006-09-12 10:03:57 -04:00
Brad King 76f6ea8011 BUG: Fixed ordering of code generated in Makefile and build.make files to make sure .SUFFIXES rule comes as early as possible. Also cleaned up documentation in generated files. 2006-09-08 10:42:14 -04:00
Brad King 409f70bc91 ENH: Make sure all custom command outputs are up to date before scanning dependencies. This avoids the need to pass a list of generated files to the dependency scanning code and to rescan after the files have been generated. Currently there is no notion of implicit dependencies of the custom commands themselves so this design is safe. We only need to make sure implicit dependencies are up to date before the make process for the /build part of a target is executed because only this process loads them. This is a step towards fixing bug#3658. 2006-08-31 14:09:56 -04:00
Brad King c6f1a11480 BUG: Added object language to list of object files in a local generator's directory. Fixed generation of preprocessing and assembly rules to be done only for C and C++ objects. 2006-08-15 12:00:27 -04:00
Andy Cedilnik 6b5403c586 ENH: fix for no newline on some makes fix for ctest and some symlinks 2006-08-14 10:51:08 -04:00
Brad King dd37d0652f ENH: Changed preprocessed source extension to .i and assembly extension to .s for more portability. 2006-08-09 11:43:35 -04:00
Brad King 5cfa1b02ab ENH: Added generation of rules to manually request preprocessed or generated assembly sources. 2006-08-07 23:25:21 -04:00
Brad King ab61137eb1 COMP: Fix and/or disable warnings for Borland 5.6 build. 2006-08-01 11:38:42 -04:00
Ken Martin ad3ca4c009 ENH: added progress to custom commands with comments 2006-07-13 14:03:56 -04:00
Ken Martin 8ace577a2a BUG: reduce the number of file handles kept open 2006-07-12 14:15:06 -04:00
Ken Martin c05b8fb993 ENH: fix compile warning 2006-07-11 11:08:34 -04:00
Ken Martin f1dfa7e78f BUG: changed to progress to make it more flexible and to no relink targets as often 2006-07-11 09:55:27 -04:00
Andy Cedilnik 0f28edbe4a STYLE: Fix some style errors 2006-07-10 07:52:35 -04:00
Andy Cedilnik 5a71f83f7a BUG: Several fixes to handle bundle content on Mac OSX 2006-07-06 16:04:49 -04:00
Brad King 0bbcb49f65 ENH: Added generation of link rules into script files executed by a cmake -E command in order to support longer link lines. This is needed only on platforms without response file support and that may have weak shells. 2006-06-15 16:17:11 -04:00
Ken Martin 8e9a6beccc ENH: centralized locaiton of CMakeFiles setting 2006-06-14 12:28:32 -04:00
Ken Martin ede1491f5a ENH: cleanup 2006-06-12 12:18:59 -04:00
Ken Martin 14cc1efe2c ENH: some cleanup to progress 2006-06-12 11:40:31 -04:00
Ken Martin 7d5bc02c9d ENH: line lengths 2006-06-05 14:32:12 -04:00
Brad King 4189370497 BUG: Custom command outputs listed explicitly as source files in a target should be generated whether or not an object file in the target needs them. This useful and makes Makefile builds more consistent with VS IDE builds. 2006-06-01 11:45:51 -04:00
Brad King ec2104cd31 BUG: Updated Makefile dependency scanning to provide a full local generator to the dependency scanner to do proper path conversions. This allows the rules written into the depend.make files to use the same relative path conversion as those written into the build.make files. Several previous changes added more and more information for use by the dependency scanner and it was converging to having the full local generator anyway. 2006-05-25 09:47:30 -04:00
Brad King 15535c3f60 BUG: Fix for spaces in path to build directory with new progress stuff. 2006-05-23 09:58:10 -04:00
Ken Martin 50d058a3a1 ENH: always compile progress 2006-05-23 09:11:46 -04:00
Ken Martin 47c7108111 STYLE: fix line length 2006-05-12 12:29:09 -04:00
Brad King a275fefc85 BUG: Make sure each cmake_depends process uses the same SystemTools path translation table as the original process. This addresses problems with dependency scanning when make is run from a symlink directory pointing at the original binary tree. 2006-04-27 10:41:37 -04:00
Bill Hoffman 2a335ae748 ENH: ignore all files that we do not know about just like in ide generators 2006-04-20 21:54:35 -04:00
Bill Hoffman e6ef33f598 ENH: name pdb files for visual studio make based builds 2006-04-19 16:36:14 -04:00
Bill Hoffman 5ecfd3d4d3 ENH: fix java and add OBJECT_DIR support 2006-04-17 14:01:22 -04:00
Brad King b323c3f51c BUG: Work-around Watcom WMake limitation for multiple-output custom command support. 2006-04-13 10:15:48 -04:00
Brad King d5719f22c1 ENH: Added support for multiple outputs generated by a single custom command. For Visual Studio generators the native tool provides support. For Xcode and Makefile generators a simple trick is used. The first output is considered primary and has the build rule attached. Other outputs simply depend on the first output with no build rule. During cmake_check_build_system CMake detects when a secondary output is missing and removes the primary output to make sure all outputs are regenerated. This approach always builds the custom command at the right time and only once even during parallel builds. 2006-04-11 11:06:19 -04:00
Brad King eb31755eb2 ENH: Implemented VT100 terminal escape sequences. If CMAKE_COLOR_MAKEFILE is set then messages produced by makefiles will be in color if the native tool supports it. This addresses bug#3060. 2006-03-30 15:39:03 -05:00
Andy Cedilnik 40272a16bd ENH: Add support for adding content to bundles 2006-03-28 08:54:01 -05:00
Ken Martin 3d96e52261 STYLE: some m_ to this-> cleanup 2006-03-15 11:02:08 -05:00
Bill Hoffman 88bd3b5281 ENH: add support for removing language flags from shared library and shared module link commands 2006-03-14 14:03:16 -05:00
Bill Hoffman 4c5ba06fa1 ENH: use a cmake script to do the clean step, this allows for large numbers of files to be removed without making the command line too long 2006-03-09 14:30:35 -05:00
Brad King 576f0b65c7 BUG: Fix generation of Xcode 2.0 and earlier projects to use CMAKE_BUILD_TYPE. 2006-02-24 11:13:31 -05:00
Bill Hoffman 39e636a4a4 ENH: change expand stuff to pass a struct for all the args 2006-02-20 13:42:18 -05:00
Brad King e20c007181 ENH: Order compilation flags from most general to most specific: language, then target, then source. 2006-02-20 12:48:56 -05:00
Ken Martin 13661cdd23 ENH: warning fix 2006-02-16 13:42:58 -05:00
Ken Martin ff3eeef545 ENH: warning fix 2006-02-16 11:32:47 -05:00