Commit Graph

10 Commits

Author SHA1 Message Date
Stephen Kelly bbffccca42 add_custom_command: Evaluate generator expressions in DEPENDS
Rely on evaluation in cmCustomCommandGenerator for the generators.

When tracing target dependencies, depend on the union of dependencies
for all configurations.
2014-03-20 09:21:56 -04:00
Brad King bc993f277e Generalize cmCustomCommandGenerator to more fields
Until now the cmCustomCommandGenerator was used only to compute the
command lines of a custom command.  Generalize it to get the comment,
working directory, dependencies, and outputs of custom commands.  Update
use in all generators to support this.
2014-03-12 10:44:01 -04:00
Stephen Kelly 21c573f682 Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
2014-03-11 15:03:50 +01:00
Ben Boeckel 84fdc9921c stringapi: Pass configuration names as strings 2014-03-08 13:05:36 -05:00
Rolf Eike Beer c768e398f9 cmMakefile: make some methods take const std::string& instead of const char*
Most callers already have a std::string, on which they called c_str() to pass it
into these methods, which internally converted it back to std::string. Pass a
std::string directly to these methods now, avoiding all these conversions.
Those methods that only pass in a const char* will get the conversion to
std::string now only once.
2014-01-16 09:28:29 -05:00
Stephen Kelly 76ea420fb9 Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressions
The compiled generator expressions need to outlive the creating
type. For the same reason, store the input string in a std::string.
2012-12-20 12:17:37 +01:00
Stephen Kelly 91011bd217 cmGeneratorExpression: Port users to two-stage processing
Removing the Process() API and removing the parameters from the
constructor will allow cmGeneratorExpressions to be cached and evaluated
with multiple configs for example, such as when evaluating target
properties.  This requires the creation of a new compiled representation
of cmGeneratorExpression.  The cmListFileBacktrace remains in the
constructor so that we can record where a particular generator
expression appeared in the CMakeLists file.
2012-09-18 17:03:08 -04:00
Brad King f0cdb6001b Introduce "generator expression" syntax to custom commands (#11209)
Evaluate in the COMMAND arguments of custom commands the generator
expression syntax introduced in commit d2e1f2b4 (Introduce "generator
expressions" to add_test, 2009-08-11).  These expressions have a syntax
like $<TARGET_FILE:mytarget> and are evaluated during build system
generation.  This syntax allows per-configuration target output files to
be referenced in custom command lines.
2010-12-15 14:53:48 -05: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 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