Commit Graph

13407 Commits

Author SHA1 Message Date
Brad King 15cc55fe08 Merge topic 'documentation-cleanup'
4ad0233 Remove period at the end of the check message.
50b1ea5 Fix minor typos.
19c3206 Remove unused parameter marker and the unused parameter.
9d462b2 Document that generator expressions can be used in target properties.
daf88c3 Fix punctuation in some variables documentation.
3172cde Fix the layout of the generator expression documentation.
2012-10-01 14:05:44 -04:00
Brad King 49c7b649f9 Merge topic 'export-sets'
80112da Merge topic 'AutomocUseTargetProperties' into export-sets
955b966 exports: add a test for exporting dependent targets
6f50a04 exports: define a CMAKE_FIND_PACKAGE_NAME var set by find_package()
0cfd055 exports: move the handling of missing targets into subclasses
190f2c8 exports: fix build with MSVC6
8b5f448 exports: first try at error handling if a target is missing
87f4c01 exports: accept a missing target if it is exported exactly once
999061a exports: store pointers to all installations of each export set
64b3a6c exports: cmGlobalGenerator::ExportSets destructor will clear it
81cdab5 exports: Hold an ExportSet pointer in cm*Export*Generator
5c898fb exports: Add cmExportSetMap class
d13ec1a exports: Create class cmExportSet
4e2347c exports: Rename cmGlobalGenerator::AddTargetToExport{s,}
e846e70 exports: Remove cmTargetExport constructor
81c66c8 exports: Move cmTargetExport to a dedicated header file
ae4ab62 find_package: add support for a <package>_NOT_FOUND_MESSAGE variable
...
2012-10-01 14:05:35 -04:00
Brad King 7dce31f3d0 Merge topic 'vs-pdb-output'
2ccca05 Run PDBDirectoryAndName test on MSVC and Intel
efc83b3 Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6
b294457 Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test
3f60dbf Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
2012-10-01 14:05:11 -04:00
Rolf Eike Beer 6187876dea CTest: fix pre and post test commands with spaces
If the pre or post memcheck or test commands have spaces in the path these
were never escaped, leading to broken commands. This was not covered in the
test suite so it went unnoticed.
2012-10-01 17:39:09 +02:00
Rolf Eike Beer 95bc8aa6c4 CTest: fix usage of memory checker with spaces in path
The filename was escaped in cmCTestMemCheckHandler::InitializeMemoryChecking()
and again before it was written to output in
cmCTestRunTest::ComputeArguments().

Once someone uses e.g. a valgrind path with spaces this leads to double escaping
making the memory checker fail completely because of the invalid path.
2012-10-01 17:39:09 +02:00
Kitware Robot 7fc4d81384 CMake Nightly Date Stamp 2012-10-01 00:01:03 -04:00
Alex Neundorf 80112da54e Merge topic 'AutomocUseTargetProperties' into export-sets
Conflicts:
	Source/cmGlobalGenerator.h
2012-09-30 10:27:44 -04:00
Alex Neundorf 6f50a04cc1 exports: define a CMAKE_FIND_PACKAGE_NAME var set by find_package()
This way the name of the searched package can be accessed in find-modules,
config-files and more importantly in generated target export files.
This is now used when a target export file detects that a required
target does not exist.

Alex
2012-09-30 10:26:54 -04:00
Alex Neundorf 0cfd055acd exports: move the handling of missing targets into subclasses
Before, cmExportFileGenerator::ComplainAboutMissingTarget() was a virtual
function which had to be implemented in the subclasses. It is not
anymore. Instead, there is now a virtual function
HandleMissingTargets(), which is implemented in the two subclasses.
This makes e.g. dealing correctly with APPEND mode easier.

