Commit Graph

24500 Commits

Author SHA1 Message Date
Brad King 718a9532c6 cmTarget: Refactor ComputePDBOutputDir interface
Add a runtime parameter to specify the property name prefix.
Update the call site to pass "PDB" to preserve the existing
name for that call path.
2014-02-24 14:12:31 -05:00
Brad King aae5184c16 Help: Refactor PDB_NAME and PDB_OUTPUT_DIRECTORY docs
Move the note about VS 6 into the PDB_NOTE.txt common include file
and include it from the per-config properties too.  Also re-word
the note to clarify the separate compiler and linker flags involved
and state explicitly that compiler flags are not affected.
2014-02-24 13:44:27 -05:00
Brad King b4aac0caca Makefile: Fix per-config linker PDB output directory
Also, now that all call sites of cmTarget::GetPDBName and
cmTarget::GetPDBDirectory pass the configuration, make the
argument non-optional.
2014-02-24 13:44:24 -05:00
Brad King cf7677d0a7 Merge branch 'fix-find_dependency-macro' into release 2014-02-24 13:29:19 -05:00
Stephen Kelly 2be6dbe420 find_dependency: Ensure that ARGV1 has valid local content
The ARGV1 value could come from a wrapping context if find_dependency
is called from a function.
2014-02-24 19:00:42 +01:00
Stephen Kelly a35ce7235b find_dependency: Add namespacing for variables in the macro.
Avoid setting a variable called 'version' etc.
2014-02-24 19:00:31 +01:00
Stephen Kelly f9d5b1fd0f Handle Mac OSX source flags for individual files lazily.
The actual list of files will become config dependent in a follow-up
commit.
2014-02-24 16:45:25 +01:00
Stephen Kelly 64d398416a cmGeneratorTarget: Classify sources on demand, not up front.
Implement a Visitor to hold the sequence of source file tests
for populating outputs.  Use VS 6 and 7 workaround from Brad
King for lack of partial template specialization and function
template specialization capabilities.

This will make it possible to use context dependent generator
expressions to determine the sources of a target.
2014-02-24 16:44:51 +01:00
Stephen Kelly d3682d8647 cmGeneratorTarget: Use a method to access the definition file. 2014-02-24 16:43:25 +01:00
Stephen Kelly 5771f81d91 cmTarget: Add GetTransitiveTargetClosure method.
Replace calls to GetLinkInformation with calls to a method to get only
the target closure, not the link languages etc.  The replaced calls
are used while evaluating generator expressions only.  This makes
transitive generator expression evaluation independent from
the languages of a target.  In a follow-up topic, it will be possible
to make the languages depend on generator expression evaluation, via
evaluation of the SOURCES and INTERFACE_SOURCES target properties.

Because the order of entries is not the same as the final link line,
the order of debug output is different in the RunCMake.CompatibleInterface
test, because the BOOL_PROP7 target property is evaluated first. Adjust
the test to account for that new order.
2014-02-24 16:43:24 +01:00
Stephen Kelly a6dd4990db cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibility
This simplifies further refactoring.
2014-02-24 16:43:24 +01:00
Stephen Kelly b8b99cc1e5 cmTarget: Avoid computing languages when computing transitive targets.
For the OLD CMP0022 behavior, we need to treat the implementation
as the interface when computing the interface libraries.  Make it
possible to do that without computing the link languages by adding
a new GetLinkImplementationLibraries method.  Extend the existing
GetLinkImplementation method to populate the languages if the
libraries have already been computed and cached.

Change GetTransitivePropertyTargets to invoke GetLinkInterfaceLibraries
instead of GetLinkInterface.  This is key, as it is a method called
by cmGeneratorExpressionEvaluator.

Change the cmGeneratorExpressionEvaluator to invoke
GetLinkImplementationLibraries instead of GetLinkImplementation.
2014-02-24 16:43:24 +01:00
Stephen Kelly 01bca553b8 cmTarget: Move ComputeLinkInterface to the internal class.
In a follow-up, this will use the OptionalLinkInterface in its
API. That class is in the cmTargetInternals class.
2014-02-24 16:43:24 +01:00
Stephen Kelly d93e1af292 cmTarget: Extract a ComputeLinkInterfaceLibraries method.
When evaluating the SOURCES property, we will need to be able to access
the link libraries without accessing the link languages, as the languages
depend on the SOURCES.
2014-02-24 16:43:24 +01:00
Stephen Kelly 3bcb197c11 cmTarget: Re-arrange the ComputeLinkInterface method.
Arrange the logic so that the part which deals with libraries only is
at the top.  In a follow-up commit, this will be split into two methods.

