Commit Graph

283 Commits

Author SHA1 Message Date
Brad King 6b4d3ad32a MinGW: Remove old workaround and use native echo (#12283)
The workaround added by commit 7e92f0b4 (Hack to make echo command work
properly in mingw32-make, 2006-10-05) and updated by commit 69356d8a
(Juse use cmake -E echo instead of the native echo, 2006-10-13) no
longer seems necessary with modern mingw32-make.  Furthermore it slows
performance due to the time spent loading a cmake process instead of
plain echo.
2011-06-16 15:43:17 -04:00
Brad King 42a732ba20 Change working drive only in MinGW Makefiles
The parent commit assumed that "cd /d" would work in all Windows shells.
While all modern versions of windows have shells that support it, the
shells used by NMake and Borland make do not.  Borland make does not
seem to even support changing drive letters with "d:".  Just revert the
feature for all make tools except MinGW where the shell is known to
support this feature.
2011-04-08 16:12:18 -04:00
Brad King b5676134ce Fix working drive of make rules on Windows
Teach cmLocalUnixMakefileGenerator3::CreateCDCommand to change working
directories for make tools using a Windows shell using "cd /d" instead
of just "cd".  This tells the shell to change the current drive letter
as well as the working directory on that drive.

Commit abaa0267 (When the working directory for a custom command is on
another drive..., 2007-12-17) fixed the same problem for VS IDE
generators as reported by issue #6150.
2011-04-08 15:36:55 -04: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 542b517449 Factor out common custom command generator
The Makefile, VS, and Xcode generators previously duplicated some custom
command line generation code.  Factor this out into a separate class
cmCustomCommandGenerator shared by all generators.
2010-12-08 17:29:20 -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
Alex Neundorf a02987a0df Don't enforce VERBOSE makefiles for the CodeBlocks generator
Instead of enforcing verbose makefile, now the generated build command
includes "VERBOSE=1" so the output will be verbose when building in
C::B.
Also removed the now unused setForceVerboseMakefiles().

Alex
2010-11-11 22:06:09 +01:00
Alex Neundorf 7b1421b885 Remove trailing whitespace
Alex
2010-11-11 22:02:07 +01:00
David Cole 269a4b876a Enable calling commands with : in argv[1] (#9963)
The solution seems hackish, but it works: for
NMake only, prepend a no-op command before each
real command that begins with ".

This is really a work-around for an NMake problem.
When a command begins with ", nmake truncates the
first argument to the command after the first :
in that arg. It has a parsing problem.

Workaround..., hackish..., but it should solve
the issue for #9963 and its related friends.

Also, modify the CustomCommand test to replicate
the problem reported in issue #9963. Before the
NMake specific code change, the test failed.
Now, it passes. Ahhhhhh.
2010-09-10 17:55:45 -04:00
David Cole d093abef7e Fix failing ExternalProject test on Borland dashboards.
If there is a .bat or .cmd file used as a custom command
then the Borland Makefiles generator (specifically) requires
using the "call " syntax before the name of the .bat or .cmd
file. This fix applies to all Makefile based generators where
WindowsShell is true.
2010-06-03 13:43:39 -04:00
David Cole f9c0e13975 Fix warnings in CMake source code. 2009-09-30 11:46:42 -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
Alexander Neundorf 39383ef8cb Major optimization of C/C++ dependency scanning.
Now only the dependencies for the file where the dependencies actually may
have changed are rescanned, before that this was done for all source files
even if only one source file had changed.
This reduces e.g. on my machine the time for scanning the dependencies
of kdelibs/khtml/ when only one file (khtml_global.cpp) has changed from
around 7.5 seconds to 1.2 seconds.

The tests succeed, it does what I expected it to do on kdelibs, and Brad
also reviewed the patch, so I think it should be ok.

Alex
2009-09-23 14:02:05 -04:00
Alexander Neundorf 03d032b637 Rescan dependencies also if CMakeDirectoryInformation.cmake has changed.
If CMakeDirectoryInformation.cmake is newer than depend.internal the include
directories may have changed, so dependencies need to be scanned again.
Ok by Brad.

Alex
2009-09-22 14:40:23 -04:00
Alexander Neundorf 298de4374b Major improvement of the generated targets in Eclipse.
Before this change all targets were displayed in the top level directory of
the project. Now the targets are displayed in the correct directory.
The targets "clean" and "all" are now created in every subdirectory.
Also now the targets for just compiling one file, preprocessing one file,
assembling one file are are created for Eclipse.
Additionally all targets get a prefix now in eclipse, so that they are
sorted in a way which makes sense (global targets first, then executable and
libraries, then object files, then preprocessed, then assembly). Also
this prefix gives the user a hint what the target is, i.e. whether it's a
library or an executable or something else.

Alex
2009-09-16 18:01:23 -04:00
Brad King 04b834f1b4 BUG: Disable color makefile inside try-compile
Generated makefiles for try-compile projects should never use color
output.  On MSYS the color escapes end up in the try-compile output text
because there is no way to identify whether the output is going to a
color-capable terminal.  Instead we should just always skip color for
try-compile projects.
2009-07-21 11:58:43 -04:00
Brad King a3a046643a ENH: Pass config to cmTarget RPATH install methods
This passes the build configuration to cmTarget methods IsChrpathUsed
and NeedRelinkBeforeInstall.  Later these methods will use the value.
2009-07-08 13:03:47 -04:00
Brad King cd83f1979d ENH: Cleanup make progress rule generation code
This cleans up the Makefile generator's progress rule code.  Instead of
keeping every cmMakefileTargetGenerator instance alive to generate
progress, we keep only the information necessary in a single table.
This approach keeps most of the code in cmGlobalUnixMakefileGenerator3,
thus simplifying its public interface.
2009-06-25 09:58:51 -04:00
Brad King b9a98ef65b STYLE: Remove unused variable 2009-06-25 09:43:19 -04:00
Brad King c8795101a4 ENH: Skip 'SHELL = /bin/sh' in Makefiles on VMS
This shell does not exist on VMS, so we leave it out.
2009-06-10 13:03:37 -04:00
Brad King 516add4d58 ENH: On VMS use _dir and _tmp, not .dir and .tmp
The VMS posix path emulation does not handle multiple '.' characters in
file names in all cases.  This avoids adding extra '.'s to file and
directory names for target directories and generated files.
2009-06-10 13:03:11 -04: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 c895d9f2e0 ENH: Give target in which custom commands build
This gives the cmTarget instance for which custom command rules are
being generated to cmLocalUnixMakefileGenerator3::AppendCustomCommands.
It will be useful in the future.
2009-02-10 08:50:33 -05:00
Alexander Neundorf bd92bec66c STYLE: fix two typos in the comments, patch from Daniel DOT Teske AT Nokia DOT com, QtCreator developer
Alex
2009-02-09 16:36:56 -05:00
Brad King ac9b7ec155 ENH: Refactor custom command rule hashing
This simplifies computation of custom command rule hashes to hash
content exactly chosen as the custom commands are generated.
Unfortunately this will change the hashes of existing build trees from
earlier CMake versions, but this is not a big deal.  The change is
necessary so that in the future we can make optional adjustments to
custom command lines at generate time without changing the hashes every
time the option is changed.
2009-02-02 13:28:12 -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 416bf5730f ENH: Simplify makefile ref to interactive editor
The CMAKE_EDIT_COMMAND make variable need not be constructed with
ConvertToOutputForExisting.  The CMAKE_COMMAND variable works fine
without it.
2008-10-09 15:08:53 -04:00
Brad King 934c832cba BUG: Fix convenience rule working directory
We generate convenience rules to build object files, preprocessed
outputs, and assembly outputs of source files individually with make
rules.  This removes a redundant working directory change when more than
one target builds the same source file.
2008-10-06 11:04:06 -04:00
Brad King a1bb7e90ef ENH: Allow users to specify macro-like #include line transforms for dependency scanning.
- Define IMPLICIT_DEPENDS_INCLUDE_TRANSFORM property on targets and directories.
  - Make the directory version inherited.
  - See issue #6648.
2008-05-14 11:54:52 -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
Brad King 09dd298f63 BUG: Fix logic that loops over multiple output pairs to not loop beyond the vector when there are an odd number of entries. 2008-05-10 18:39:00 -04:00
Brad King 12935b1599 ENH: Light refactoring of implicit dependency scanning configuration implementation.
- Move lookup of config variables from cmLocalUnixMakefileGenerator3 to cmDepends hierarchy.
2008-05-08 10:09:14 -04:00
Brad King 55606b155e BUG: Fix repeated re-scanning of dependencies when the results do not change.
- We re-scan deps when DependInfo.cmake is newer than depend.internal
  - Therefore depend.internal should not be copy-if-different
2008-05-07 17:25:05 -04:00
Brad King 9631c499dc BUG: For Watcom WMake use the short path to avoid quoting problems in custom commands with shell redirections. 2008-04-30 15:58:56 -04:00
Bill Hoffman d1281f5cbc BUG: the sun make goes into some odd n squared thing with this sccs and rcs stuff for gmake, so I am removing them. 2008-04-10 11:55:49 -04:00
Bill Hoffman 5905d79c8a ENH: fix for watcom can't use phony 2008-03-25 10:11:48 -04:00
Bill Hoffman a24ff4e453 ENH: add PHONY targets 2008-03-24 10:26:38 -04:00
Bill Hoffman dec1221f0b ENH: exclude borland make as well 2008-03-18 11:51:23 -04:00
Bill Hoffman cb512cd513 ENH: turn off extra rules for nmake and wmake 2008-03-18 11:28:59 -04:00
Bill Hoffman 813779d962 ENH: try to improve make speed by getting rid of some implicit rules that were still around. 2008-03-18 10:02:31 -04:00
Bill Hoffman 5ab6c0f0ed ENH: remove abort calls and replace with an IssueMessage INTERANL_ERROR, better to not crash on the end user. 2008-03-12 21:06:32 -04:00
Brad King b78997d71d BUG: Fix subtle bug that prevented Makefile generators from rescanning dependencies when a new source file is added but no other sources are touched. 2008-03-11 17:53:54 -04: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 342a32a2c0 BUG: Apply patch from bug #6180 to make CMAKE_ADDITIONAL_MAKE_CLEAN_FILES work for directories. 2008-02-15 11:56:13 -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
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 6ad79d13dd BUG: Construction of COMPILE_DEFINITIONS_<CONFIG> property name must use upper-case config name. 2008-01-18 08:35:37 -05:00