Alex
2012-09-30 10:26:10 -04:00
Kitware Robot 554d4ed584 CMake Nightly Date Stamp 2012-09-30 00:01:04 -04:00
Stephen Kelly 50b1ea5bed Fix minor typos.
nothe -> note
than -> that
duplicat -> duplicate
directory -> directly
Wipe wipe -> Wipe
2012-09-29 18:44:10 +02:00
Stephen Kelly 19c3206bdc Remove unused parameter marker and the unused parameter. 2012-09-29 18:42:56 +02:00
Stephen Kelly 9d462b22a3 Document that generator expressions can be used in target properties. 2012-09-29 18:42:56 +02:00
Stephen Kelly daf88c3698 Fix punctuation in some variables documentation. 2012-09-29 18:42:56 +02:00
Stephen Kelly 3172cde640 Fix the layout of the generator expression documentation. 2012-09-29 18:42:55 +02:00
Kitware Robot 8956b7e887 CMake Nightly Date Stamp 2012-09-29 00:01:04 -04:00
Brad King 103d99338a Merge topic 'generator-expression-target-properties'
083de7e Process generator expressions in the COMPILE_DEFINITIONS target property.
08cb4fa Process generator expressions in the INCLUDE_DIRECTORIES property.
0ef091d Early return if there is no target.
eb250cd Add a self-reference check for target properties.
7e80747 Add API to check that dependent target properties form a DAG.
239ac84 Add a generator expression for target properties.
e028381 Extend the generator expression language with more logic.
b8e61d6 Refactor GetCompileDefinitions a bit.
2c2b25b Return a std::string from GetCompileDefinitions.
b7e48e0 Add an AppendDefines std::string overload.
9a16087 Convert paths in INCLUDE_DIRECTORIES property to Unix slashes.
4557c8d Don't prepend a path before generator expressions in include_directories.
c6abc41 Add include guard for cmGeneratorExpression.
0ff4e3f Port remaining code to GetCompileDefinitions().
f178d53 Fix indentation in the code blocks generator.
2012-09-28 17:15:03 -04:00
Alex Neundorf 190f2c8253 exports: fix build with MSVC6
it seems it doesn't like deleting const pointers