Ensure that the explanatory CMP0022 comment is only present in one
location.
2014-02-24 16:43:24 +01:00
Stephen Kelly 326d07d27e cmTarget: Extract a ComputeLinkImplementationLanguages method. 2014-02-24 16:43:23 +01:00
Stephen Kelly 21e91350b0 cmTarget: Change GetTransitivePropertyLinkLibraries to output targets.
The callers already skip non-targets, so unify the target search.

Change supporting functions to accept a container of targets instead
of strings where possible.
2014-02-24 16:43:23 +01:00
Stephen Kelly f81eb49e8b cmTarget: Find source files on request.
In a follow-up, the list of sources will become dependent on
the config, so check for existence in cmTarget::GetSourceFiles
instead of up-front with cmGlobalGenerator::CheckTargets().
2014-02-24 16:43:23 +01:00
Stephen Kelly 84e5f5a004 cmTarget: Move SourceFileFlags to cmGeneratorTarget. 2014-02-24 16:43:23 +01:00
Brad King fb5b48bb27 Merge topic 'variable-expansion-tests'
a9bdef2d tests: Add variable expansion tests
2014-02-24 10:40:09 -05:00
Brad King 624b0fa923 Merge topic 'ExternalProject-BUILD_ALWAYS'
73e5c6ae ExternalProject: Add option to always run the build step
2014-02-24 10:40:07 -05:00
Brad King 461eaee53e Merge topic 'fix-find_dependency-macro'
5878c5d9 Always set version variable of find_dependency macro
2014-02-24 10:40:06 -05:00
Brad King cf42f93d07 Merge topic 'install-FILES-genex'
6e89c8a5 install: Support generator expressions in FILES and PROGRAMS mode
f11f7b34 cmInstallFilesGenerator: Add reference to calling cmMakefile
e190236c Help: Format install() command documentation
2014-02-24 10:40:04 -05:00
Brad King c124c7de1d Merge topic 'doc-add_test-cleanup'
8afa5fe8 Help: Revise and format add_test() command documentation
2014-02-24 10:40:03 -05:00
Julien Schueller f0111deb1e UseSWIG: Name extra generated files after module name (#10080) 2014-02-24 10:31:32 -05:00
Brad King b686154b61 Merge branch 'install-FILES-genex' into release 2014-02-24 09:16:36 -05:00
Kitware Robot 2f2bb105d5 CMake Nightly Date Stamp 2014-02-24 00:01:04 -05:00
Alex Merry 5878c5d919 Always set version variable of find_dependency macro
If there is no ARGV1, that is fine; version will be made empty, and no
version will be passed to find_package().

This is relevant when find_dependency is invoked multiple times,
sometimes with a version specified and sometimes without.

 find_dependency(dep1 3.4)
 find_dependency(dep2) # version still set to 3.4.
2014-02-23 11:31:30 +01:00
Kitware Robot 01981d8e45 CMake Nightly Date Stamp 2014-02-23 00:01:05 -05:00
Kitware Robot 4e647cf6b5 CMake Nightly Date Stamp 2014-02-22 00:01:06 -05:00
Brad King 6e89c8a5f1 install: Support generator expressions in FILES and PROGRAMS mode
Teach the install(FILES) and install(PROGRAMS) commands to evaluate
generator expressions in the list of files.

Extend the ExportImport test to cover installation cases involving
generator expressions.
2014-02-21 17:05:26 -05:00
Brad King f11f7b34a8 cmInstallFilesGenerator: Add reference to calling cmMakefile
Add a Makefile member to the cmInstallFilesGenerator class and
populate it on construction.  This will be useful in a following
change to evaluate generator expressions with proper context.
2014-02-21 17:05:26 -05:00
Brad King e190236c74 Help: Format install() command documentation
Add inline markup and explicit markup blocks as appropriate.
2014-02-21 17:05:26 -05:00
Ben Boeckel 7c565d2fd5 cmGeneratorExpression: Improve parsing in StripEmptyListElements
The char-by-char parsing causes lots of reallocations which shouldn't be
necessary. To improve this, fast-path strings without a semicolon,
reserve space in the result, and insert into the result in chunks.
2014-02-21 16:56:06 -05:00
Ben Boeckel 68eb175744 cmGeneratorExpressionLexer: Use a switch statement to parse
Optimize cmGeneratorExpressionLexer::Tokenize to use a switch statement.
The many dereferences of the input pointer were expensive. Also remove
excess pointer arithmetic.
2014-02-21 16:56:06 -05:00
Ben Boeckel 67253133f8 ExpandListArguments: Optimize the parser
Optimize cmSystemTools::ExpandListArguments so as not to build a string
character-by-character. This avoids excess reallocations of the result
string.
2014-02-21 16:56:06 -05:00
Ben Boeckel a9bdef2dda tests: Add variable expansion tests
There are some corner cases in variable expansion which would be nice to
capture before going and rewriting the variable expansion code. The
majority of these are related to configuring files and strings with '@'
in them in conjunction with @ONLY being specified. Another is testing
for '(' usage inside of ENV variable references based on whether it is
quoted or not.
2014-02-21 16:39:12 -05:00
Brad King 73e5c6aead ExternalProject: Add option to always run the build step
Teach ExternalProject_Add a new BUILD_ALWAYS option to skip using
the build step stamp file and execute the step on every build.

Extend the BuildDepends test with a case to cover this option.
2014-02-21 11:05:41 -05:00
Kitware Robot c0bbefbfe7 CMake Nightly Date Stamp 2014-02-21 00:01:11 -05:00
Brad King 549b4d02d4 Merge branch 'doc-add_test-cleanup' into release 2014-02-20 09:53:08 -05:00
Brad King 8afa5fe8ce Help: Revise and format add_test() command documentation
Favor the add_test(NAME) signature and document the limitations of
the plain signature.
2014-02-20 08:58:13 -05:00
Kitware Robot 44e784342d CMake Nightly Date Stamp 2014-02-20 00:01:10 -05:00
Brad King 28dcccface Begin post-3.0 development 2014-02-19 09:30:37 -05:00
Brad King 38082dea2b Merge branch 'release' 2014-02-19 09:30:28 -05:00
Brad King 7cbab17871 Change version scheme to use only two components for feature levels
Historically CMake used three version components for the feature level.
We released new features while incrementing only the third version
component.  Since commit v2.8.2~105^2~4 (New version scheme to support
branchy workflow, 2010-04-23) we used the fourth version component for
bug-fix releases and the development date:

 <major>.<minor>.<patch>[.<tweak>][-rc<n>] = Release
 <major>.<minor>.<patch>.<date>[-<id>]     = Development

This solidified use of three components for the feature level, and was
necessary to continue releasing 2.x versions because:

* Some existing projects performed floating-point comparisons of
  ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} to 2.x numbers
  so ``x`` could never be higher than 9.

* Version 2.9.<date> was used briefly in post-2.8.0 development in
  CVS prior to the transition to Git, so using it in releases may
  have caused confusion.

Now that we are moving to 3.x versions, these two restrictions go away.
Therefore we now change to use only two components for the feature
level and use the scheme:

 <major>.<minor>.<patch>[-rc<n>] = Release
 <major>.<minor>.<date>[-<id>]   = Development
2014-02-19 09:30:13 -05:00
Brad King f8ccb6d038 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2014-02-19 09:30:12 -05:00
Brad King 4bb80396e0 CMake 3.0.0-rc1 version update 2014-02-19 09:30:12 -05:00
Brad King db68dd2454 Help: Rename 3.0 release notes to 3.0.0
Bug-fix releases 3.0.x may have their own notes so this will look more
consistent.
2014-02-19 09:30:00 -05:00
Brad King d30e4fa703 Help: Consolidate remaining 3.0 release notes 2014-02-19 08:39:44 -05:00
Brad King a7c956b867 Merge topic 'doc-usage-requirements'
0c54b775 Help: Document the purpose of usage requirements clearly.
2014-02-19 08:34:29 -05:00