Alex
2012-09-28 17:00:52 -04:00
David Cole eaba65e308 Merge topic 'ninja-OBJECT_DEPENDS'
8f0e08d Ninja: OBJECT_DEPENDS should set an implicit dependency
2012-09-28 15:45:11 -04:00
David Cole af5fac8d17 Merge topic 'ctest-svn-non-interactive'
9ace801 ctest_update: Tell svn not to prompt interactively (#13024)
2012-09-28 15:45:02 -04:00
Alex Neundorf 8b5f448ba6 exports: first try at error handling if a target is missing
Now, if an imported target depends on a library which must come
from some other export set, cmake generates a check which errors
out if that target does not exist. I guess instead of completely
erroring out it would be better to only make the find_package() fail.

Alex
2012-09-28 09:21:42 -04:00
Alex Neundorf 87f4c01910 exports: accept a missing target if it is exported exactly once
If a target is exported, and a library it depends on is not part
of the same export set, before this patch cmake errored out.
With this patch, it now checks whether the missing target
is exported somewhere else exactly once, and accepts in this
case (because then it can determine the namespace for the
missing target and use this).

Alex
2012-09-28 09:21:42 -04:00
Alex Neundorf 999061a4c2 exports: store pointers to all installations of each export set
This information will be used to check whether a target is exported
once or multiple times and to check its namespace.

Alex
2012-09-28 09:21:39 -04:00
Yury G. Kudryashov 64b3a6c9cf exports: cmGlobalGenerator::ExportSets destructor will clear it 2012-09-28 09:21:39 -04:00
Yury G. Kudryashov 81cdab5bea exports: Hold an ExportSet pointer in cm*Export*Generator
Get name from this->ExportSet.
2012-09-28 09:21:39 -04:00
Yury G. Kudryashov 5c898fbd99 exports: Add cmExportSetMap class
This is a map<string, cmExportSet *> with overloaded operator[] and destructor.
2012-09-28 09:21:39 -04:00
Yury G. Kudryashov d13ec1ac31 exports: Create class cmExportSet
Replace direct use of 'std::vector<cmTargetExport const*>' with a
dedicated class.
2012-09-28 09:21:39 -04:00
Yury G. Kudryashov 4e2347cbf3 exports: Rename cmGlobalGenerator::AddTargetToExport{s,}
This function adds target to one export, not to several exports.
2012-09-28 09:21:39 -04:00
Yury G. Kudryashov e846e7031f exports: Remove cmTargetExport constructor
The constructor was used exactly once.
Setting members explicitly makes the code more readable.
2012-09-28 09:21:39 -04:00
Yury G. Kudryashov 81c66c8b88 exports: Move cmTargetExport to a dedicated header file 2012-09-28 09:21:38 -04:00
Alex Neundorf ae4ab62569 find_package: add support for a <package>_NOT_FOUND_MESSAGE variable
If a config-file sets <package>_FOUND to FALSE, it can now give a reason
using the variable <package>_NOT_FOUND_MESSAGE, which is used by cmFindPackage
and FPHSA.

Alex
2012-09-28 09:21:36 -04:00
Alex Neundorf 65a30c69a2 cmGlobalGenerator.h: some minor coding style fixes
- this-> was missing
- removed unnecessary semicolons
- indented unindented lines

Alex
2012-09-28 09:20:20 -04:00
Stephen Kelly 083de7ed35 Process generator expressions in the COMPILE_DEFINITIONS target property. 2012-09-28 08:50:16 -04:00
Stephen Kelly 08cb4fa4c0 Process generator expressions in the INCLUDE_DIRECTORIES property.
This use of generator expressions, like all others to come which operate
on target properties, must initalize the dag checker.
2012-09-28 08:50:10 -04:00
Stephen Kelly 0ef091d986 Early return if there is no target.
The remainder of this method depends on the target existing (otherwise
the includes container would be empty), so make the code a little more
readable.
2012-09-28 08:49:21 -04:00
Stephen Kelly eb250cd18a Add a self-reference check for target properties.
Prevent constructs like:

 ... INCLUDE_DIRECTORIES "$<TARGET_PROPERTY:INCLUDE_DIRECTORIES>"

Indirect self-references (cycles) are also prevented here, but
indirect generator expression references of any kind are not
possible yet anyway.
2012-09-28 08:49:21 -04:00
Stephen Kelly 7e807472d2 Add API to check that dependent target properties form a DAG.
Initially this will only be used to check for self-references, but
can be extended to check for cycles when chaining properties of other
targets.
2012-09-28 08:49:21 -04:00
Stephen Kelly 239ac84153 Add a generator expression for target properties.
There are two overloads, so that it can use the operational
target when a target property is being evaluated, and a target
can alternatively be specified by name.

At this point, the generators don't chain. That comes later.
2012-09-28 08:49:21 -04:00
Stephen Kelly e028381bf1 Extend the generator expression language with more logic.
Generator expressions for comparing strings, evaluating
strings as booleans, and for creating literal right-angle-brackets
and commas are added. Those may be needed in some cases
where they appear in literals.
2012-09-28 08:49:21 -04:00
Peter Kümmel f1670ab18a Ninja: don't confuse ninja's rsp files with nmake's
Move response files into CMakeFiles/ which makes them different to nmake's.
2012-09-28 12:33:57 +02:00
Kitware Robot 64d64b4edf CMake Nightly Date Stamp 2012-09-28 00:01:05 -04:00
Kitware Robot 137ad7c755 CMake Nightly Date Stamp 2012-09-27 00:01:02 -04:00
Kitware Robot 7892c87464 CMake Nightly Date Stamp 2012-09-26 00:01:06 -04:00
Peter Kümmel 8f0e08d503 Ninja: OBJECT_DEPENDS should set an implicit dependency
BUG 13559
2012-09-25 22:22:55 +02:00
Brad King efc83b369b Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6 2012-09-25 15:23:35 -04:00
Yuchen Deng 3f60dbf148 Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
This enables changing the name and output folder of the debug symbol
files produced by MS compilers.

Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
2012-09-25 15:23:35 -04:00
David Cole 2e489526fa Merge topic 'AutomocUseTargetProperties'
e83cc94 Use the cmGeneratorTarget for the include directories API.
9d8e59d Merge branch 'use-generator-target' into AutomocUseTargetProperties
ea12871 Automoc: also the makefile-COMPILE_DEFINITIONS
894e91a Automoc: do not use DEFINITIONS, but only COMPILE_DEFINITIONS
825d1ab Automoc: fix #13493, use target properties for include dirs
2012-09-25 15:18:43 -04:00
David Cole 3f3b731961 Merge topic 'use-generator-target'
879fd35 Revert "Move GenerateTargetManifest to cmGeneratorTarget."
6674583 Fix compiler warning with initialization order.
5285458 Add convenience for getting a cmGeneratorTarget to use.
c31f3d9 Add a wrapper for accessing config-specific compile-definitions.
d1446ca Append the COMPILE_DEFINITIONS from the Makefile to all targets.
290e92a Move GetIncludeDirectories to cmGeneratorTarget.
f9146f6 Port cmLocalGenerator::GetTargetFlags to cmGeneratorTarget.
9facfd1 Move GetCreateRuleVariable to cmGeneratorTarget.
78bfee3 Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget.
4f5384e Move GetLinkInformation to cmGeneratorTarget
987e12e Move GenerateTargetManifest to cmGeneratorTarget.
14bf778 Store cmGeneratorTargets with the makefile.
f428ca2 Add more forwarding API to cmGeneratorTarget.
2012-09-25 15:18:34 -04:00
David Cole 021e66a25c Merge topic 'osx-sysroot-cleanup'
df92864 OS X: Ignore MACOSX_DEPLOYMENT_TARGET during Xcode compiler id
e7e613e OS X: Teach deployment target sanity check about SDK names
43b7479 OS X: Further improve default CMAKE_OSX_SYSROOT selection
2690738 OS X: If CMAKE_OSX_SYSROOT is already set do not compute default
7995722 OS X: Simplify selection of CMAKE_OSX_ARCHITECTURES
1786b12 OS X: Allow CMAKE_OSX_SYSROOT to be a logical SDK name
242f673 Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file
a1c032b bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot
230ea21 OS X: Improve default CMAKE_OSX_SYSROOT selection
a0a0877 OS X: Always generate -isysroot if any SDK is in use
33a60e6 Xcode: Remove unused code reading CMAKE_OSX_SYSROOT_DEFAULT
2012-09-25 15:18:24 -04:00
David Cole 5549334a99 Merge topic 'qt5-qtdialog-port'
92b6d85 Enable deprecated API when using Qt 5.
2012-09-25 15:18:14 -04:00
David Cole 8dbe39c6c7 Merge topic 'generator-expression-refactor'
f20af79 Handle colons as a special case in the generator expression parser.
fb578c8 Fix the regular expression validator for target names.
2012-09-25 15:17:45 -04:00
David Cole 92be70d683 Merge topic 'vs8-generator-doc'
750fcaa VS8: Remove '.NET' from generator description (#10158)
2012-09-25 15:17:17 -04:00
David Cole 998a17d098 Merge topic 'file-DOWNLOAD-EXPECTED_HASH'
95a0011 file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=value
2012-09-25 15:17:01 -04:00
Nils Gladitz 9ace801578 ctest_update: Tell svn not to prompt interactively (#13024)
While at it, add SVNOptions/CTEST_SVN_OPTIONS configuration settings to
add options to all svn invocations instead of just "svn update".
2012-09-25 13:36:47 -04:00
Kitware Robot f00f58fe13 CMake Nightly Date Stamp 2012-09-25 00:01:05 -04:00
Kitware Robot d550801a3d CMake Nightly Date Stamp 2012-09-24 00:01:04 -04:00
Stephen Kelly 92b6d85519 Enable deprecated API when using Qt 5.
The QAbstractItemModel::reset() method is deprecated in Qt 5, and
therefore not part of the API by default (on non-Windows).

The replacement for it is beginResetModel/endResetModel which are
available from Qt 4.6 onwards.

The minimum version of Qt required is currently 4.4, so enable the
deprecated API instead of changing that.
2012-09-23 20:13:06 +02:00
Kitware Robot eb5da9c71d CMake Nightly Date Stamp 2012-09-23 00:01:03 -04:00
Kitware Robot f31de15b5e CMake Nightly Date Stamp 2012-09-22 00:01:04 -04:00
Brad King a0a0877a1e OS X: Always generate -isysroot if any SDK is in use
Drop the last use of CMAKE_OSX_SYSROOT_DEFAULT.  Replace internal
platform variable CMAKE_${lang}_HAS_ISYSROOT with a more general
CMAKE_${lang}_SYSROOT_FLAG variable.  If the -isysroot flag exists and
CMAKE_OSX_SYSROOT points to an SDK (not "/") then always add it to
compiler command lines.  This is already done in the Xcode IDE.
2012-09-21 08:53:42 -04:00
Brad King 33a60e6bd1 Xcode: Remove unused code reading CMAKE_OSX_SYSROOT_DEFAULT
The condition for entering the block where the value is used
can never be true anymore.
2012-09-21 08:47:02 -04:00
Stephen Kelly b8e61d687a Refactor GetCompileDefinitions a bit.
It is now easier to add generator expressions.
2012-09-21 13:31:12 +02:00
Stephen Kelly 2c2b25b203 Return a std::string from GetCompileDefinitions. 2012-09-21 13:28:54 +02:00
Stephen Kelly b7e48e0acb Add an AppendDefines std::string overload.
This makes it easier to use with cmGeneratorTarget::GetCompileDefinitions.
2012-09-21 13:28:54 +02:00
Stephen Kelly 9a160871d0 Convert paths in INCLUDE_DIRECTORIES property to Unix slashes.
Duplicate some of the logic from the include_directories command.
2012-09-21 13:28:54 +02:00
Stephen Kelly 4557c8db48 Don't prepend a path before generator expressions in include_directories. 2012-09-21 13:28:54 +02:00
Stephen Kelly c6abc41eb5 Add include guard for cmGeneratorExpression. 2012-09-21 13:28:54 +02:00
Stephen Kelly 0ff4e3f0b8 Port remaining code to GetCompileDefinitions(). 2012-09-21 13:28:53 +02:00
Stephen Kelly f20af79956 Handle colons as a special case in the generator expression parser.
Like the special case for commas, this ensures that the colon only has
special meaning as the delimiter between the identifier and the
parameters of a particular expression, but constructs such as

 INCLUDE_DIRECTORIES "$<1:C:\foo>"

are legal.
2012-09-21 11:33:46 +02:00
Stephen Kelly f178d531a6 Fix indentation in the code blocks generator. 2012-09-21 08:52:24 +02:00
Kitware Robot bb18bb7f55 CMake Nightly Date Stamp 2012-09-21 00:01:03 -04:00
Stephen Kelly fb578c8635 Fix the regular expression validator for target names.
Regression introduced by f1eacf0e07.
Target names have different valid contents to config names.
2012-09-20 12:13:33 +02:00
Stephen Kelly 879fd354c1 Revert "Move GenerateTargetManifest to cmGeneratorTarget."
This reverts commit 987e12e2f9.

GenerateTargetManifest is called by the global generator before it
creates the generator targets, so we can't move it to cmGeneratorTarget
yet.
2012-09-20 08:34:30 +02:00
Kitware Robot 7e4a37800c CMake Nightly Date Stamp 2012-09-20 00:01:02 -04:00
Brad King 8fc88b7eb0 Merge topic 'vs-link-rsp'
5598d9b Ninja: don't expand any rsp files
2012-09-19 13:58:12 -04:00
Brad King 03077c9cbc Merge topic 'file-DOWNLOAD-user-agent'
14aff4d file(DOWNLOAD): Add HTTP User-Agent string
2012-09-19 13:58:01 -04:00
Brad King fbe7b3cdfc Merge topic 'vs11-express'
7ee3cee VS11: Add VS 2012 Express support (#13348)
e17f345 VS11: Detect VS 2012 Express for default generator (#13348)
2012-09-19 13:57:53 -04:00
Brad King 65af5e90b9 Merge topic 'ninja-rc-compile-flag'
a1c9c13 Ninja: filter target specific compile flags with language specific regex
2012-09-19 13:57:47 -04:00
Brad King d1513950fa Merge topic 'document-MSVC-variables-12567'
f35e35b add documentation for all MSVCxxx version variables (#12567)
2012-09-19 13:57:44 -04:00
Stephen Kelly e83cc94dcd Use the cmGeneratorTarget for the include directories API.
Also, no need to get the include directories from the target
beforehand. The local generator does that for us anyway.
2012-09-19 18:45:01 +02:00
Stephen Kelly 9d8e59db71 Merge branch 'use-generator-target' into AutomocUseTargetProperties 2012-09-19 18:33:11 +02:00
Brad King 750fcaa858 VS8: Remove '.NET' from generator description (#10158)
The product name does not include '.NET'.  Use '8' instead to be
consistent with the existing description of the '9' (2008) generator.
2012-09-19 12:09:00 -04:00
Peter Kuemmel 5598d9b2a0 Ninja: don't expand any rsp files 2012-09-19 11:40:47 -04:00
Brad King 95a0011604 file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=value
Make the EXPECTED_HASH option take only a single value instead of two to
avoid handling sub-keyword arguments.  This is also consistent with
URL_HASH in ExternalProject.
2012-09-19 11:31:36 -04:00
Stephen Kelly 6674583caa Fix compiler warning with initialization order. 2012-09-19 17:16:25 +02:00
Stephen Kelly 5285458342 Add convenience for getting a cmGeneratorTarget to use. 2012-09-19 15:32:25 +02:00
Stephen Kelly c31f3d99f8 Add a wrapper for accessing config-specific compile-definitions. 2012-09-19 15:32:19 +02:00
Stephen Kelly d1446ca7a0 Append the COMPILE_DEFINITIONS from the Makefile to all targets.
This way we don't need to check the definitions from the Makefile when
generating later, and can more easily add generator expressions.

Duplication is not a problem as the definitions are de-duplicated before
generating.
2012-09-19 15:32:13 +02:00
Stephen Kelly 290e92ada8 Move GetIncludeDirectories to cmGeneratorTarget. 2012-09-19 15:32:09 +02:00
Stephen Kelly f9146f6b90 Port cmLocalGenerator::GetTargetFlags to cmGeneratorTarget. 2012-09-19 15:31:39 +02:00
Stephen Kelly 9facfd1336 Move GetCreateRuleVariable to cmGeneratorTarget. 2012-09-19 15:31:32 +02:00
Stephen Kelly 78bfee35d5 Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget. 2012-09-19 15:31:29 +02:00
Stephen Kelly 4f5384e75c Move GetLinkInformation to cmGeneratorTarget 2012-09-19 15:30:57 +02:00
Stephen Kelly 987e12e2f9 Move GenerateTargetManifest to cmGeneratorTarget. 2012-09-19 15:30:49 +02:00
Stephen Kelly 14bf7783f4 Store cmGeneratorTargets with the makefile. 2012-09-19 15:29:07 +02:00
Stephen Kelly f428ca25f5 Add more forwarding API to cmGeneratorTarget.
This API is the most commonly required in the following patches.
2012-09-19 15:28:03 +02:00
Brad King d407dcdbc8 Merge topic 'generator-expression-refactor'
91011bd cmGeneratorExpression: Port users to two-stage processing
f1eacf0 cmGeneratorExpression: Re-write for multi-stage evaluation
2012-09-19 08:28:16 -04:00
Kitware Robot 281654b5d6 CMake Nightly Date Stamp 2012-09-19 00:01:03 -04: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
Stephen Kelly f1eacf0e07 cmGeneratorExpression: Re-write for multi-stage evaluation
The expressions may be parsed and then cached and evaluated multiple
times.  They are evaluated lazily so that literals such as ',' can be
treated as universal parameter separators, and can be processed from
results without appearing literally, and without interfering with the
parsing/evaluation of the entire expression.
2012-09-18 17:02:23 -04:00