Commit Graph

15013 Commits

Author SHA1 Message Date
Kitware Robot 7c61c73fbc CMake Nightly Date Stamp 2013-06-20 00:01:05 -04:00
Brad King ae06f80716 cmake: Document "-E tar" support for .zip (#14225)
Through use of libarchive internally we support .zip files as well as
.tar format.  The ExternalProject module makes use of this feature.
Document support officially.
2013-06-19 10:05:44 -04:00
Nils Gladitz bb71a3a0df Add cmake_host_system_information command
Expose the internal system information API to the CMake language.  For
example, it is useful to see how much memory the system has available to
estimate an upper limit of tests that can run in parallel.
2013-06-19 08:46:37 -04:00
Kitware Robot ee59089803 CMake Nightly Date Stamp 2013-06-19 00:01:05 -04:00
Kitware Robot 381c76da07 CMake Nightly Date Stamp 2013-06-18 00:01:04 -04:00
Brad King a0b37d7e3b Document CMAKE_INSTALL_PREFIX in CMAKE_SYSTEM_PREFIX_PATH
Add documentation to both variables to indicate that the install prefix
is also searched.
2013-06-17 08:40:44 -04:00
Kitware Robot dc43f7755d CMake Nightly Date Stamp 2013-06-17 00:01:04 -04:00
Kitware Robot 30d029ddd1 CMake Nightly Date Stamp 2013-06-16 00:01:03 -04:00
Kitware Robot 19df4595e2 CMake Nightly Date Stamp 2013-06-15 00:01:03 -04:00
Brad King dea8271840 Merge topic 'doc-enable_language-scope'
b3b57e7 enable_language: Clarify documentation
2013-06-14 09:01:39 -04:00
Brad King d556631079 Merge topic 'sha2-alignment'
75994d9 cmCryptoHash: Increase alignment of HashFile buffer
2013-06-14 09:01:22 -04:00
Brad King 1f8733a0c2 Merge topic 'FixEclipseCorruptProjects'
22f7934 Eclipse: fix #14204 and #14205: no file links to directories
2013-06-14 09:01:17 -04:00
Brad King bbaae3e421 Merge topic 'minor-cleanup'
e3b7eac Style: Don't put an else after a return.
ad304a2 cmSystemTools: Fix typo in comment.
08319e0 Genex: Fix indentation in docs.
2013-06-14 09:00:26 -04:00
Brad King f247474eb6 Merge topic 'remove_extra_matches'
dc03499 Do not set CMAKE_MATCH_ variables when not neeeded
2013-06-14 09:00:11 -04:00
Brad King bc3a7b61e2 Merge topic 'rpath-on-mac'
ff01f8b OS X: Improvements for getting install name of dylib.
2013-06-14 08:59:54 -04:00
Bill Hoffman dc03499595 Do not set CMAKE_MATCH_ variables when not neeeded
Each call to AddDefinition has overhead for variable watches and such.
Avoid extra calls when not needed.

This decreases the configure time for ParaView by 10 seconds on my
machine.  Without the change about 1,000,000 set-to-empty calls were
being made.  After the change it drops to about 100,000.
2013-06-14 08:46:14 -04:00
Brad King b9f4383f69 Split cmBootstrapCommands.cxx into two sources
The single translation unit has grown too large for some compilers.
Split it into cmBootstrapCommands1.cxx and cmBootstrapCommands2.cxx.
2013-06-14 08:35:52 -04:00
Christian Maaser cfe6300a41 VS: Add support for .NET target framework version
Teach CMake to generate the TargetFrameworkVersion XML node as
documented at

 http://msdn.microsoft.com/en-us/library/vstudio/ff770576.aspx

from target property VS_DOTNET_TARGET_FRAMEWORK_VERSION.
2013-06-14 08:09:00 -04:00
Kitware Robot 3aaf04365c CMake Nightly Date Stamp 2013-06-14 00:01:04 -04:00
Brad King 75994d953e cmCryptoHash: Increase alignment of HashFile buffer
The SHA512_Update implementation accesses input data via 64-bit
integers.  This requires alignment of the input buffer on some
architectures.  Align our stack-allocated buffer for file content to
satisfy this requirement.
2013-06-13 08:40:10 -04:00
Kitware Robot 82771f1862 CMake Nightly Date Stamp 2013-06-13 00:01:02 -04:00
Brad King b3b57e7a31 enable_language: Clarify documentation
Describe explicitly the scope in which enable_language must be
invoked to handle all direct and indirect uses of a language.

While at it, re-word documentation of the OPTIONAL keyword to
avoid confusion over its partial implementation.
2013-06-12 10:58:32 -04:00
Stephen Kelly e6055284b3 Add generator expressions for version comparision. 2013-06-12 14:09:36 +02:00
Stephen Kelly 48bb48e114 De-duplicate version comparison code.
Extend the VersionCompare in cmSystemTools to handle 8 components,
and port the if command to use that.
2013-06-12 14:09:36 +02:00
Stephen Kelly ea4d7848e5 QtAutomoc: Use config-dependent compile definitions and includes.
Instead of always using the includes and defines which are not
config-specific, ensure that the config specific ones can be used.

Task-number: #13589
2013-06-12 12:53:25 +02:00
Stephen Kelly 67f6cebb1e QtAutomoc: Fix handling of list separator for compile definitions. 2013-06-12 07:21:46 +02:00
Kitware Robot 9f460fe408 CMake Nightly Date Stamp 2013-06-12 00:01:03 -04:00
Alex Neundorf 22f7934a6e Eclipse: fix #14204 and #14205: no file links to directories
If a source file name is empty, or if it is a directory,
don't create a linked resource to it.

Alex
2013-06-11 22:50:38 +02:00
Stephen Kelly 2d9ec1dadf Add compiler target compile options.
For clang, this allows passing -target <triple> to the compiler, and
for qcc, -V<arch> using toolchain files containing something like

 set(triple arm-linux-gnueabihf)
 set(CMAKE_C_COMPILER "/usr/bin/clang")
 set(CMAKE_C_COMPILER_TARGET ${triple})
 set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
 set(CMAKE_CXX_COMPILER_TARGET ${triple})

or

 set(arch gcc_ntoarmv7le)
 set(CMAKE_C_COMPILER /opt/qnx650/host/linux/x86/usr/bin/qcc)
 set(CMAKE_C_COMPILER_TARGET ${arch})
 set(CMAKE_CXX_COMPILER /opt/qnx650/host/linux/x86/usr/bin/QCC)
 set(CMAKE_CXX_COMPILER_TARGET ${arch})

Both clang and qcc are inherently cross compiler( driver)s.
2013-06-11 14:41:16 +02:00
Stephen Kelly e3b7eac593 Style: Don't put an else after a return. 2013-06-11 10:50:00 +02:00
Stephen Kelly ad304a2f7d cmSystemTools: Fix typo in comment. 2013-06-11 09:52:30 +02:00
Stephen Kelly 08319e071e Genex: Fix indentation in docs. 2013-06-11 09:52:08 +02:00
Kitware Robot a2021e578c CMake Nightly Date Stamp 2013-06-11 00:01:04 -04:00
Stephen Kelly 77ff352aa7 Generate INTERFACE_COMPILE_OPTIONS on export.
This was missing from commit 80ca9c4b (Add COMPILE_OPTIONS target
property., 2013-05-16).
2013-06-10 16:50:20 +02:00
Stephen Kelly 0d8db250ce Use a preprocessor loop to manage the valid transitive properties.
Hopefully this will prevent regressions when adding further transitive
properties in the future.
2013-06-10 16:13:21 +02:00
Stephen Kelly 8a3b5bede8 Find targets in INTERFACE_COMPILE_OPTIONS when exporting for try_compile.
This was missing from commit 80ca9c4b (Add COMPILE_OPTIONS target
property., 2013-05-16).
2013-06-10 16:12:22 +02:00
Stephen Kelly 477e4136ef Add missing 'seen' check for evaluating COMPILE_OPTIONS.
Commit 089fe1c1 (Optimize genex evaluation for includes and
defines., 2013-02-01) introduced an optimization on DAG processing
to not reprocess properties on targets which have already been seen.

This was refactored slightly in commit 8dfdf1c7 (Fix the tests for
evaluating includes and defines., 2013-02-18), but was not extended
to cover COMPILE_OPTIONS in commit 80ca9c4b (Add COMPILE_OPTIONS target
property., 2013-05-16).

This omission causes the same performance regression in running
cmake on LLVM which 089fe1c1 fixed before, but this time for the
transitive evaluation of the COMPILE_OPTIONS property.
2013-06-10 15:46:51 +02:00
Kitware Robot 9ac601618e CMake Nightly Date Stamp 2013-06-10 00:01:02 -04:00
Kitware Robot adfe9b3805 CMake Nightly Date Stamp 2013-06-09 00:01:03 -04:00
Kitware Robot 63e7137af5 CMake Nightly Date Stamp 2013-06-08 00:01:03 -04:00
Stephen Kelly de4da665d3 Use --sysroot when cross compiling.
As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
introduced, which is never a list.

The contents of this variable is passed to supporting compilers
as --sysroot. It is also accounted for when processing implicit
link directories reported by the compiler, and when generating
RPATH information.
2013-06-07 13:32:52 +02:00
Kitware Robot e7fc1c600e CMake Nightly Date Stamp 2013-06-07 00:01:04 -04:00
Brad King 482f1122ad try_compile: Add signature to allow multiple SOURCES
Extend the signature

 try_compile(RESULT_VAR <bindir> <srcfile> ...)

to allow multiple sources as

 try_compile(RESULT_VAR <bindir> SOURCES <srcfile>... ...)

Process the sources to generate a CMakeLists.txt that enables all needed
languages.

Teach the TryCompile test to try cases with two sources of the same
language and of mixed languages.  Teach RunCMake.try_compile to cover
error cases for the signature.
2013-06-06 14:35:20 -04:00
Kitware Robot bb879bcf2d CMake Nightly Date Stamp 2013-06-06 00:01:04 -04:00
Clinton Stimpson ff01f8b600 OS X: Improvements for getting install name of dylib.
In the case of a multi-arch dylib where none of the architectures
is the host architecture, otool -D returned multiple install names.
2013-06-05 21:31:11 -06:00
Brad King d3c8688ecd Merge topic 'fix-genex-HEAD-target'
5b22235 Genex: Fix the HEAD target used for evaluated expressions
2013-06-05 09:54:20 -04:00
Brad King aa025cc60a Merge topic 'xcode-framework-paths'
21a0bea Xcode: Fix framework search paths in STATIC library targets (#14191)
2013-06-05 09:39:52 -04:00
Brad King 31a0220397 Merge topic 'update-kwsys'
c91e88d Merge branch 'upstream-kwsys' into update-kwsys
6dc3dd9 KWSys 2013-06-03 (d79a792e)
2013-06-05 09:39:41 -04:00
Brad King bf57982f7b Merge topic 'doc-CMAKE_PARENT_LIST_FILE'
b62d440 Docs: Clarify CMAKE_PARENT_LIST_FILE (#14194)
2013-06-05 09:39:27 -04:00
Brad King 21b1026541 Merge topic 'suppress-unused-cli-with-value-in-cache'
273ecab CLI: Suppress the unused warning if the key value pair is cached.
2013-06-05 09:39:18 -04:00
Brad King 2cd8a6a3c6 Merge topic 'cleanups'
9efe359 Add some spaces to the INCLUDE_DIRECTORIES documentation.
db15713 Remove unused cmAddDefinitionsCommand::ParseDefinition method.
2013-06-05 09:39:12 -04:00
Brad King 93317839b0 Merge topic 'add_compile_options-command'
a984f32 Introduce add_compile_options command.
2013-06-05 09:39:05 -04:00
Brad King ff8917fdd2 Merge topic 'VISIBILITY_PRESET-property'
cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
2013-06-05 09:38:59 -04:00
Stephen Kelly 5b222354de Genex: Fix the HEAD target used for evaluated expressions
If the expression $<TARGET_PROPERTY:prop> appears in the content
of a target property, the target that prop is read from is
the 'head target' of the expression. In contexts such as evaluating
the content of a target property during generation, such
as INCLUDE_DIRECTORIES, the 'head target' is the one on which the
initial request was made.

If evaluating a generator expression which is not a target property
content, the target must be explicitly specified. Such contexts
include add_custom_command and file(GENERATE). The content might
then look like

 $<TARGET_PROPERTY:tgt,prop>

However, as there is no HeadTarget set, any generator expressions
evaluated as part of reading prop from tgt which do not specify
the tgt directly report an error.

Modify the logic of the TARGET_PROPERTY generator expression so
that in such contexts, the 'head target' is set to the appropriate
target which was first encountered.
2013-06-05 09:05:00 -04:00
Kitware Robot 4d15c0b7c6 CMake Nightly Date Stamp 2013-06-05 00:01:08 -04:00
Brad King 21a0beacc1 Xcode: Fix framework search paths in STATIC library targets (#14191)
In commit 2bc22bda (Xcode: Add frameworks search paths from link
dependeny closure, 2012-12-07) we made framework search paths from the
link closure conditional on target type, skipping it on STATIC and
OBJECT library targets that do not actually link.  However, the
framework search paths also influence the compile lines (-F options) so
we need them for all target types.  The Makefile generator already does
this, as did the Xcode generator prior to the above-mentioned commit.
2013-06-04 09:49:40 -04:00
Brad King c91e88d0e1 Merge branch 'upstream-kwsys' into update-kwsys 2013-06-04 09:08:58 -04:00
Brad King d3971ee603 Merge topic 'fix-variable_watch-cases'
647745b variable_watch: Print accesses as "CMake Debug Log" messages
515f9af variable_watch: Remove leftover debugging code (#14187)
c63d300 variable_watch: Add test for MODIFIED_ACCESS report
3d5bb38 variable_watch: Add missing string enumeration entry (#14188)
2013-06-04 09:03:00 -04:00
Brad King 1e15db3662 Merge topic 'update-kwsys'
9d38db5 bootstrap: Compile KWSys SystemTools with UTIME(S|NSAT) values
884e3ed Merge branch 'upstream-kwsys' into update-kwsys
d66f6f3 KWSys 2013-05-31 (dccf7725)
2013-06-04 09:02:52 -04:00
Brad King 05e47f2122 Merge topic 'cfbundle-location'
483e208 OS X:  Fix getting of CFBundle LOCATION property.
2013-06-04 09:02:46 -04:00
Brad King b62d440ea8 Docs: Clarify CMAKE_PARENT_LIST_FILE (#14194)
Fix the wording of the documentation for CMAKE_PARENT_LIST_FILE to
clarify that it only applies to the include stack in the current
directory.  Specify exactly what commands can include files instead of
saying "somehow invoke".
2013-06-04 08:18:15 -04:00
Stephen Kelly 273ecab96d CLI: Suppress the unused warning if the key value pair is cached.
It is common to specify a CMAKE_TOOLCHAIN_FILE and get a warning
for using it despite it not being used.

The WarnUnusedCliUnused test relies on the warning being emitted
each time cmake is run on an existing build. That behavior is changed
by this patch to warn only on the first invokation of CMake, and not
on subsequent invokations (because the variable is in the cache with
the same value). For that test, a clean target is added which clears
the cache and cause the warning to be emitted each time.

As the Ninja generator does not support the feature needed to test
this, it is not tested with that generator.
2013-06-04 12:38:56 +02:00
Stephen Kelly 9efe35906a Add some spaces to the INCLUDE_DIRECTORIES documentation. 2013-06-04 12:00:41 +02:00
Stephen Kelly db15713f05 Remove unused cmAddDefinitionsCommand::ParseDefinition method. 2013-06-04 12:00:32 +02:00
Stephen Kelly a984f3257e Introduce add_compile_options command.
This command is similar to add_definitions, in that it affects
the compile options of all targets which follow it. The implementation
is similar to the implementation of the include_directories command,
in that it is based on populating a COMPILE_OPTIONS directory property
and using that to initialize the same property on targets.

Unlike the include_directories command however, the add_compile_options
command does not affect previously defined targets. That is, in
the following code, foo will not be compiled with -Wall, but bar
will be:

 add_library(foo ...)
 add_compile_options(-Wall)
 add_library(bar ...)
2013-06-04 11:36:55 +02:00
Kitware Robot 00c3840cc8 CMake Nightly Date Stamp 2013-06-04 00:01:05 -04:00
Brad King 647745b3ee variable_watch: Print accesses as "CMake Debug Log" messages
Use makefile->IssueMessage() to print the unprocessed watch message in a
format consistent with other CMake messages and with a more complete
call stack for the access.
2013-06-03 13:19:59 -04:00
Brad King 515f9af0d4 variable_watch: Remove leftover debugging code (#14187)
When a watch does not specify a command to call then variable_watch
prints out a message to stderr.  Remove code after that which collects
all variable values to construct a message that is never printed.
Otherwise such code causes a READ_ACCESS watch to trigger on all
variables in the currents scope.

Reported-by: Yichao Yu <yyc1992@gmail.com>
2013-06-03 13:13:07 -04:00
Brad King 884e3edeb1 Merge branch 'upstream-kwsys' into update-kwsys 2013-06-03 10:23:31 -04:00
Yichao Yu 3d5bb381be variable_watch: Add missing string enumeration entry (#14188)
In commit 9a5b4eba (All variable accesses should produce watch
callbacks, 2007-05-17) we added a new enumeration value but did not
update the list of strings matching them.  Add the missing entry.
Without this, variable_watch prints REMOVED_ACCESS instead of
MODIFIED_ACCESS when set the value of the variable.
2013-06-03 10:20:08 -04:00
Brad King e57b6a2521 Merge topic 'target-COMPILE_OPTIONS'
24466f2 Add target_compile_options command.
80ca9c4 Add COMPILE_OPTIONS target property.
7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries
47f80d9 cmTarget: Rename struct to be more re-usable.
1319a14 Add <LANG>_COMPILER_ID generator expressions.
3549676 Add cmLocalGenerator::GetCompileOptions.
f3ad863 VS6: Rename some variables to correspond to config values.
2013-06-03 09:57:44 -04:00
Brad King bcc29c56a5 Merge topic 'refactor-try_compile-argument-processing'
d06db7e try_compile: Refactor argument processing
b680824 try_compile: Add test for bad call error cases
2013-06-03 09:57:39 -04:00
Brad King 90441b289d Merge topic 'vs-RootNamespace'
cca955a VS: Add VS_GLOBAL_ROOTNAMESPACE target property
2013-06-03 09:57:32 -04:00
Brad King db5f5243b5 Merge topic 'fix-style'
e162326 Fix indentation.
2013-06-03 09:57:27 -04:00
Brad King 6d4e79e2c3 Merge topic 'qt4-qt5-CMAKE_AUTOMOC'
fa55751 QtAutomoc: Get the Qt version through the target link interface
f776316 Use the qt5::moc imported target instead of a variable.
2013-06-03 09:57:01 -04:00
Brad King 3caf565d07 Merge topic 'rpath-on-mac'
dc1d025 OS X: Add test for rpaths on Mac.
8576b3f OS X: Add support for @rpath in export files.
00d71bd Xcode: Add rpath support in Xcode generator.
94e7fef OS X: Add RPATH support for Mac.
2013-06-03 09:56:44 -04:00
Brad King d444fea163 Merge topic 'xcode-shlib-versioning'
cbe3f20 Xcode: Add support for shared library versioning
2013-06-03 09:56:37 -04:00
Brad King b0759da303 Merge topic 'framework-refactor'
373faae Refactor how bundles and frameworks are supported.
2013-06-03 09:56:32 -04:00
Clinton Stimpson 8576b3f978 OS X: Add support for @rpath in export files.
Also expand the IMPORTED_SONAME property for targets
to match the install_name.
2013-06-03 09:42:05 -04:00
Clinton Stimpson 00d71bdd19 Xcode: Add rpath support in Xcode generator. 2013-06-03 09:42:05 -04:00
Clinton Stimpson 94e7fef226 OS X: Add RPATH support for Mac.
RPATH support is activated on targets that have the MACOSX_RPATH
property turned on.
For install time, it is also useful to set INSTALL_RPATH to help
find dependent libraries with an @rpath in their install name.

Also adding detection of rpath conflicts when using frameworks.
2013-06-03 09:42:05 -04:00
Clinton Stimpson 483e208482 OS X: Fix getting of CFBundle LOCATION property.
This fixes bug #13797.
The kinds of changes applied in 373faae5 for frameworks are now
applied to CFBundle.  The prefix and suffix for CFBundles are
now handled in cmTarget::GetFullNameInternal.
2013-06-03 06:29:33 -06:00
Kitware Robot 3c7e09eb8e CMake Nightly Date Stamp 2013-06-03 00:01:05 -04:00
Stephen Kelly cd1fa537a0 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
This corresponds to the g++ and clang++
option -fvisibility-inlines-hidden on linux. On Windows with MinGW,
this corresponds to -fno-keep-inline-dllexport. That option is
not supported by clang currently.
2013-06-02 12:00:51 +02:00
Stephen Kelly 0e9f4bc00c Introduce target property <LANG>_VISIBILITY_PRESET
This is initialized by CMAKE_<LANG>_VISIBILITY_PRESET. The target
property is used as the operand to the -fvisibility= compile option
with GNU compilers and clang.
2013-06-02 12:00:51 +02:00
Stephen Kelly 24466f22c0 Add target_compile_options command.
This command populates the COMPILE_OPTIONS target property.
2013-06-02 11:56:37 +02:00
Stephen Kelly 80ca9c4b41 Add COMPILE_OPTIONS target property.
This method reads generator expressions from the COMPILE_OPTIONS
target property, as well as INTERFACE_COMPILE_OPTIONS from linked
dependents.
2013-06-02 11:56:37 +02:00
Stephen Kelly 7cb23084b2 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries
This can be used for COMPILE_OPTIONS too.
2013-06-02 11:56:37 +02:00
Stephen Kelly 47f80d9c43 cmTarget: Rename struct to be more re-usable.
The same struct can be used to represent COMPILE_OPTIONS content.
2013-06-02 11:56:36 +02:00
Stephen Kelly 1319a147bd Add <LANG>_COMPILER_ID generator expressions.
These expressions evaluate to the id of the compiler used to build
the target, or can be used to test if the compiler id matches a
specified value.
2013-06-02 11:56:36 +02:00
Stephen Kelly 35496761a5 Add cmLocalGenerator::GetCompileOptions.
Currently it only adds the contents of the COMPILE_FLAGS target
property, but it can be extended to handle a new COMPILE_OPTIONS
generator expression enabled property.
2013-06-02 11:56:36 +02:00
Stephen Kelly f3ad863ae6 VS6: Rename some variables to correspond to config values.
This simplifies population of the compile flags.
2013-06-02 11:56:36 +02:00
Kitware Robot a4d8c64d10 CMake Nightly Date Stamp 2013-06-02 00:01:03 -04:00
Kitware Robot 86f5460398 CMake Nightly Date Stamp 2013-06-01 00:01:03 -04:00
Brad King d06db7ebe8 try_compile: Refactor argument processing
Process all arguments in a single loop using a simple state machine.
While at it, fix some error message typos.  Also allow LINK_LIBRARIES
with no actual libraries to disable use of the -DLINK_LIBRARIES=...
from the CMAKE_FLAGS.  This was already possible in the old logic if
LINK_LIBRARIES was immediately followed by another keyword argument
instead of the end of the argument list, so allow it in general.
Update the RunCMake.try_compile test cases accordingly.
2013-05-31 10:01:50 -04:00
Brad King 5377ac4289 Merge topic 'fix-try_compile-library-spaces'
e537544 try_compile: Trim whitespace from LINK_LIBRARIES entries
2013-05-31 09:33:54 -04:00
Brad King 7b8a4c3e6f Merge topic 'fix-INCLUDE_DIRECTORIES-genex-read'
3aa9ce4 GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
0b39fef GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
53164ac cmTarget: Remove some hardcoding of transitive property names.
2013-05-31 09:33:22 -04:00
John Farrier cca955a27c VS: Add VS_GLOBAL_ROOTNAMESPACE target property
Add a setting for Visual Studio projects for the root namespace in the
"Globals" PropertyGroup section of the project file.
2013-05-31 09:15:30 -04:00
Kitware Robot 4836c5ab48 CMake Nightly Date Stamp 2013-05-31 00:01:05 -04:00
Stephen Kelly 3aa9ce441f GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
This property should come from the content of the property itself,
plus the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*.

In contrast, when the INTERFACE_INCLUDE_DIRECTORIES is evaluated for
a target, the INTERFACE_INCLUDE_DIRECTORIES of the link *interface*
is used.

Similar logic applies for the COMPILE_DEFINITIONS target properties.

If the propertyName is already an INTERFACE_ variant of the property,
ie, the expression is similar to

 $<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>

then the INTERFACE_INCLUDE_DIRECTORIES of the link *interface* of foo
is used.

However, if the propertyName is not an INTERFACE_ variant, and the
interfacePropertyName is, ie, the expression is similar to:

 $<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>

then the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*
of foo is used.
2013-05-30 15:43:42 +02:00
Stephen Kelly 0b39fefeac GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
This will be used to process transitive components of properties
which depend on linked targets. Currently only the link interface
of the target can be used as the source of the linked targets, but
in the next commit it will be possible to use the link implementation
as the source of link targets.

This commit does not change the semantics of the code.
2013-05-30 15:43:42 +02:00
Stephen Kelly 53164ac997 cmTarget: Remove some hardcoding of transitive property names. 2013-05-30 15:43:37 +02:00
Brad King d721a9cf6a Merge topic 'update-kwsys'
2c0c59a Merge branch 'upstream-kwsys' into update-kwsys
9270129 KWSys 2013-05-29 (725e541e)
2013-05-30 08:57:23 -04:00
Stephen Kelly e5375442ff try_compile: Trim whitespace from LINK_LIBRARIES entries
Commit e65ef08b (try_compile: Fix quoting of libraries in generated
CMakeLists.txt, 2013-05-24) added quoting to entries specified in
the LINK_LIBRARIES. However, if the input entries contain whitespace
padding, that quoted whitespace causes an error in the generated
CMakeLists.txt at target_link_libraries.

Strictly, it is an error to have space separated entries in the
CMAKE_REQUIRED_LIBRARIES, as it was never properly handled by
CMakeExpandImportedTargets even prior to commit 236133e7 (Handle
targets in the LINK_LIBRARIES of try_compile., 2013-02-09). However,
it is causing a regression in KDE code which tests the next branch.
2013-05-30 13:50:37 +02:00
Kitware Robot fafa66c7f0 CMake Nightly Date Stamp 2013-05-30 00:01:03 -04:00
Clinton Stimpson cbe3f2072b Xcode: Add support for shared library versioning
Add a post-build command to shared library targets to create the
versioning symbolic links.
2013-05-29 09:05:00 -04:00
Brad King 2c0c59a2e1 Merge branch 'upstream-kwsys' into update-kwsys 2013-05-29 08:56:20 -04:00
Stephen Kelly e162326128 Fix indentation. 2013-05-29 08:40:00 +02:00
Kitware Robot 6927b25aff CMake Nightly Date Stamp 2013-05-29 00:01:03 -04:00
Brad King 590a41ba0e Merge topic 'fix-try_compile-library-spaces'
e65ef08 try_compile: Fix quoting of libraries in generated CMakeLists.txt
2013-05-28 10:42:40 -04:00
Brad King be85fa4a89 Merge topic 'genex-generate-file'
b983a58 file: Add GENERATE command to produce files at generate time
2013-05-28 10:42:18 -04:00
Kitware Robot 97c2166de4 CMake Nightly Date Stamp 2013-05-28 00:01:05 -04:00
Stephen Kelly fa55751f83 QtAutomoc: Get the Qt version through the target link interface
In Qt 5.1, Qt5::Core has a INTERFACE_QT_MAJOR_VERSION property
of '5', and since CMake 2.8.11, Qt4::QtCore has an
INTERFACE_QT_MAJOR_VERSION of '4'. This was introduced in
commit 4aa10cd6 (FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for
Qt4::QtCore, 2013-03-16), to produce an error if Qt 4 and Qt 5
are erroneously used by the same target. This can also be used
however to determine the Qt major version, and therefore the
particular moc executable to use during automoc steps. This means
that targets in a single buildsystem can use a selection of Qt 4
and Qt 5, and still take advantage of the CMAKE_AUTOMOC feature
without conflicting.
2013-05-28 01:19:37 +02:00
Stephen Kelly f776316721 Use the qt5::moc imported target instead of a variable.
The variable is provided in the Qt5 config files only for compatibility
with this automoc feature, so use the more-future-proof method instead.
2013-05-27 20:56:07 +02:00
Kitware Robot ab7cd03cea CMake Nightly Date Stamp 2013-05-27 00:01:02 -04:00
Kitware Robot fe1584f276 CMake Nightly Date Stamp 2013-05-26 00:01:05 -04:00
Kitware Robot a3a82b5ed7 CMake Nightly Date Stamp 2013-05-25 00:01:08 -04:00
Brad King e65ef08bf2 try_compile: Fix quoting of libraries in generated CMakeLists.txt
Since commit 236133e7 (Handle targets in the LINK_LIBRARIES of
try_compile, 2013-02-09) libraries passed to the new LINK_LIBRARIES
option of try_compile are not quoted inside the generated CMakeLists.txt
file.  Quote the library names so they re-parse correctly when loaded by
CMake to configure and generate the test project.

Reported-by: Bogdan Cristea <cristeab@gmail.com>
2013-05-24 16:30:26 -04:00
Brad King 14d90d81de Merge topic 'language-generator-expressions'
3241014 Add $<LINK_LANGUAGE> generator expression
2013-05-24 09:19:15 -04:00
Stephen Kelly 32410140a7 Add $<LINK_LANGUAGE> generator expression
They can't be used when evaluating link libraries, but they can be
used for include directories and compile definitions. Later they can
be used for compile options.
2013-05-24 09:06:53 -04:00
Stephen Kelly b983a58bdf file: Add GENERATE command to produce files at generate time
The idea is to write to a temp file which contains generator
expressions, and at generate time, evaluate the generator expressions,
and write the result to a file.

Because executables on Windows are limited in the length of command line
it is possible to use, it is common to write command line arguments to a
file instead and specify the file as a source of arguments.

This new FILE(GENERATE) subcommand allows the use of generator
expressions to create such files so that they can be used with
add_custom_command for example.
2013-05-24 09:02:45 -04:00
Kitware Robot 3cc5d3883e CMake Nightly Date Stamp 2013-05-24 00:01:04 -04:00
Brad King 711073e8c6 Merge topic 'xcode-attributes-variant'
332350b Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
2013-05-23 10:52:31 -04:00
Brad King 79e40f830f Merge topic 'xcode-shared-linker-flags-per-config'
bcda47d Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)
2013-05-23 10:52:17 -04:00
Clinton Stimpson 373faae5e1 Refactor how bundles and frameworks are supported.
Make handling of directory separators consistent between
non-bundle and bundle code.

Remove xcode specific flag from cmTarget when getting install_name.

Add (more) consistent convenience functions in cmTarget to get
directories inside of bundles and frameworks to add files to.

This refactor also fixes bug #12263 where frameworks
had the wrong install name when SKIP_BUILD_RPATH.

Also make install_name for frameworks consistent between Makefile
and Xcode generator.
2013-05-23 10:42:49 -04:00
Kitware Robot 5361270c6e CMake Nightly Date Stamp 2013-05-23 00:01:05 -04:00
Cédric OCHS 332350b9c4 Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
Since commit c519bb2b (XCode: Also qoute [] as needed to set
build-configurations, 2011-04-05) we escape "[]" conditions for
XCODE_ATTRIBUTE_ settings.  However, we need to handle the "variant"
condition with a special case to map it only into the settings for the
matching configuration.
2013-05-22 15:20:10 -04:00
Brad King 3db29d2724 Merge topic 'join-genex'
a7ba452 Add the JOIN generator expression.
96ec314 Make it possible for any genex to have arbitrary content at the end.
bd638ee Rename the method determining if a genex accepts arbitrary content.
dc742fe Extract the ProcessArbitraryContent method.
2013-05-22 13:35:15 -04:00
Brad King ee334b6a0a Merge topic 'LinkLine-typedef'
776225d cmTarget: drop the unused local typedef LinkLine
2013-05-22 13:06:21 -04:00
Brad King 620599e25a Merge topic 'wizard-cleanup'
eca523f wizard: simplify control flow
f1d27bf wizard: fix warnings
2013-05-22 13:06:13 -04:00
Brad King 12eab7420d Merge topic 'ctest-parallel-env'
db43502 CTest: Read CTEST_PARALLEL_LEVEL from environment
2013-05-22 13:05:47 -04:00
Brad King 2da5b51b0c Merge topic 'string-MAKE_C_IDENTIFIER-subcommand'
0ab50ae string: Add MAKE_C_IDENTIFIER subcommand
2013-05-22 13:05:29 -04:00
Brad King fe4c1fb32e Merge topic 'add-EXPORT_NAME-property'
b5d6f5d Add EXPORT_NAME property.
2013-05-22 13:05:17 -04:00
Rolf Eike Beer 776225d379 cmTarget: drop the unused local typedef LinkLine 2013-05-22 12:54:57 -04:00
Rolf Eike Beer eca523fbd4 wizard: simplify control flow
Checking if a byte is 0 before checking it for something else doesn't do
anything useful. Also one can be sure that it can't be anything wanted
if the value was set to 0 immediately before.
2013-05-22 12:52:12 -04:00
Matthew Bentham bcda47d2a0 Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)
Refactor lookup of CMAKE_(EXE|MODULE|SHARED)_LINKER_FLAGS(|_<CONFIG>)
variables to ensure all combinations are handled.  Use the helper method
AddConfigVariableFlags to simplify the implementation.
2013-05-22 11:48:01 -04:00
Kitware Robot d337cb402f CMake Nightly Date Stamp 2013-05-22 00:01:06 -04:00
Rolf Eike Beer f1d27bf667 wizard: fix warnings
.../Source/cmakewizard.cxx: In member function ‘virtual void cmakewizard::AskUser(const char*, cmCacheManager::CacheIterator&)’:
.../Source/cmakewizard.cxx:31:35: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
   if(!fgets(buffer, sizeof(buffer)-1, stdin))
                                   ^
.../Source/cmakewizard.cxx: In member function ‘virtual bool cmakewizard::AskAdvanced()’:
.../Source/cmakewizard.cxx:70:35: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
   if(!fgets(buffer, sizeof(buffer)-1, stdin))

The compiler is (partly) right here: sizeof() returns a size_t, which often is
bigger as as int as it is unsigned long or something similar. Add an explicit
cast to get rid of that warning here, the buffer has a size of 4KiB, so the
value will fit into an int on all sane platforms.
2013-05-21 23:33:54 +02:00
Stephen Kelly 0ab50aea4c string: Add MAKE_C_IDENTIFIER subcommand 2013-05-21 15:29:34 -04:00
Stephen Kelly db43502326 CTest: Read CTEST_PARALLEL_LEVEL from environment
If no explicit "-j <n>" option is given on the command line then read
the parallel level from an environment variable.
2013-05-21 15:27:09 -04:00
Brad King 4825d70e83 Merge topic 'fix-include_directories-whitespace-handling'
2f84dfe include_directories: Fix handling of empty or space-only entries
2013-05-21 15:22:27 -04:00
Stephen Kelly 2f84dfec93 include_directories: Fix handling of empty or space-only entries
This is a regression introduced in commit 0d46e9a0 (Store includes
from the same include_directories call together., 2013-01-20).

Reported at

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/46695/focus=7847
2013-05-21 15:20:46 -04:00
Brad King d2cd362c31 Merge topic 'fix-genex-comma-parse'
05bf972 Fix handling of commas in arbitrary content in genexes.
2013-05-21 15:19:26 -04:00
Brad King e41ef3d339 Merge topic 'unused-cleanup'
994dc70 Remove unused vector population.
44258cc Remove unused typedef.
0a4d7d8 Remove unused marker for a variable which is now used.
2013-05-21 15:19:22 -04:00
Brad King bdb0bab8ee Merge topic 'vs-asm-listing-location'
7e0c45e VS: Allow /Fa to set AssemblerListingLocation (#14153)
2013-05-21 15:14:19 -04:00
Brad King 1dbf0aac1b Merge topic 'fix-style'
3c7c332 Fix brace indentation.
c70b9b5 Fix style.
2013-05-21 15:13:49 -04:00
Brad King 5947d03987 Merge topic 'error-on-exported-missing-include-dir'
eabefa8 Error on relative path in INCLUDE_DIRECTORIES target property.
2013-05-21 15:13:26 -04:00
Brad King 52f9b2e803 Merge topic 'shared-libs-with-number-suffix'
342fc04 Recognize shared library files with a numerical suffix
2013-05-21 15:13:10 -04:00
Brad King 02ba802977 Merge topic 'cmake-help-generators-fix'
dea4d26 Docs: cmake -G selects a "build system" generator
2013-05-21 15:13:02 -04:00
Brad King a784e6f9f7 Merge topic 'fix-sublime-source-flags'
8e94767 Sublime: Honor source-level COMPILE_FLAGS property
2013-05-21 15:12:58 -04:00
Brad King f292ffb62c Merge topic 'vs-windows-forms'
79ec786 VS: Add Windows Forms Support
2013-05-21 15:12:48 -04:00
Stephen Kelly eabefa8b02 Error on relative path in INCLUDE_DIRECTORIES target property.
Add policy CMP0021 to preserve existing behavior in projects expecting
it from earlier CMake versions.
2013-05-21 14:59:17 -04:00
Stephen Kelly 342fc04010 Recognize shared library files with a numerical suffix
When processing link line entries we check for matches with known naming
patterns for static and shared libraries.  Teach this logic to recognize
numerical suffixes after shared library names such as "libfoo.so.1".
2013-05-21 14:50:16 -04:00
Stephen Kelly dea4d263d3 Docs: cmake -G selects a "build system" generator
-G is not only for makefile generators.
2013-05-21 14:43:42 -04:00
Stephen Kelly 8e947670cf Sublime: Honor source-level COMPILE_FLAGS property
Make the code match the comment.
2013-05-21 14:42:14 -04:00
Kitware Robot f206cce2ca CMake Nightly Date Stamp 2013-05-21 00:01:03 -04:00
Stephen Kelly 994dc70bc4 Remove unused vector population.
The call to GetEnabledLanguages does not have side-effects.
2013-05-20 17:47:21 +02:00
Brad King 7e0c45e9cf VS: Allow /Fa to set AssemblerListingLocation (#14153)
Generate the default AssemblerListingLocation through the flag map so
that it can be overridden by a user /Fa flag.  Also teach the VS 7-9
generators to map /Fa to AssemblerListingLocation.

While at it, fix the AssemblerListingLocation default value to have a
trailing slash after the configuration name.  This ensures it will be
treated as a directory and not a file name.
2013-05-20 08:40:09 -04:00
Kitware Robot 5261fde940 CMake Nightly Date Stamp 2013-05-20 00:01:03 -04:00
Kitware Robot 03071d30fe CMake Nightly Date Stamp 2013-05-19 00:01:03 -04:00
Stephen Kelly b5d6f5dd5b Add EXPORT_NAME property.
This allows for example, the buildsystem to use names like 'boost_any'
instead of the overly generic 'any', and still be able to generate
IMPORTED targets called 'boost::any'.
2013-05-18 10:00:48 +02:00
Stephen Kelly 3c7c332929 Fix brace indentation. 2013-05-18 09:54:50 +02:00
Kitware Robot cd82e3f8f5 CMake Nightly Date Stamp 2013-05-18 00:01:04 -04:00
Stephen Kelly 44258cc26c Remove unused typedef. 2013-05-17 09:01:01 +02:00
Kitware Robot edeabd18e6 CMake Nightly Date Stamp 2013-05-17 00:01:04 -04:00
Brad King 5e993a2822 Merge topic 'fix-moc-with-empty-COMPILE_DEFINITIONS'
33ed186 automoc: Read target defines unconditionally
2013-05-16 14:48:01 -04:00
Stephen Kelly 33ed186fce automoc: Read target defines unconditionally
Commit 429e3699 (Process COMPILE_DEFINITIONS as generator expressions
in QtAutomoc., 2013-01-25) introduced a check for the existence of the
COMPILE_DEFINITIONS property on the target before processing it.

At the time, compile definitions from linked targets were added to the
COMPILE_DEFINITIONS property by target_link_libraries. The way such
transitive compile definitions worked was changed in subsequent
commit a1c4905f (Use the link information as a source of compile
definitions and includes., 2013-02-12), so that the COMPILE_DEFINITIONS
property may be empty, despite the fact that there are definitions
which should be used.
2013-05-16 14:43:45 -04:00
Brad King a052a79949 Merge topic 'CTest-less-cd'
9969bfb CTest: avoid useless changing of directory
2013-05-16 14:43:44 -04:00
Brad King f122dd3d47 Merge topic 'vs-configurations'
42bb42d VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
2013-05-16 14:38:40 -04:00
Brad King e477f21af2 Merge topic 'MemChecker-improvements'
10bc50e Tests: ignore Guard Malloc messages in MemChecker tests
159c3e9 Tests: add a test with custom options passed to valgrind
61ddb93 CTest: fix comment documenting cmBoundsCheckerParser class
cbdfcb0 Tests: add test for non-existent Valgrind suppression file
3b5b758 CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
7752253 Tests: verify that memory checker output files are always present
abf1df4 Tests: remove code duplication in CTestTestMemCheck tests
f499422 CTest: remove unreachable code and CTestTestMemcheckUnknown test
dde6306 CTest: use an output file for Valgrind (#14110)
bcc0f3f Tests: create output files for all memory checkers
2013-05-16 14:38:35 -04:00
Brad King 62a9bdb466 Merge topic 'only-first-output-regex'
12cf7bc CTest: break after first regex match on output
2013-05-16 14:38:31 -04:00
Brad King 5d6e54ce50 Merge topic 'test_regex_doc'
74228e8 Doc: fix example for FAIL_REGULAR_EXPRESSION
2013-05-16 14:38:28 -04:00
Brad King 07d8492178 Merge topic 'positive-test-times'
e319e32 CTest: make sure never to report negative test times (#14132)
2013-05-16 14:38:20 -04:00
Brad King 0dc0e7d885 Merge topic 'doc-improvements'
7cc2805 Docs: Clarify wording "flag used" => "flag (to|will) be used"
2378a69 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames
56ca34d Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES)
2bab472 VS10: add detailed comment about MIDL processing
e619111 Explain distribution of Win9x binary on all Windows versions.
5ca4336 FindwxWidgets: add DOC strings with usual style
f57800d Fix spelling and typos (product names)
bf019d7 Fix spelling and typos (non-binary)
ddac8d3 Fix spelling and typos (affecting binary data / module messages)
86832ce Fix spelling and typos (affecting users)
2013-05-16 14:38:07 -04:00
Brad King 07afd4f375 Merge topic 'update-kwsys'
b7593bf Merge branch 'upstream-kwsys' into update-kwsys
d0cdc68 KWSys 2013-05-06 (f4928d44)
0c04428 Merge branch 'upstream-kwsys' into update-kwsys
327c982 KWSys 2013-04-25 (709fb5c1)
2013-05-16 14:37:59 -04:00
Brad King 1843f2e0cd Merge topic 'eclipse-doc-typo'
b9c1f3b Eclipse: Add a missing space in the documentation
2013-05-16 14:37:37 -04:00
Brad King 27e4ddcd3f Merge topic 'EclipseUseGmakeErrorParser_13699'
c46b46b Use GmakeErrorParser instead of deprecated MakeErrorParser (fixes bug 0013699)
2013-05-16 14:37:32 -04:00
Brad King 3e6f5ff33c Merge topic 'QtDialogSearchText2'
f92d7e7 cmake-gui: use shortcut F only for "Find in Output"
6e57724 cmake-gui: Add function for going to next error message in Output window
7be2d8a cmake-gui: Change shortcut of the search field from Ctrl-F to Alt-E
4ce65e8 cmake-gui: Add search functions to the context menu of the Output widget
df3663b cmake-gui: Add search functions for Output window (#9733)
2013-05-16 14:37:21 -04:00
Brad King 8ec007083e Merge topic 'ninja_add_custom_command_windows'
e7c58f6 Ninja: use cd /D to set directory on Windows
2013-05-16 14:37:09 -04:00
Brad King d86d0e622a Merge topic 'xcode-explicitFileType'
5683146 Xcode: Use explicitFileType to mark source types (#14093)
2013-05-16 14:36:54 -04:00
Brad King 7a198773f3 Merge topic 'improve-get_filename_component-names'
7d1590e get_filename_component: Add DIRECTORY option (#14091)
ec1ba9b get_filename_component: Add explicit unit tests
2013-05-16 14:36:49 -04:00
Brad King e1178478b7 Merge topic 'msbuild-targets-in-subdirs'
ac9a5f4 ctest_build: Pass projectDir to GenerateBuildCommand
a6c0299 CTest: Simplify ctest_* command source/build dir lookup
1ca9318 VS: Add test for building MSBuild project in subdir
3cd4000 VS: Use .sln parser to build targets in subdirs with msbuild (#13623)
df035e4 VS: Create parser for Visual Studio .sln files
de8be9e Add projectDir parameter to GenerateBuildCommand
2013-05-16 14:36:27 -04:00
Brad King 9cdb5c0b54 Merge topic 'vs10-preprocessor-semicolons'
4e4688e VS 10: Escape ; as %3B in preprocessor definitions (#14073)
2013-05-16 14:36:19 -04:00
Brad King 1b4b64cd3c Merge topic 'vs-no-compiler-pdb-setting'
87c0d16 Ninja: Fix OBJECT_DIR placeholder path conversion
fb9f73d MSVC: Invoke 'link' directly for executables
42ba1b0 VS: Separate compiler and linker PDB files (#11899, #14062)
2013-05-16 14:36:11 -04:00
Stephen Kelly a7ba4520c7 Add the JOIN generator expression.
This generator expression joins a list with a separator. The separator
may contain arbitrary content, such as commas, which is ordinarily a
delimiter in the generator expression syntax.
2013-05-16 19:36:31 +02:00
Stephen Kelly 96ec3147bb Make it possible for any genex to have arbitrary content at the end. 2013-05-16 19:36:31 +02:00
Stephen Kelly bd638ee20f Rename the method determining if a genex accepts arbitrary content.
The meaning of this will be expanded to generator expressions with
more than a single parameter.
2013-05-16 19:36:31 +02:00
Stephen Kelly dc742fe4be Extract the ProcessArbitraryContent method. 2013-05-16 19:36:31 +02:00
Stephen Kelly 0a4d7d883c Remove unused marker for a variable which is now used. 2013-05-16 19:34:21 +02:00
Stephen Kelly c70b9b51d9 Fix style. 2013-05-16 19:33:13 +02:00
Stephen Kelly 05bf9721e4 Fix handling of commas in arbitrary content in genexes.
As the comma is the parameter separator, it needs to be re-added
when evaluating to reconstruct arbitrary content.
2013-05-16 19:25:06 +02:00
John Farrier 79ec7868d0 VS: Add Windows Forms Support
Add support to maintain designer functionality for Visual Studio C++
Windows Forms projects.  Also add a test project showing how to use
the CMakeLists.txt file and, when successfully configured, will allow
use of the designer for the included form.
2013-05-16 13:06:44 -04:00
Brad King 272431a84f Begin post-2.8.11 development 2013-05-16 12:44:26 -04:00
Robert Maynard 0ad0c37206 CMake 2.8.11 2013-05-15 11:17:10 -04:00
Rolf Eike Beer 9969bfb773 CTest: avoid useless changing of directory
At this point we do not care what the current directory is, as nothing that
requires a specific directory is done. Just make sure that at the end we are
back in the same directory as at the start.
2013-05-15 08:50:22 +02:00
Kitware Robot 5dd8c01429 CMake Nightly Date Stamp 2013-05-15 00:01:03 -04:00
Kitware Robot 26ad32031c CMake Nightly Date Stamp 2013-05-14 00:01:03 -04:00
Brad King 42bb42d197 VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
Initialize the CMAKE_CONFIGURATION_TYPES cache entry early during
EnableLanguage like the Xcode generator does.  Avoid depending on
the MSVC compiler information module to do it.  Otherwise code like

  project(MyProj NONE)

sets CMAKE_CONFIGURATION_TYPES late (in GenerateConfigurations), and
to only "Debug" and "Release" instead of the standard set of 4.

Reported-by: Paul Smith <paul@mad-scientist.net>
2013-05-13 11:07:46 -04:00
Kitware Robot a3f106dedf CMake Nightly Date Stamp 2013-05-13 00:01:02 -04:00
Kitware Robot 90dad912f8 CMake Nightly Date Stamp 2013-05-12 00:01:03 -04:00
Rolf Eike Beer 12cf7bc507 CTest: break after first regex match on output
PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION both take a list of expressions.
Stop searching if the first of those has matched the output as the result will not
change anymore.
2013-05-11 12:15:38 +02:00
Rolf Eike Beer 74228e8486 Doc: fix example for FAIL_REGULAR_EXPRESSION
The example used PASS_REGULAR_EXPRESSION instead of FAIL...
2013-05-11 12:02:05 +02:00
Kitware Robot 1c575ab72f CMake Nightly Date Stamp 2013-05-11 00:01:06 -04:00
Rolf Eike Beer e319e32b8c CTest: make sure never to report negative test times (#14132)
Because of clock scew between processors or just because of someone changing
the system time the end timestamp may be before the start time. Reporting a
negative time doesn't any sense, just report zero there as it already happens
for really fast tests.
2013-05-10 20:50:22 +02:00
Kitware Robot a3e7c94fd7 CMake Nightly Date Stamp 2013-05-10 00:01:03 -04:00
Rolf Eike Beer 61ddb9319b CTest: fix comment documenting cmBoundsCheckerParser class
This was obviously copied from Source/cmGlobalXCodeGenerator.cxx during
implementation but the comment was forgotten.
2013-05-09 19:25:50 +02:00
Rolf Eike Beer 3b5b758915 CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
The --workaround-gcc296-bugs has been part of the default Valgrind flags since
Valgrind support was added in commit 5b232ded15
(ENH: Add initial memory check support which works for Valgrind, 2003-12-15).
The Valgrind manpage says that this option should be avoided if not really
needed as it may cause real errors to get ignored. If someone uses a compiler
that really needs the flag this flag should be set by the user explicitely.
Most users will never set any flags and probably never notice that they use a
flag they shouldn't.
2013-05-09 19:24:53 +02:00
Rolf Eike Beer f4994223bb CTest: remove unreachable code and CTestTestMemcheckUnknown test
The memory checker command can't be quoted at this point, because previously it
has been tested that the given file exists, which will fail if the name is
quoted. The CTestTestMemcheckUnknown test aimed to test this case, has always
failed to do so and serves no useful purpose therefore.
2013-05-09 19:22:29 +02:00
Rolf Eike Beer dde6306a48 CTest: use an output file for Valgrind (#14110)
This makes sure Valgrind output will not screw up tests that match on the
output.
2013-05-09 19:22:01 +02:00
Kitware Robot cf4869ba08 CMake Nightly Date Stamp 2013-05-09 00:01:03 -04:00
Kitware Robot 619fa2cce8 CMake Nightly Date Stamp 2013-05-08 00:01:03 -04:00
Robert Maynard 6162e0ff2d CMake 2.8.11-rc4 2013-05-07 11:56:31 -04:00
Robert Maynard b882ef7565 Merge branch 'release' 2013-05-07 11:33:14 -04:00
Andreas Mohr 7cc2805cd6 Docs: Clarify wording "flag used" => "flag (to|will) be used"
The phrase "flag used" is somewhat imprecise, so extend it to stress
intentions.

Also correct:

- "Flag" => "Flags"
- "[CMAKE_BUILD_TYPE]" => "<CONFIG>"
2013-05-07 08:42:21 -04:00
Andreas Mohr 2378a698a9 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames
Add "filename" to the descriptions.
2013-05-07 08:42:21 -04:00
Andreas Mohr 56ca34dbbd Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES)
Bring woefully outdated descriptions somewhat up to speed.
2013-05-07 08:42:20 -04:00
Andreas Mohr 2bab472ecb VS10: add detailed comment about MIDL processing 2013-05-07 08:42:20 -04:00
Andreas Mohr e619111d91 Explain distribution of Win9x binary on all Windows versions. 2013-05-07 08:42:20 -04:00
Andreas Mohr f57800d6f5 Fix spelling and typos (product names)
API, Borland, MinGW, UNIX, Mac OS X.
2013-05-07 08:42:20 -04:00
Andreas Mohr bf019d765d Fix spelling and typos (non-binary) 2013-05-07 08:39:19 -04:00
Andreas Mohr ddac8d3d2d Fix spelling and typos (affecting binary data / module messages) 2013-05-07 08:39:19 -04:00
Andreas Mohr 86832cecd5 Fix spelling and typos (affecting users) 2013-05-07 08:39:19 -04:00
Brad King b7593bf3f5 Merge branch 'upstream-kwsys' into update-kwsys 2013-05-07 08:38:10 -04:00
Kitware Robot ff298fff79 CMake Nightly Date Stamp 2013-05-07 00:01:03 -04:00
Brad King 6c6bfe1509 Merge topic 'doc-tll-usage-requirements'
2618e02 target_link_libraries: Update usage requirements documentation
2013-05-06 10:09:44 -04:00
Brad King 0483bf8062 Merge topic 'fix-per-config-tll-include-dirs'
dea1df4 Memoize usage requirement include directories in a config-specific map
26dba6a Fix include dir propagation from conditionally linked targets
b8259c3 Centralize maintenance of usage requirement include directories
2013-05-06 10:09:28 -04:00
Stephen Kelly dea1df4e5e Memoize usage requirement include directories in a config-specific map
Commit 42ebb188 (Memoize includes and defines from interface libraries.,
2013-02-22) introduced caching of the includes.  Fix the memoization to
be configuration-specific so that we do not accumulate entries across
multiple evaluations in a multi-config generator.
2013-05-06 09:59:28 -04:00
Stephen Kelly 26dba6a162 Fix include dir propagation from conditionally linked targets
Generator expressions, including configuration-specific expressions may
be used as link libraries of targets.  The old-style keywords of
target_link_libraries are handled in terms of new generator expressions.
However, the generator expressions expect target names to be valid
against a regular expression, whereas target_link_libraries does not
require validation.  In generator expression constructed without any
action from the user we need to ensure that only valid expressions are
generated.  Ensure that strings which are not valid target names are not
used in generator expressions which validate the argument.

Code like

 target_link_libraries(B debug A)

generates usage requirement references such as "$<$<CONFIG:DEBUG>:A>".
When cmTarget::GetIncludeDirectories uses such references it generates
expressions like:

 $<TARGET_PROPERTY:$<$<CONFIG:DEBUG>:A>,INTERFACE_INCLUDE_DIRECTORIES>

When the conditions are false such references evaluate as an empty
string and the expression fails with an error such as:

 $<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name.

Fix this by teaching cmTarget::GetIncludeDirectories to wrap the above
expression inside a conditional:

 $<$<BOOL:$<$<CONFIG:DEBUG>:A>>:...>

so that $<TARGET_PROPERTY:...> will not be evaluated with an empty
target.
2013-05-06 09:55:45 -04:00
Stephen Kelly b8259c3d69 Centralize maintenance of usage requirement include directories
Maintain a target's internal list of usage requirement include
directories whenever the LINK_LIBRARIES property is set by either
target_link_libraries or set_property.
2013-05-06 09:54:11 -04:00
Kitware Robot b85f691d78 CMake Nightly Date Stamp 2013-05-06 00:01:03 -04:00
Kitware Robot 4cb77c4a0e CMake Nightly Date Stamp 2013-05-05 00:01:02 -04:00
Kitware Robot 21bdeadf00 CMake Nightly Date Stamp 2013-05-04 00:01:02 -04:00
Kitware Robot 41839d6fb6 CMake Nightly Date Stamp 2013-05-03 00:01:03 -04:00
Kitware Robot d94eae4356 CMake Nightly Date Stamp 2013-05-02 00:01:02 -04:00
Jack O'Connor b9c1f3b78a Eclipse: Add a missing space in the documentation 2013-05-01 14:29:01 -04:00
Kitware Robot e9e088a4df CMake Nightly Date Stamp 2013-05-01 00:01:08 -04:00
Brad King 2618e0257e target_link_libraries: Update usage requirements documentation
Re-word the documentation to make clear that CMake integrates usage
requirements during generation and not synchronously during
configuration or execution of target_link_libraries.
2013-04-30 09:15:03 -04:00
Kitware Robot 2ba65cc9d9 CMake Nightly Date Stamp 2013-04-30 00:01:05 -04:00
Kitware Robot c80594ba12 CMake Nightly Date Stamp 2013-04-29 00:01:13 -04:00
Victor Zverovich c46b46b628 Use GmakeErrorParser instead of deprecated MakeErrorParser (fixes bug 0013699) 2013-04-28 15:50:31 +02:00
Kitware Robot 77df4ef5ac CMake Nightly Date Stamp 2013-04-28 00:01:03 -04:00
Kitware Robot 82f5936a8b CMake Nightly Date Stamp 2013-04-27 00:01:11 -04:00
Brad King 0c04428d04 Merge branch 'upstream-kwsys' into update-kwsys 2013-04-26 16:08:35 -04:00
Kitware Robot c8b34729d9 CMake Nightly Date Stamp 2013-04-26 00:01:09 -04:00
Kitware Robot 78185f598c CMake Nightly Date Stamp 2013-04-25 00:01:03 -04:00
Alex Neundorf f92d7e7f95 cmake-gui: use shortcut F only for "Find in Output"
Before it was used also for "Find Next" and "Find Previous"

Alex
2013-04-24 15:32:43 -04:00
Marc Bartholomaeus 6e57724fc3 cmake-gui: Add function for going to next error message in Output window
Using new shortcuts: F8 (Visual Studio) and Ctrl-. (Eclipse)

Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus 7be2d8acc6 cmake-gui: Change shortcut of the search field from Ctrl-F to Alt-E
Ctrl-F is now used by "Find in Output".

Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus 4ce65e82f5 cmake-gui: Add search functions to the context menu of the Output widget
Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus df3663bfab cmake-gui: Add search functions for Output window (#9733)
Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:34 -04:00
Kitware Robot 90bd164193 CMake Nightly Date Stamp 2013-04-24 00:01:07 -04:00
Kitware Robot 2baf851c34 CMake Nightly Date Stamp 2013-04-23 00:01:07 -04:00
Kitware Robot e55b8ce4a4 CMake Nightly Date Stamp 2013-04-22 00:01:04 -04:00
Kitware Robot d37fe5bc5b CMake Nightly Date Stamp 2013-04-21 00:01:05 -04:00
Kitware Robot 50e96802d2 CMake Nightly Date Stamp 2013-04-20 00:01:03 -04:00
Kitware Robot e6c3595fde CMake Nightly Date Stamp 2013-04-19 00:01:10 -04:00
Ian Monroe e7c58f6c35 Ninja: use cd /D to set directory on Windows
Add_custom_command was unable to handle build and source directories
existing on different drives.
2013-04-18 14:16:46 -04:00
Robert Maynard 573f39cb2a CMake 2.8.11-rc3 2013-04-18 11:55:10 -04:00
Robert Maynard dfca68ce89 Merge branch 'release' 2013-04-18 11:53:22 -04:00
Kitware Robot 6a3ee5dd4e CMake Nightly Date Stamp 2013-04-18 00:01:08 -04:00
Brad King 52b758b5c2 Merge topic 'doc-get_filename_component'
df71f96 get_filename_component: Document path components more clearly (#14091)
2013-04-17 11:36:30 -04:00
Brad King 8a2763b3ac Merge topic 'missing-fclose-in-trycompile'
ce441fa try_compile: add missing fclose() to recently added error case
2013-04-17 11:35:26 -04:00
Brad King 5b5a365aa6 Merge topic 'fix-clear-INCLUDE_DIRECTORIES-prop'
5a5e0fa Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
2013-04-17 11:35:14 -04:00
Kitware Robot f2958ff984 CMake Nightly Date Stamp 2013-04-17 00:01:08 -04:00
Brad King 5683146185 Xcode: Use explicitFileType to mark source types (#14093)
Replace use of lastKnownFileType with explicitFileType to insist
that Xcode treat the file as we ask.
2013-04-16 15:44:48 -04:00
Brad King 7d1590e6f9 get_filename_component: Add DIRECTORY option (#14091)
The name "PATH" is not precise so add equivalent option "DIRECTORY".
Document the latter as preferred and the former as a legacy alias.
2013-04-16 09:37:37 -04:00
Brad King df71f968cd get_filename_component: Document path components more clearly (#14091)
Organize component names in a table to explain each in more detail.
Clearly state that PATH is the directory name.
2013-04-16 09:02:40 -04:00
Rolf Eike Beer ce441fac07 try_compile: add missing fclose() to recently added error case
In commit 236133e7 (Handle targets in the LINK_LIBRARIES of try_compile,
2013-02-09) an error return case was added without closing the file in
progress.  Add the missing fclose() call.

Spotted by sevenhill.
2013-04-16 08:38:33 -04:00
Kitware Robot 201db269b8 CMake Nightly Date Stamp 2013-04-16 00:01:10 -04:00
Kitware Robot 51e4424df6 CMake Nightly Date Stamp 2013-04-15 00:01:14 -04:00
Kitware Robot ee62ac4f1a CMake Nightly Date Stamp 2013-04-14 00:01:03 -04:00
Kitware Robot edd90f9911 CMake Nightly Date Stamp 2013-04-13 00:01:16 -04:00
Petr Kmoch ac9a5f4d94 ctest_build: Pass projectDir to GenerateBuildCommand
This allows the ctest_build command's TARGET option to name a target
in a subdirectory and still build properly with msbuild.
Add test case covering use of ctest_build() with such a TARGET.
2013-04-12 11:35:36 -04:00
Brad King a6c0299c40 CTest: Simplify ctest_* command source/build dir lookup
In cmCTestHandlerCommand::InitialPass call InitializeHandler after setting
the CTest "SourceDirectory" and "BuildDirectory" configuration values
instead of before.  This makes the values available to InitializeHandler
methods in subclasses, so also drop the duplicate configuration of those
values from cmCTestConfigureCommand::InitializeHandler.
2013-04-12 11:35:36 -04:00
Petr Kmoch 3cd4000601 VS: Use .sln parser to build targets in subdirs with msbuild (#13623)
Use cmVisualStudioSlnParser in GenerateBuildCommand() to provide correct
command line for MSBuild even when target project is stored in a
subdirectory.
2013-04-12 11:35:36 -04:00
Petr Kmoch df035e4825 VS: Create parser for Visual Studio .sln files
Create class cmVisualStudioSlnParser as a generic parser for Visual
Studio .sln files. Implement minimum functionality but keep class
extensible.  Add tests for the class.
2013-04-12 11:35:35 -04:00
Petr Kmoch de8be9ef7d Add projectDir parameter to GenerateBuildCommand
Extend the cmGlobalGenerator::GenerateBuildCommand virtual method
signature with a "projectDir" parameter specifying the top of the
project build tree for which the build command will be generated.
Populate it from call sites in cmGlobalGenerator::Build where a
fully-generated build tree should be available.
2013-04-12 11:35:35 -04:00
Kitware Robot 1513dd399c CMake Nightly Date Stamp 2013-04-12 00:01:08 -04:00
Brad King 4e4688e469 VS 10: Escape ; as %3B in preprocessor definitions (#14073)
Use the suggestion from http://support.microsoft.com/kb/2262855 to escape
semicolons in preprocessor definitions for VS >= 10.  Update the
COMPILE_DEFINITIONS documentation disclaimer list of known limitations
accordingly.  Update our "Preprocess" test to cover the case.

Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
2013-04-11 11:41:15 -04:00
Brad King 87c0d16ab7 Ninja: Fix OBJECT_DIR placeholder path conversion
Transform the path using ConvertToNinjaPath just as we do for all other
paths.  This fixes the OutOfSource test for objects in the ../OutOfBinary
directory by computing the proper full path for the /Fd option.
2013-04-11 10:23:33 -04:00
Kitware Robot 6bfa3d8668 CMake Nightly Date Stamp 2013-04-11 00:01:08 -04:00
Stephen Kelly 5a5e0fa9d3 Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
This was broken by commit 18a3195a (Keep track of INCLUDE_DIRECTORIES
as a vector of structs., 2012-11-19).
2013-04-10 18:12:56 +02:00
Kitware Robot c6253fba41 CMake Nightly Date Stamp 2013-04-10 00:01:09 -04:00
Kitware Robot a5b39fd3c6 CMake Nightly Date Stamp 2013-04-09 00:01:09 -04:00
Kitware Robot a96452ec06 CMake Nightly Date Stamp 2013-04-08 00:01:05 -04:00
Kitware Robot 4336fadff0 CMake Nightly Date Stamp 2013-04-07 00:01:04 -04:00
Kitware Robot 88073c8e08 CMake Nightly Date Stamp 2013-04-06 00:01:09 -04:00
Robert Maynard 83e0fd0d1c CMake 2.8.11-rc2 2013-04-05 15:29:39 -04:00
Robert Maynard dfe8e4b9f0 Merge branch 'release' 2013-04-05 14:00:35 -04:00
Brad King 42ba1b08f3 VS: Separate compiler and linker PDB files (#11899, #14062)
The MS tools create two types of PDB files as explained here:

 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.71%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.80%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.90%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.100%29.aspx

One is created by the compiler (/Fd) and the other by the linker (/pdb).
The two options should not specify the same file.  Split them up.

In the VS IDE generators, simply drop ProgramDataBaseFileName to
take the VS default "/Fd$(IntDir)vc$(PlatformToolsetVersion).pdb".

In the Makefile generators, set "/Fd" on the compile line to be
the directory containing object files (with a trailing slash the
compiler will add the "vc$(PlatformToolsetVersion).pdb" filename
automatically).  Drop the /Fd option from the exe link command
line and add "/pdb" instead (already done for dll linking).
Update these rules for both MSVC and Intel tools.

Drop support for PDB_OUTPUT_DIRECTORY and PDB_NAME in STATIC
libraries because the generated .pdb files are only from /Fd
and not real linker-generated .pdb files.  Update documentation to
clarify that the PDB_* properties are only for linker .pdb files.

This regresses the PDBDirectoryAndName test for STATIC libraries.
Since it is not clear at this time what should be done for STATIC
library .pdb files, comment out the relevant portion of the test
and leave a TODO comment.
2013-04-05 11:25:09 -04:00
Kitware Robot 2d88085204 CMake Nightly Date Stamp 2013-04-05 00:01:10 -04:00
Brad King 9cccd2c29c Merge topic 'usr-move-relocatable'
6c613b4 Handle usr-move without forcing absolute paths (#14041)
2013-04-04 14:20:21 -04:00
Kitware Robot af79291fb4 CMake Nightly Date Stamp 2013-04-04 00:01:08 -04:00
Brad King 6c613b433c Handle usr-move without forcing absolute paths (#14041)
In commit 0c727b90 (install(EXPORT): Force absolute paths for usr-move,
2013-03-08) and commit d4774140 (configure_package_config_file: force
absolute paths for usr-move, 2013-01-24) we supported Linux
distributions implementing the "/usr move" by assuming that installation
to (/usr)?/lib(64)? represents a non-relocatable system package.

When cross-compiling one may prepare a package for installation into a
system location on a target machine but install the package files on the
*host* machine inside another path for use with CMAKE_FIND_ROOT_PATH.
In this case the package development files must still be relocatable.

Handle "/usr move" with a new approach that works with relocatable
files.  Teach configure_package_config_file and install(EXPORT) to
generate special logic in a package configuration file or targets file
for installation under (/usr)?/lib(64)?.  Teach the file to recognize
when it is loaded through a symlink that refers to the same realpath as
its original install destination.  In such a case, use the original
install prefix.  Otherwise, compute the prefix relative to the current
file location to make it relocatable.
2013-04-03 11:19:47 -04:00
Kitware Robot 99f7cc127a CMake Nightly Date Stamp 2013-04-03 00:01:08 -04:00
Brad King 972ae90fc6 Merge topic 'automoc-vs11-workaround'
20c99b1 automoc: Use a pre-build event in VS >= 7
2013-04-02 14:07:02 -04:00
Brad King ec0b84576b Merge topic 'clarify-add_dependencies-error'
de13d68 add_dependencies: Distinguish target v. file dependencies in error (#14050)
2013-04-02 14:06:55 -04:00
Kitware Robot 3423915720 CMake Nightly Date Stamp 2013-04-02 00:01:09 -04:00
Kitware Robot 8869c0febd CMake Nightly Date Stamp 2013-04-01 00:01:04 -04:00
Kitware Robot 8fe0f2be83 CMake Nightly Date Stamp 2013-03-31 00:01:08 -04:00
Kitware Robot f1502d2f88 CMake Nightly Date Stamp 2013-03-30 00:01:15 -04:00
Brad King 20c99b1dbc automoc: Use a pre-build event in VS >= 7
In VS IDE generators add a pre-build event to perform automoc instead of
using a separate custom target.  This reduces the number of targets in the
.sln that need to be loaded by the IDE.

This also works around a VS 11 bug as discussed in issue 13900.

Suggested-by: Hauke Heibel <hauke.heibel@gmail.com>
2013-03-29 15:58:21 -04:00
Brad King de13d68d11 add_dependencies: Distinguish target v. file dependencies in error (#14050)
When called with a non-existent LHS target name the user may be trying
to add file-level dependencies.  Clarify the error message to explain
the difference between target-level and file-level dependencies.  Point
the reader at the commands and options needed for the latter.
2013-03-29 15:00:33 -04:00
Kitware Robot 969a7fde7a CMake Nightly Date Stamp 2013-03-29 00:01:08 -04:00
Brad King 1f16bd24ee Merge topic 'SystemTools-TrimWhitespace-all'
674f918 cmSystemTools: Generalize TrimWhitespace to all whitespace
2013-03-28 10:43:22 -04:00
Brad King 2afcbe3090 Merge topic 'error-on-exported-missing-include-dir'
634bb33 Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIES
2013-03-28 10:42:42 -04:00
Kitware Robot 6a03ea4725 CMake Nightly Date Stamp 2013-03-28 00:01:11 -04:00
Petr Kmoch 674f918a1a cmSystemTools: Generalize TrimWhitespace to all whitespace
Modify cmSystemTools::TrimWhitespace() to remove all leading and
trailing whitespace, not just spaces.
2013-03-27 08:46:55 -04:00
Kitware Robot eb462356cf CMake Nightly Date Stamp 2013-03-27 00:01:09 -04:00
Stephen Kelly 634bb33f3a Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIES
We can do this check only if the TargetName is non-empty, which means
that we're evaluating INTERFACE_INCLUDE_DIRECTORIES from a linked
dependency which was set using target_link_libraries.

It is possible to have relative paths in INCLUDE_DIRECTORIES already
in CMake 2.8.10.2, so that part will require a policy to fix.
2013-03-26 19:56:10 +01:00
Brad King b9e4a5abb4 Merge topic 'error-on-exported-missing-include-dir'
28051f1 Report an error on IMPORTED targets with a faulty INTERFACE
af81a3c install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIES
2013-03-26 14:36:45 -04:00
Brad King c20f4dd620 Merge topic 'vs-sln-header'
c677838 VS: Fix VS 10/11 .sln headers (#14038)
2013-03-26 14:36:32 -04:00
Brad King a3872ba5f9 Merge topic 'fix-new-target-commands-docs'
2e80f9f Fix new target commands documentation.
2013-03-26 14:36:26 -04:00
Brad King 0261bdfc1d Merge topic 'fix-COMPILE_DEFINITIONS-config'
1703b00 Test evaluation of per-config COMPILE_DEFINITIONS (#14037)
a6286e9 Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)
2013-03-26 14:36:07 -04:00
Stephen Kelly 28051f1150 Report an error on IMPORTED targets with a faulty INTERFACE
It is considered an error if the INTERFACE_INCLUDE_DIRECTORIES contains
a directory which does not exist, which indicates a programmer error
by the upstream, or a packaging error.

One of the RunCMake.CompatibleInterface tests also needs to be updated
due to this change. Non-existant includes were used in the test, but
are not needed.
2013-03-26 10:45:28 -04:00
Stephen Kelly af81a3c31b install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIES
Check that source and binary directories are not part of the
INTERFACE_INCLUDE_DIRECTORIES for installed IMPORTED targets.

This is limited to directories which do not contain generator
expressions to evaluate. Such paths can only be checked at time
of use of the imported target, which will be done in a follow up
patch.
2013-03-26 10:45:07 -04:00
Kitware Robot 2fcb06039d CMake Nightly Date Stamp 2013-03-26 00:01:08 -04:00
Brad King c677838c1a VS: Fix VS 10/11 .sln headers (#14038)
The VS version we generate in the .sln header is used by VS when opening
the file through Windows Explorer and possibly elsewhere.  Fix our
generators to use version strings known to VS to avoid a drop-down box.

For VS 10, since commit 4f96af44 (Fix VS 10 .sln files for Windows
Explorer, 2009-10-22) we use "Visual Studio 2010" instead of just
"Visual Studio 10".  This is correct except that for the Express edition
we need "Visual C++ Express 2010".

For VS 11, since commit f0d66ab4 (VS11: Fix comment generated at the top
of *.sln files, 2011-10-20) we use "Visual Studio 11" in the .sln header
but the preferred value is "Visual Studio 2012" (just as the first
commit mentioned above fixed for VS 10).  Also for the Express edition
we need "Visual Studio Express 2012 for Windows Desktop".
2013-03-25 14:25:14 -04:00
Stephen Kelly 2e80f9f21f Fix new target commands documentation.
The target_include_directories and target_compile_defintions commands
accepted targets as arguments until commit f6b16d4b (Don't allow
targets args in the new target commands., 2013-01-29). This followed
from discussion on the mailing list (target_include_directories() accepts
only absolute paths ?, 2013-01-28):

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5925/focus=5948

 http://public.kitware.com/pipermail/cmake-developers/2013-January/006301.html

It was also decided to allow relative paths in target_include_directories().
2013-03-25 19:23:01 +01:00
Stephen Kelly a6286e92c9 Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)
The API for retrieving per-config COMPILE_DEFINITIONS has long
existed because of the COMPILE_DEFINITIONS_<CONFIG> style
properties. Ensure that the provided configuration being generated
is also used to evaluate the generator expressions
in cmTarget::GetCompileDefinitions.

Both the generic COMPILE_DEFINITIONS and the config-specific
variant need to be evaluated with the requested configuration. This
has the side-effect that the COMPILE_DEFINITIONS does not need to
be additionally evaluated with no configuration, so the callers can
be cleaned up a bit too.
2013-03-25 10:49:22 -04:00
Brad King ddbe2e1d7d Merge topic 'compile-object-TARGET-placeholder'
0b7ad3f Replace <TARGET> in CMAKE_<LANG>_COMPILE_OBJECT rule variables
2013-03-25 10:08:10 -04:00
Brad King 365ada46ce Merge topic 'rename-include-current-dir-in-interface-var'
fc43477 Rename variable for including current directory in interfaces
2013-03-25 10:08:05 -04:00
Brad King 33c2254aef Merge topic 'update-kwsys'
3ed2d03 Merge branch 'upstream-kwsys' into update-kwsys
83a9f09 KWSys 2013-03-21 (2d263bc3)
2013-03-25 10:08:00 -04:00
Brad King 40e677e785 Merge topic 'cpack-printf-format-warnings'
0fca154 CPack: Avoid "format expects 'unsigned int'" warnings
2013-03-25 10:07:57 -04:00
Brad King 1cc637da20 Merge topic 'doc-string-regex'
763a6dc string: Fix regex documentation of '^' and '$' (#14028)
2013-03-25 10:07:52 -04:00
Kitware Robot 1a60115bf5 CMake Nightly Date Stamp 2013-03-25 00:01:04 -04:00
Kitware Robot 19700735d5 CMake Nightly Date Stamp 2013-03-24 00:01:03 -04:00
Kitware Robot d4a94b8be4 CMake Nightly Date Stamp 2013-03-23 00:01:08 -04:00
Paul Kunysch 0fca154344 CPack: Avoid "format expects 'unsigned int'" warnings
Cast sprintf uid and gid arguments to match the type expected by their
"%-6u" format strings.
2013-03-22 08:53:58 -04:00
Brad King 3ed2d03ee9 Merge branch 'upstream-kwsys' into update-kwsys 2013-03-22 08:08:03 -04:00
Brad King 0b7ad3f091 Replace <TARGET> in CMAKE_<LANG>_COMPILE_OBJECT rule variables
In some languages the compiler may need to know the path of the final
target file for which an object is being compiled.  Honor the <TARGET>
placeholder for compilation rules to support such cases.

Note that this cannot work with OBJECT library targets because the final
target path is not known during compilation (there can even be more than
one final target).

Suggested-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-03-22 07:52:54 -04:00
Kitware Robot 8bffce955d CMake Nightly Date Stamp 2013-03-22 00:01:08 -04:00
Kitware Robot aa16a433d3 CMake Nightly Date Stamp 2013-03-21 00:01:10 -04:00
Kitware Robot 2557e84d67 CMake Nightly Date Stamp 2013-03-20 00:01:10 -04:00
Brad King 3efede0ccc Merge topic 'automoc-append-implicit-dirs'
753b905 Automoc: append implicit includes after user-specified dirs
2013-03-19 19:37:49 -04:00
Stephen Kelly 753b905ec8 Automoc: append implicit includes after user-specified dirs
The commit d2536579 (Automoc: fix regression #13667, broken build in
phonon, 2012-11-19) changed Automoc to try to re-add the Qt header dir
if it was stripped out as an implicit include from the moc command
line. When invoking a compiler, those directories are stripped out
because they are built-in, but for moc, there are no built-in directories.

The follow-up commit acc22400 (Automoc: get include dirs without
stripping implicit include dirs off, 2012-12-07) went further by not
removing the implicit include dirs, if they were specified specifically
by the user.

This had the remaining problem that the implicit include dirs appeared
in a different order of precedence for moc compared to the compiler.
Resolve that by stripping out the include dirs, where specified for
the moc command line to, and then appending them at the end. Note that
the order of the appended implicit include directories is the order
they are specified in the CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES, not
the order specified by the user.
2013-03-19 19:36:42 -04:00
Brad King fc43477de0 Rename variable for including current directory in interfaces
Rename the variable added by commit 9ce1b9ef (Add
CMAKE_BUILD_INTERFACE_INCLUDES build-variable, 2012-11-25) to
CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE to be more consistent with the
existing CMAKE_INCLUDE_CURRENT_DIR variable.

Suggested-by: Alex Neundorf <neundorf@kde.org>
2013-03-19 16:44:17 -04:00
Brad King 017478570e Merge topic 'expand-version-of-Qt5-gui-fix'
6387f6d cmake-gui: Use the QStandardItemModel workaround until 5.1.0.
2013-03-19 15:20:37 -04:00
Brad King 16695a6d77 Merge topic 'fix-genex-preprocess'
7a619fa Fix cmGeneratorExpression::Preprocess for interleaved inputs.
2013-03-19 15:20:27 -04:00
Stephen Kelly 6387f6d85c cmake-gui: Use the QStandardItemModel workaround until 5.1.0.
If there is a Qt 5.0.3 release, it may or may not contain the patch
that fixes this issue.

 http://thread.gmane.org/gmane.comp.lib.qt.releasing/882

Just use the workaround until 5.1.0 which certainly will contain the
fix. Don't use the workaround before Qt 5.0.0.
2013-03-19 15:14:46 -04:00
Brad King 763a6dcd33 string: Fix regex documentation of '^' and '$' (#14028)
They match at the beginning and end of the input, not by line.

Reported-by: Martin Perzl <martin.perzl@web.de>
2013-03-19 13:14:22 -04:00
Kitware Robot 5dfa6240eb CMake Nightly Date Stamp 2013-03-19 00:01:07 -04:00
Stephen Kelly 7a619fa6fb Fix cmGeneratorExpression::Preprocess for interleaved inputs.
We can't find both preprocessing expressions at once, because then
the BUILD_INTERFACE will always be favored if both are present, even
if INSTALL_INTERFACE appears first.

This was affecting the behavior of install(EXPORT) because the
INTERFACE_INCLUDE_DIRECTORIES contained entries like

 /foo/include;$<INSTALL_INTERFACE:/bar/include>

As the INSTALL_INTERFACE always evaluates to '0', it always needs
to be preprocessed properly.
2013-03-18 15:09:47 +01:00
Brad King 85f7caabbb Merge topic 'CMAKE_AUTOMOC-Qt5-docs'
1b386b3 Document that CMAKE_AUTOMOC works with Qt 5.
2013-03-18 09:41:55 -04:00
Brad King a402bc4d5a Merge topic 'TI_DSP_to_TI'
27e6f6e TI compiler: add automatic detection of prefix and suffixes
b301586 rename TI_DSP toolchain to TI, since it works also for the ARM compiler
12b25df Determine C/CXX/Fortran compiler: fix indentation
7baa55a Determine C/CXX/Fortran compiler: minor restructuring
2013-03-18 09:41:37 -04:00
Kitware Robot ef63fa592a CMake Nightly Date Stamp 2013-03-18 00:01:04 -04:00
Kitware Robot d7a2a9c319 CMake Nightly Date Stamp 2013-03-17 00:01:13 -04:00
Stephen Kelly 1b386b3407 Document that CMAKE_AUTOMOC works with Qt 5. 2013-03-16 19:31:04 +01:00
Kitware Robot 253a913654 CMake Nightly Date Stamp 2013-03-16 00:01:09 -04:00
Kitware Robot 03b0ceebe5 CMake Nightly Date Stamp 2013-03-15 00:01:08 -04:00
Alex Neundorf b3015862e5 rename TI_DSP toolchain to TI, since it works also for the ARM compiler
Additionally, look for a special ar and strip

Alex
2013-03-14 21:47:59 +01:00
Robert Maynard db87209b6d CMake 2.8.11-rc1 2013-03-14 12:54:08 -04:00
Kitware Robot ae84d24b21 CMake Nightly Date Stamp 2013-03-14 00:01:10 -04:00
Brad King a95968fec9 Merge topic 'ninja-escape-line-breaks'
3b4436a Ninja: escape line breaks in literals
2013-03-13 13:42:00 -04:00
Brad King 0c1621ff95 Merge topic 'qt5-fixes'
404e1d6 cmake-gui: Workaround bug in Qt 5.0.0 to 5.0.3 QStandardItemModel
5144f6f cmake-gui: Use -fPIE if required by Qt.
2013-03-13 13:34:41 -04:00
Brad King 8128940ac1 Merge topic 'cleanup-early-include-CTest-failure'
d90f49b CTest: Fail early without PROJECT_BINARY_DIR (#14005)
2e1c2bd build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)
4e5cb37 Refactor RunCMake.build_command test to allow more cases
2013-03-13 13:34:36 -04:00
Brad King 26bfece1af Merge topic 'fix-automoc-no-qt'
a223a3b Automoc: Don't create automoc targets if Qt is not used (#13999)
65b5c1e Merge branch 'property-link-depends-no-crash' into fix-automoc-no-qt
2013-03-13 13:34:24 -04:00
Brad King 9a02a26702 Merge topic 'property-link-depends-no-crash'
ab079ee Avoid crash when checking property compatibility without link info
92a2ab7 Avoid crash when checking property link dependencies without link info
2013-03-13 13:34:20 -04:00
Brad King 7d9d0efc7b Merge topic 'genex-SEMICOLON'
7f3bb8b Add $<SEMICOLON> generator expression.
2013-03-13 13:34:16 -04:00
Brad King 0707e0d422 Merge topic 'add_subdirectory-trailing-slashes'
1df4928 add_subdirectory: Compute output dir with consistent slashes (#10072)
2013-03-13 13:34:02 -04:00
Brad King 26436346fb Merge topic 'doc-fixes'
3cf2f67 Documentation: Clarify a few subtleties
2013-03-13 13:33:53 -04:00
Kitware Robot a9c83592bf CMake Nightly Date Stamp 2013-03-13 00:01:11 -04:00
Stephen Kelly 404e1d675a cmake-gui: Workaround bug in Qt 5.0.0 to 5.0.3 QStandardItemModel
The commit in qtbase 9dfba89c (Add implementations of QAIM::sibling in
public APIs., 2012-09-26) added a buggy implementation of sibling(), and
the commit f136701b (Use the base implementation of
QAbstractItemModel::sibling in QSIM., 2013-02-21) resolves it.
Workaround the bug for Qt releases that have it.
2013-03-12 18:41:26 -04:00
Stephen Kelly 5144f6fb11 cmake-gui: Use -fPIE if required by Qt. 2013-03-12 18:41:15 -04:00
Brad King 2e1c2bd2dd build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)
If CMAKE_MAKE_PROGRAM is not set fail with an error message instead of
crashing.  Suggest calling project() or enable_language() first to
ensure that CMAKE_MAKE_PROGRAM is set.
2013-03-12 18:17:40 -04:00
Stephen Kelly a223a3b65f Automoc: Don't create automoc targets if Qt is not used (#13999)
Commit 79568f95 (automoc: Add source file to target early to set the
linker language, 2013-02-20) changed automoc initialization to a two
step process. In the first step, the generated source file was added
to the target, which allows the link language to be determined.

However, this bypassed the check for the availability of Qt itself.
At build-time the automoc file could not be generated because the moc
tool was not available to create it.

The solution is to only add the automoc file to the target if Qt is
found.
2013-03-12 17:42:02 -04:00
Brad King 65b5c1e064 Merge branch 'property-link-depends-no-crash' into fix-automoc-no-qt 2013-03-12 17:39:03 -04:00
Brad King ab079ee682 Avoid crash when checking property compatibility without link info
Teach the compatibility check added by commit 042ecf04 (Add API to
calculate link-interface-dependent bool properties or error, 2013-01-06)
to return early if no link information is available.  This avoids
crashing in a case that should fail with an error message.
2013-03-12 17:25:59 -04:00
Brad King 92a2ab70b6 Avoid crash when checking property link dependencies without link info
Teach the isLinkDependentProperty helper added by commit e9879910 (Make
INTERFACE determined properties readable in generator expressions,
2013-01-19) to return early if no link information is available.
2013-03-12 17:17:24 -04:00
Jean-Christophe Fillion-Robin 7f3bb8b392 Add $<SEMICOLON> generator expression.
This expression is useful to put a ';' in a command line argument
without dividing the argument during CMake list expansion.
2013-03-12 16:46:03 -04:00
Brad King 451ddcbf73 Merge topic 'ninja-mingw-lang'
2271ca3 Ninja: the Ninja generator does not support Fortran yet.
751f712 Ninja: use MinGW generator code in EnableLanguage()
2013-03-12 13:46:55 -04:00
Brad King 556ae30717 Merge topic 'install-export-usr-move'
0c727b9 install(EXPORT): Force absolute paths for usr-move
2013-03-12 13:46:51 -04:00
Brad King 32fb1f2371 Merge topic 'vs7-empty-groups'
545fdec VS: Avoid empty source groups in some cases (#3474)
2013-03-12 13:46:47 -04:00
Brad King 19922ac1d2 Merge topic 'cpack-nsis-no-release-version'
7947890 CPack: Fix NSIS version check without release version (#9721)
2013-03-12 13:46:43 -04:00
Brad King 950541618c Merge topic 'fix-transitive-target-names'
1bdd167 Restore support for target names with '+' (#13986)
254687d Only process transitive interface properties for valid target names.
2013-03-12 13:46:40 -04:00
Brad King d74d154704 Merge topic 'update-find_package-docs'
b73e05d Mention that IMPORTED targets may be created by a find_package call.
2013-03-12 13:46:31 -04:00
Stephen Kelly 1bdd167577 Restore support for target names with '+' (#13986)
Extend the range of valid target names with the + sign.  This character
can commonly be used for target names, such as those containing 'c++'.
Add a test but skip it for Borland and Watcom tools which do not support
the character.

Suggested-By: Benjamin Kloster
2013-03-12 13:39:11 -04:00
Brad King 1df49282a5 add_subdirectory: Compute output dir with consistent slashes (#10072)
When the command is invoked without an explicit build directory path we
compute it from the source directory path.  When either the source or
build tree is the root of a Windows drive letter it will have a trailing
slash.  Handle slashes consistently when substituting the current output
directory for the current source directory.

While at it, use cmSystemTools::IsSubDirectory instead of FindLastString
to verify that the source directory is a subdirectory.

Inspired-by: Graham Menhennitt <graham@menhennitt.com.au>
2013-03-12 11:52:52 -04:00
Petr Kmoch 3cf2f67adc Documentation: Clarify a few subtleties
* Clarify accepted values of <LANG> suffix in CMAKE_COMPILER_IS_GNU<LANG>.

* Clarify fact that target property GENERATOR_FILE_NAME usually cannot be
  used at configure time.

* Clarify that enable_language() can only be used in global scope of
  top-level project using language.

* State that enable_language(... OPTIONAL) currently doesn't work.

* Document regular expression operator precedence.
2013-03-12 09:29:55 -04:00
Kitware Robot 51fc4fb3c1 CMake Nightly Date Stamp 2013-03-12 00:01:18 -04:00
Kitware Robot 5990a5637e CMake Nightly Date Stamp 2013-03-11 00:01:12 -04:00
Peter Kümmel 2271ca3496 Ninja: the Ninja generator does not support Fortran yet. 2013-03-10 11:36:57 +01:00
Kitware Robot 2e0229ae0a CMake Nightly Date Stamp 2013-03-10 00:01:11 -05:00
Peter Kümmel 3b4436aa90 Ninja: escape line breaks in literals
BUG: 13591
2013-03-09 12:06:24 +01:00
Peter Kümmel 751f712e1a Ninja: use MinGW generator code in EnableLanguage() 2013-03-09 11:28:45 +01:00
Kitware Robot 2e80f10763 CMake Nightly Date Stamp 2013-03-09 00:01:10 -05:00
Brad King 0c727b906a install(EXPORT): Force absolute paths for usr-move
If the absolute install(EXPORT) destination for the CMAKE_INSTALL_PREFIX
used during configuration is under (/usr)?/lib(64)? then assume the
current build is for a system package installation instead of a
relocatable distribution.  Generate an absolute path for _IMPORT_PREFIX
in the target exports file instead of generating code to compute the
value relative to the file location.  This is necessary for
distributions implementing a move to /usr such as:

 https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib
 "All files in the /lib directory have been moved to /usr/lib and now
  /lib is a symlink to usr/lib."

The relative path computation is not reliable because the targets file
could be installed through cross-prefix a symlink and loaded without it
or vice versa.

A similar change was made for package configuration file generation by
commit d4774140 (configure_package_config_file: force absolute paths for
usr-move, 2013-01-24).
2013-03-08 09:55:18 -05:00
Anton Helwart 545fdec4f8 VS: Avoid empty source groups in some cases (#3474)
Teach the WriteGroup method return true if a group or any of its
children have source files.  Have children write their output to a
temporay cmOStringStream.  Add it to the real output only if not empty.
2013-03-08 08:27:12 -05:00
Gerald Hofmann 794789047d CPack: Fix NSIS version check without release version (#9721)
Only check a release version for the minimum required version.  If NSIS
returns a CVS build version string (as when built by Macports), skip the
version check altogether and assume a sufficiently new version.  Also
correctly handle the case where the version check fails and the
CPACK_TOPLEVEL_DIRECTORY option is not set.

Co-Author: Graham Menhennitt <graham@menhennitt.com.au>
2013-03-08 08:17:05 -05:00
Kitware Robot aa027af9af CMake Nightly Date Stamp 2013-03-08 00:01:09 -05:00
Kitware Robot 06a45e8169 CMake Nightly Date Stamp 2013-03-07 00:01:10 -05:00
Stephen Kelly b73e05d7c9 Mention that IMPORTED targets may be created by a find_package call. 2013-03-06 21:35:20 +01:00
Stephen Kelly 254687d31f Only process transitive interface properties for valid target names.
Commit a1c4905f (Use the link information as a source of compile
definitions and includes., 2013-02-12) introduced the use of link
information as the source of target properties via the TARGET_PROPERTY
generator expression. This generator expression has a strict
interpretation of a valid target name and emits a fatal error for
invalid names.

Ensure that only targets with names valid for use with TARGET_PROPERTY
or targets which are determined by generator expressions are processed
by it. This means that at worst, invalid target names do not participate
in the transitive evaluation of properties, but the validation
generator expression can be extended where needed to resolve that.
2013-03-06 17:42:08 +01:00
Kitware Robot efdf152fe1 CMake Nightly Date Stamp 2013-03-06 00:01:10 -05:00
Brad King 631b7b8e15 Merge topic 'vs10-stack-size'
308c5a2 VS 10: Fix CMAKE_<LANG>_STACK_SIZE implementation (#13968)
2013-03-05 14:10:55 -05:00
Kitware Robot 4871960ea0 CMake Nightly Date Stamp 2013-03-05 00:01:11 -05:00
Brad King e6b4641bfa Merge topic 'fix-genex-RPATH-handling'
dcb5907 Fix RPATH information when only a genex is used as a link library.
2013-03-04 15:40:20 -05:00
Brad King 91d86838a9 Merge topic 'fix-genex-split-duplication'
f93a388 Fix the cmGeneratorExpression::Split when leading chars are present.
2013-03-04 15:40:14 -05:00
Brad King 8106570606 Merge topic 'ctest_update-Git-HEAD'
78b81b7 CTest: Fix ctest_update with 'HEAD' file in source tree
2013-03-04 15:40:08 -05:00
Brad King f954bb3d99 Merge topic 'xcode-COMBINE_HIDPI_IMAGES'
10d7bf4 Xcode: Generate recommended artwork setting (#13954)
2013-03-04 15:39:57 -05:00
Brad King b4bb074d8b Merge topic 'remove-TARGET_DEFINED-genex'
cbf0756 Revert "Add the TARGET_DEFINED generator expression"
21a342c Remove use of TARGET_DEFINED from the target_link_libraries test.
47b8d32 Remove use of TARGET_DEFINED from the ExportImport test.
2e39d21 Remove use of TARGET_DEFINED from target_include_directories test.
2013-03-04 15:39:45 -05:00
Brad King 308c5a2670 VS 10: Fix CMAKE_<LANG>_STACK_SIZE implementation (#13968)
Use the /STACK: flag to pass the value through flag parsing so that the
generator converts it to the StackReserveSize project file option.  The
option was accidentally left out by commit 7491f529 (first pass at VS
10, 2009-06-25).

Suggested-by: goatboy160@yahoo.com
2013-03-04 08:18:28 -05:00
Kitware Robot 2ea18eb0c7 CMake Nightly Date Stamp 2013-03-04 00:01:04 -05:00
Kitware Robot 368bd3d346 CMake Nightly Date Stamp 2013-03-03 00:01:04 -05:00
Kitware Robot 0d85927210 CMake Nightly Date Stamp 2013-03-02 00:01:06 -05:00
Kitware Robot 567a7af311 CMake Nightly Date Stamp 2013-03-01 00:01:09 -05:00
Stephen Kelly dcb5907ed6 Fix RPATH information when only a genex is used as a link library.
As of commit 1da75022 (Don't include generator expressions in
old-style link handling., 2012-12-23), such entries are not
included in the LinkLibraries member. Generator expressions in
LinkLibraries are not processed anyway, so port to the new way
of getting link information.
2013-02-28 18:25:33 +01:00
Stephen Kelly f93a388c9c Fix the cmGeneratorExpression::Split when leading chars are present.
In the case of input like

 foo$<1:bar>

the preGenex should be 'foo'. In that case, the search for a ';'
will not find one, and there is no preceding input to process as a
non-genex list.

Previously, the result of 'splitting' such a string would instead
be a vector containing the same string two times.
2013-02-28 17:54:11 +01:00
Brad King 78b81b773c CTest: Fix ctest_update with 'HEAD' file in source tree
Add the '--' command-line separator to make the HEAD reference
unambiguous.  Extend the CTest.UpdateGIT test to cover this case.
2013-02-28 11:52:30 -05:00
Kitware Robot 42c56c824c CMake Nightly Date Stamp 2013-02-28 00:01:01 -05:00
Kitware Robot 2929768541 CMake Nightly Date Stamp 2013-02-27 00:01:12 -05:00
Brad King 10d7bf4e62 Xcode: Generate recommended artwork setting (#13954)
Add the COMBINE_HIDPI_IMAGES = YES setting to all Xcode project targets.
Otherwise Xcode may ask the user to "Update to recommended settings".
2013-02-26 12:54:01 -05:00
Kitware Robot 793bf3fdac CMake Nightly Date Stamp 2013-02-26 00:01:08 -05:00
Brad King b74c35f57e Merge topic 'memoize-link-iface-includes-defines'
42ebb18 Memoize includes and defines from interface libraries.
2013-02-25 13:12:16 -05:00
Brad King 57072c12d2 Merge topic 'interface-property-external-read'
8dfdf1c Fix the tests for evaluating includes and defines.
98a6725 Fix constness of accessors.
7e70744 Expand includes and defines transitively in 'external' genexes.
d1a2729 Fix DAG checker finding cycling dependencies.
e72eaad Workaround broken code where a target has itself in its link iface.
ec2c67b Strip stray semicolons when evaluating generator expressions.
2013-02-25 13:12:12 -05:00
Brad King 990c440ddd Merge topic 'ide-compiler-vars-Fortran'
9f94181 VS: Restore CMAKE_GENERATOR_FC variable
2013-02-25 13:12:09 -05:00
Brad King b887bca6ee Merge topic 'try_compile-targets'
236133e Handle targets in the LINK_LIBRARIES of try_compile.
1c0597c Add a new Export generator for IMPORTED targets.
f2ab17d Keep track of all targets seen while evaluating a genex.
2013-02-25 13:12:02 -05:00
Brad King 6e567cabea Merge topic 'fix-automoc-linker-language'
79568f9 automoc: Add source file to target early to set the linker language
2013-02-25 13:11:55 -05:00
Brad King e674af906a Merge topic 'ExportFileGenerator_GenerateNicerErrorCheckingCode'
11d0c66 export files: rewrite the code for checking required targets
2013-02-25 13:11:44 -05:00
Brad King 05529c7109 Merge topic 'cmLocalGenerator_RemoveVirtuals'
f497dbc cmLocalGenerator: remove "virtual" where not used
2013-02-25 13:11:34 -05:00
Stephen Kelly cbf07569ed Revert "Add the TARGET_DEFINED generator expression"
This reverts commit 2bee6f5ba5.

This expression is not used, and has a semantic which is not completely
optimal (namely considering utility targets to be targets, though
usually we are interested in linkable targets).

Remove it so that we have more freedom to define better expressions in
the future.

Conflicts:
        Source/cmGeneratorExpressionEvaluator.cxx
        Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
        Tests/CMakeCommands/target_compile_definitions/consumer.cpp
2013-02-25 15:35:11 +01:00
Kitware Robot e597ba2928 CMake Nightly Date Stamp 2013-02-25 00:01:07 -05:00
Stephen Kelly 42ebb1886f Memoize includes and defines from interface libraries.
This is similar in spirit to commit e48d8420 (Cache context-independent
includes on evaluation., 2013-02-03), but it is needed since commit
a1c4905f (Use the link information as a source of compile definitions
and includes., 2013-02-12), which changed how includes and defines
are determined. As they are now determined through the link interface,
we need to cache the result of evaluating them through that.

In the case of the includes, the result was already being cached
and then immediately disposed. Store the result as a member variable
instead to make use of the caching.
2013-02-24 22:04:20 +01:00
Kitware Robot 2de047669f CMake Nightly Date Stamp 2013-02-24 00:01:07 -05:00
Stephen Kelly 8dfdf1c734 Fix the tests for evaluating includes and defines.
We should also check whether the INTERFACE_ variant of a property
is being read, and in the case of the compile definitions, we should
test the _<CONFIG> suffixed variants. That is already available
through the use of the methods.

This way, we use the ALREADY_SEEN optimization when evaluating
the includes of a target in 'external' generator expressions, ie, those
used in a add_custom_command invokation, as opposed to evaluating the
INCLUDE_DIRECTORIES of a target itself via GetIncludeDirectories.
2013-02-23 09:42:24 +01:00
Stephen Kelly 98a672528d Fix constness of accessors. 2013-02-23 09:42:24 +01:00
Stephen Kelly 7e707444be Expand includes and defines transitively in 'external' genexes.
This means that we can use expressions of the form

 $<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>

to get a list of the interface include directories of foo, including
those coming from dependencies.

We can't have a test of a target which has a single include directory in
its INCLUDE_DIRECTORIES because the shell on the MSYS platforms transforms
a single include directory to include a prefix, which is not what the test
expects. We test a target with two directories instead as a means to
test a target with no link dependencies.
2013-02-23 09:42:24 +01:00
Stephen Kelly d1a2729b1a Fix DAG checker finding cycling dependencies.
Before this patch, the following is reported falsely as a self-reference:

 target_link_libraries(empty2 LINK_PUBLIC empty3)
 target_link_libraries(empty3 LINK_PUBLIC empty2)

 add_custom_target(...
    -DINCLUDES=$<TARGET_PROPERTY:empty2,INTERFACE_INCLUDE_DIRECTORIES>
 )

The reason is that the existing code assumed that all reading of
include directories would be done through cmTarget::GetIncludeDirectories()
and would therefore be initialized with a DagChecker. That is not the case
if reading the property with an 'external' generator expression.
2013-02-23 09:42:06 +01:00
Stephen Kelly e72eaadc42 Workaround broken code where a target has itself in its link iface.
There is a test for this since commit 8e756d2b (Tolerate cycles in
shared library link interfaces (#12647), 2012-01-12), so make sure
it continues to pass, even as we require no self-references in new
INTERFACE_ property generator expressions.
2013-02-23 09:41:22 +01:00
Kitware Robot 976cdf5488 CMake Nightly Date Stamp 2013-02-23 00:01:12 -05:00
Brad King 9f94181634 VS: Restore CMAKE_GENERATOR_FC variable
In commit bed6c388 (VS,Xcode: Remove unused CMAKE_GENERATOR_* variables,
2013-02-19) we removed this variable among others from the VS generator
claiming they were all not used.  In fact the Fortran compiler detection
module CMakeDetermineFortranCompiler.cmake uses CMAKE_GENERATOR_FC even
for the Visual Studio IDE generators because it does not use the full
IDE compiler id detection like the C and C++ language files do.
2013-02-22 16:12:48 -05:00
Stephen Kelly 236133e79e Handle targets in the LINK_LIBRARIES of try_compile.
Imported targets are re-exported so that they can be used by the
try_compile generated code with target_link_libraries.

This makes the use of the cmake_expand_imported_targets macro
obsolete. The macro is not able to expand the generator expressions
which may appear in the IMPORTED_LINK_INTERFACE_LIBRARIES content.
Instead it just sees them as 'not a target'.
2013-02-22 08:35:39 -05:00
Stephen Kelly 1c0597c25b Add a new Export generator for IMPORTED targets.
This is to be used during try_compile using LINK_LIBRARIES in the
srcfile signature and, in the future, TARGETS in the binary dir
signature.
2013-02-22 08:35:38 -05:00
Stephen Kelly f2ab17d4db Keep track of all targets seen while evaluating a genex.
As dependencies of the generator expression, these will re-exported
in try_compile generated code.
2013-02-22 08:35:29 -05:00
Stephen Kelly 79568f95ab automoc: Add source file to target early to set the linker language
Previously, GetIncludeDirectories was called before calling
target->AddSourceFile(mocCppSource). Since commit a1c4905f (Use the
link information as a source of compile definitions and
includes., 2013-02-12), the include directories are determined by
the link information.

Valid link information requires that the linker language can be
determined, which depends on the source files languages and the
dependent targets languages. In the case of the no_link_languages
target in the unit test, there are no dependencies and the additional
source file no_link_languages_automoc.cpp is added to the target
at generate-time. That file can be used to determine the linker
language, but it must be added to the target before calling
GetIncludeDirectories.
2013-02-22 08:29:33 -05:00
Kitware Robot 3bb57bab7b CMake Nightly Date Stamp 2013-02-22 00:01:09 -05:00
Kitware Robot f7474f3a01 CMake Nightly Date Stamp 2013-02-21 00:01:08 -05:00
Alex Neundorf 11d0c66206 export files: rewrite the code for checking required targets
Instead of generating a whole bunch of repeated if-statements
now a foreach()-loop is generated in the targets-file.
Also now a comment is inserted in the generated file if no
targets from other export sets are used, so if somebody looks
at the file he can see whether the information about missing
imported targets has been generated or not.

Alex
2013-02-20 20:09:45 +01:00
Alex Neundorf f497dbce93 cmLocalGenerator: remove "virtual" where not used
This patch makes several functions of cmLocalGenerator which are marked
as virtual non-virtual, since they are not reimplemented anywhere.

Alex
2013-02-20 19:48:39 +01:00
Brad King f7029572ca Merge topic 'xcode-target-depends'
b005140 Xcode: Each target dependency edge needs a unique object (#13935)
781ea6d Xcode: Drop check for circular target dependencies
2013-02-20 08:09:47 -05:00
Brad King fc7b4d5cf3 Merge topic 'compiler-change-cleanup'
e83e6a1 Test Unix Makefiles generator support for changing compilers
c307e1c Tests/RunCMake: Allow tests to control build tree behavior
2963c98 Merge branch 'empty-compiler-crash' into compiler-change-cleanup
1df09e5 Delete entire CMakeFiles directory when deleting CMakeCache.txt (#13756)
2013-02-20 08:09:40 -05:00
Brad King f1cd42f818 Merge topic 'ide-compiler-vars-cleanup'
bed6c38 VS,Xcode: Remove unused CMAKE_GENERATOR_* variables
2013-02-20 08:09:34 -05:00
Brad King 414658f057 Merge topic 'xcode-organize-sources'
f6a8983 Xcode: Sort source files
0816cae Xcode: Fix nested source group handling (#12943)
2013-02-20 08:09:17 -05:00
Kitware Robot 4515b09731 CMake Nightly Date Stamp 2013-02-20 00:01:08 -05:00
Brad King b005140451 Xcode: Each target dependency edge needs a unique object (#13935)
Generate a unique PBXTargetDependency and PBXContainerItemProxy for
every edge in the dependency graph as required by the Xcode format.
Xcode only accidentally loads project files that re-use the same
PBXTargetDependency for every edge leading to a single target.  If one
is removed by hand in the IDE then Xcode may crash due to dangling
references from the others.

Since cmGlobalXCodeGenerator::AddDependTarget is called exactly once for
every edge in the target dependency graph we do not need to keep track
of which edges have been visited to avoid generating duplicates.
2013-02-19 16:45:58 -05:00
Brad King 781ea6d1ca Xcode: Drop check for circular target dependencies
The modern cmComputeTargetDepends guarantees there will by no cycles.
Drop the Xcode generator's check which only handled length 1 and 2
cycles anyway.
2013-02-19 16:06:38 -05:00
Brad King 6535fcefeb Merge topic 'ninja-custom-command-implicit'
bbea30e Ninja: remove implicit dependency on custom command outputs
2013-02-19 14:58:56 -05:00
Brad King 71b217ecc9 Merge topic 'sublime-text-2-generator'
f616ff2 Update generator to use new cmGeneratorTarget api.
674bd6e Merge branch 'master' into sublime-text-2-generator
4760ead Remove ability to generate sublime clang files.
da0898e Correct missing parameter to CMP0018Flags call.
badb40d Merge branch 'master' into sublime-text-2-generator
b3ae61f Merge branch 'master' into sublime-text-2-generator
089d9cc SublimeText 2 Gen: Set the sublimeclang_options_script property.
44c2eee Merge branch 'master' into sublime-text-2-generator
304b885 Sublime Text 2 Gen: Per-source Compile flags are now saved in a separate file.
5b2aa3d SublimeText2 Gen: Fixed the issue where include directory flags used -D
90bcb77 SublimeText2 Gen: Improved use of define, include flags from CMAKE_C(XX)_FLAGS
cc84072 Merge branch 'master' into sublime-text-2-generator
8670cbe Define flags in CMAKE_C(XX)_FLAGS are now included in SublimeClang settings.
d022d4e Merge branch 'master' into sublime-text-2-generator
9cd3e70 Fixed Sublime Text project generation for in-source builds
44f35f7 Added a CMAKE_SUBLIMECLANG_DISABLED variable that disables SublimeClang.
...
2013-02-19 14:58:42 -05:00
Robert Maynard f616ff2c25 Update generator to use new cmGeneratorTarget api. 2013-02-19 14:45:18 -05:00
Robert Maynard 674bd6e778 Merge branch 'master' into sublime-text-2-generator 2013-02-19 14:44:57 -05:00
Robert Maynard 4760eade42 Remove ability to generate sublime clang files.
SublimeClang is a optional plugin to SublimeText and I felt it
shouldn't be part of the generator for the following reasons:

1. Reduces the amount of sublime and sublimeClang specific
   code we have to maintain inside CMake.
2. In testing the SublimeClang commands generated did not work
   for the VTK project.

For people that do want this feature I recommend that they
looking into https://gist.github.com/robertmaynard/4724705 for a
way to use CMAKE_EXPORT_COMPILE_COMMANDS to generate JSON files
that can be used by SublimeClang.
2013-02-19 14:43:20 -05:00
Robert Maynard da0898e0a2 Correct missing parameter to CMP0018Flags call. 2013-02-19 14:42:43 -05:00
Robert Maynard badb40d0f8 Merge branch 'master' into sublime-text-2-generator
Resolve conflict in Source/cmDocumentVariables.cxx by adding both
variables.
2013-02-19 14:42:00 -05:00
Brad King bed6c38896 VS,Xcode: Remove unused CMAKE_GENERATOR_* variables
Since the topic merged to master by commit 34a02846 (Merge topic
'ide-compiler-id', 2012-08-24), these variables are not used by
CMakeDetermine*Compiler.cmake for VS and Xcode generators.  Drop the
code that sets them.
2013-02-19 09:29:11 -05:00
Kitware Robot dea92c2f39 CMake Nightly Date Stamp 2013-02-19 00:01:10 -05:00
Brad King 2963c9828c Merge branch 'empty-compiler-crash' into compiler-change-cleanup 2013-02-18 10:07:03 -05:00
Brad King 1df09e5773 Delete entire CMakeFiles directory when deleting CMakeCache.txt (#13756)
Since commit e015df7d (...delete CMakeFiles directory when cache is
deleted, 2006-02-20) we deleted the files in the CMakeFiles directory
when deleting CMakeCache.txt in order to reset the build tree to a fresh
state.  This allowed commit fd33bf93 (fix for bug 6102, allow users to
change the compiler, 2007-12-13) to delete CMakeCache.txt when the user
changes the compiler and CMakeFiles/CMake<lang>Compiler.cmake and other
platform information files would go with it to allow a fresh start.

Then commit 7195aca5 (Make platform information files specific to the
CMake version, 2012-08-24) moved the platform information files to a
subdirectory e.g. CMakeFiles/<version>/CMake<lang>Compiler.cmake where
<version> is the current CMake version.  This causes the compiler change
logic to fail to remove all old compiler information.  Then on the next
configuration CMake<lang>Compiler.cmake would set CMAKE_<lang>_COMPILER
back to the old value and re-trigger the compiler change logic.  This
causes an infinite loop of cache deletion and compiler reset.

Fix this simply by teaching cmCacheManager::DeleteCache to remove the
entire CMakeFiles directory recursively whenever it removes an existing
CMakeCache.txt.  This fully resets the build tree to configure with a
fresh compiler.
2013-02-18 09:58:34 -05:00
Alexander Chehovsky f6a8983db4 Xcode: Sort source files
Since Xcode doesn't sort the files on its own, let's sort them in our
generator to make navigation easier.  Visual Studio, QtCreator, and
kdevelop all display files sorted.
2013-02-18 08:47:14 -05:00
Alexander Chehovsky 0816caecac Xcode: Fix nested source group handling (#12943)
Teach the code path for nested sources build the group map key in the
same way as non-nested code path does.
2013-02-18 08:47:10 -05:00
Stephen Kelly ec2c67bcf3 Strip stray semicolons when evaluating generator expressions. 2013-02-18 12:07:32 +01:00
Kitware Robot a0ac2c59fe CMake Nightly Date Stamp 2013-02-18 00:01:04 -05:00
Kitware Robot 0ad58af444 CMake Nightly Date Stamp 2013-02-17 00:01:06 -05:00
Peter Kümmel bbea30eec8 Ninja: remove implicit dependency on custom command outputs
Revert aa2e1e9cae
With this commit all files are rebuild when only one moc file has changed.

BUG 0013874
2013-02-16 13:45:28 +01:00
Kitware Robot 77eccc20ee CMake Nightly Date Stamp 2013-02-16 00:01:10 -05:00
Brad King 5698d9b865 Merge topic 'vs-atomic-generated-stamp'
2dc17f8 VS: Replace generation timestamp file atomically
2013-02-15 13:13:14 -05:00
Brad King e85f1c28d4 Merge topic 'rpath-use-implicit-link-dirs'
95a9c80 Merge topic 'LINK_LIBRARIES-property' into rpath-use-implicit-link-dirs
baa33ac AIX-GNU: Put implicit link directories in runtime libpath (#13909)
171b099 Avoid duplicate RPATH entries
2013-02-15 13:12:31 -05:00
Brad King bc6b0326b3 Merge topic 'windows-ce-vs-subsystem'
cf82d1e VS: Specify WinCE subsystems correctly in VS 9 2008
8f4cae7 VS: Specify WinCE subsystem also for DLLs
2013-02-15 13:12:08 -05:00
Brad King c1dc807494 Merge topic 'file-REMOVE_RECURSE-symlink'
f123367 file: Do not remove symlinked directories recursively (#10538)
2013-02-15 13:11:27 -05:00
Brad King 0e2ed9b097 Merge topic 'linked-usage-cleanup'
fde949d Don't add target-specific interface includes and defines to Qt 4 targets.
79ae968 Revert "Add a way to exclude INTERFACE properties from exported targets."
71bf96e Revert "find_package: Reword <package>_NO_INTERFACES documentation"
3df36b5 Revert "Add the $<LINKED:...> generator expression."
e1f9080 Don't populate INTERFACE includes and defines properties in tll.
567c8d1 Revert "Don't allow utility or global targets in the LINKED expression."
a1c4905 Use the link information as a source of compile definitions and includes.
5c9f5e3 Don't use LINKED where not needed.
5b88504 Rename the IncludeDirectoriesEntry to be more generic.
b030323 Fix determination of when we're evaluating compile definitions.
2013-02-15 13:11:04 -05:00
Kitware Robot 57833095ff CMake Nightly Date Stamp 2013-02-15 00:01:22 -05:00
Brad King 95a9c80cac Merge topic 'LINK_LIBRARIES-property' into rpath-use-implicit-link-dirs
Resolve a logical conflict in the signature of cmTarget::GetLinkClosure.
2013-02-14 10:18:31 -05:00
Brad King baa33acbda AIX-GNU: Put implicit link directories in runtime libpath (#13909)
The GNU compiler front-ends on AIX invoke the linker with flags of the
form "-L/path/to/gnu/runtime/lib" to tell ld where to find the language
runtime libraries.  They depend on the default libpath behavior
documented in "man ld" to add the -L paths also to the runtime libpath
so the dynamic loader can find the language runtime libraries.  This
differs from platforms whose linkers have distinct -rpath flags that
non-system compilers can use to tell the dynamic loader where to find
their language runtime libraries.

Since commit 96fd5909 (Implement linking with paths to library files,
2008-01-22) CMake always passes "-Wl,-blibpath:" followed by any
project-defined RPATH plus "/usr/lib:/lib" in order to explicitly set
the runtime libpath and avoid getting all the project -L paths in the
runtime libpath.  The explicit libpath prevents the GNU compiler runtime
library -L paths from being placed in the libpath and then the dynamic
loader fails to find the language runtime libraries.

CMake already detects the implicit link directories for each language
since commit 07ea19ad (Implicit link info for C, CXX, and Fortran,
2009-07-23).  Add the implicit link directories to the explicit runtime
libpath for GNU compilers on AIX to fix this use case.
2013-02-14 10:16:36 -05:00
Brad King 171b0993d9 Avoid duplicate RPATH entries
Teach cmComputeLinkInformation::GetRPath to avoid adding the same
directory to the output runtime path more than once.
2013-02-14 10:14:56 -05:00
Kitware Robot 63233635d2 CMake Nightly Date Stamp 2013-02-14 00:01:17 -05:00
Mark Salisbury cf82d1e166 VS: Specify WinCE subsystems correctly in VS 9 2008 2013-02-13 13:37:49 -05:00
Mark Salisbury 8f4cae7aa6 VS: Specify WinCE subsystem also for DLLs
This fixes a link error in VS 2005: unresolved external symbol
__DllMainCRTStartup@12.
2013-02-13 13:37:18 -05:00
Brad King f123367254 file: Do not remove symlinked directories recursively (#10538)
If a symlink points at a directory the symlink should be removed but not
the content of the directory.
2013-02-13 10:00:50 -05:00
Stephen Kelly 79ae968a18 Revert "Add a way to exclude INTERFACE properties from exported targets."
This reverts commit 2c3654c3de.

The removal of some tests added in commit 77cecb77 (Add includes and compile
definitions with target_link_libraries., 2012-11-05) are also squashed
into this commit.
2013-02-13 15:12:31 +01:00
Stephen Kelly 71bf96ec78 Revert "find_package: Reword <package>_NO_INTERFACES documentation"
This reverts commit 179f495602.
2013-02-13 15:12:31 +01:00
Stephen Kelly 3df36b5954 Revert "Add the $<LINKED:...> generator expression."
This reverts commit 0b92602b81.

Conflicts:
	Source/cmGeneratorExpressionEvaluator.cxx
	Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
	Tests/CMakeCommands/target_include_directories/CMakeLists.txt
2013-02-13 15:12:31 +01:00
Stephen Kelly e1f908015f Don't populate INTERFACE includes and defines properties in tll.
This is a partial revert of commit 77cecb77 (Add includes and compile
definitions with target_link_libraries., 2012-11-05).

As the interface includes and defines are now determined by the link
closure, there is no need to populate the corresponding properties
explicitly.
2013-02-13 15:12:31 +01:00
Stephen Kelly 567c8d103e Revert "Don't allow utility or global targets in the LINKED expression."
This reverts commit 9712362b45.
2013-02-13 15:12:31 +01:00
Stephen Kelly a1c4905f72 Use the link information as a source of compile definitions and includes.
After evaluating the INTERFACE_INCLUDE_DIRECTORIES, of a target in a
generator expression, also read the INTERFACE_INCLUDE_DIRECTORIES of
its link interface dependencies.

That means that code such as this will result in the 'user' target
using /bar/include and /foo/include:

 add_library(foo ...)
 target_include_directories(foo INTERFACE /foo/include)
 add_library(bar ...)
 target_include_directories(bar INTERFACE /bar/include)
 target_link_libraries(bar LINK_PUBLIC foo)

 add_executable(user ...)
 target_include_directories(user PRIVATE
    $<TARGET_PROPERTY:bar,INTERFACE_INCLUDE_DIRECTORIES>)

Also process the interface include directories from direct link
dependencies for in-build targets.

The situation is similar for the INTERFACE_COMPILE_DEFINITIONS. The
include directories related code is currently more complex because
we also need to store a backtrace at configure-time for the purpose
of debugging includes. The compile definitions related code will use
the same pattern in the future.

This is not a change in behavior, as existing code has the same effect,
but that existing code will be removed in follow-up commits.
2013-02-13 15:12:30 +01:00
Kitware Robot 1324500669 CMake Nightly Date Stamp 2013-02-13 00:01:25 -05:00
Brad King c6c9838c63 Merge topic 'UseMakefileHeaderExtensions'
27e14a8 automoc: use the header extensions from cmMakefile
10511aa automoc: use a std::vector<> instead a std::list
2013-02-12 14:42:12 -05:00
Brad King 3f1a0ad7ac Merge topic 'empty-compiler-crash'
ccfeefa Fix crash on empty CMAKE_<lang>_COMPILER value (#13901)
2013-02-12 14:42:00 -05:00
Brad King 2dc17f88dd VS: Replace generation timestamp file atomically
Since commit 34c882a9 (Allow VS 7 project Rebuild and Solution Rebuild to
work, 2007-11-10) we use a "CMakeFiles/generated.stamp" and some
associated files in the build tree to avoid re-running CMake when the
inputs have not changed but VS has cleaned the outputs it knows about.

When we do not really need to re-run we restore the generated.stamp file.
The non-re-run case can happen in multiple targets in parallel in VS >= 10
so we must restore the file atomically to avoid races.  Write the stamp
file to a random temporary name and then atomically rename it to the real
stamp file.
2013-02-12 13:55:53 -05:00
Stephen Kelly 5b88504f65 Rename the IncludeDirectoriesEntry to be more generic. 2013-02-12 10:39:35 +01:00
Stephen Kelly b030323c13 Fix determination of when we're evaluating compile definitions.
Also handle the config-specific property.
2013-02-12 10:39:34 +01:00
Kitware Robot da6109df0f CMake Nightly Date Stamp 2013-02-12 00:01:21 -05:00
Brad King 813b519280 Merge topic 'minor-fixes'
ba48e63 Generate config-specific interface link libraries propeties.
deb51a7 Remove unused forward declarations.
9712362 Don't allow utility or global targets in the LINKED expression.
faa927e Make sure INTERFACE properties work with OBJECT libraries.
510fdcb Whitelist target types in target_{include_directories,compile_definitions}
4de7178 Ensure that the build interface includes have been added.
df74bc3 Only append build interface include dirs to particular targets.
d4e5c67 Don't keep track of content determined by target property values.
1fb545a Move a special case for PIC from the genex to the cmTarget code.
57175d5 Only use early evaluation termination for transitive properties.
4cf161a Fix determination of evaluating link libraries.
3a298c0 Fix generation of COMPILE_DEFINITIONS in DependInfo.cmake.
655e98b Ensure type specific compatible interface properties do not intersect.
46e2896 The COMPATIBLE_INTERFACE does not affect the target it is set on.
5f926a5 Test printing origin of include dirs from tll().
7c0ec75 De-duplicate validation of genex target names.
...
2013-02-11 13:59:48 -05:00
Kitware Robot f65616b648 CMake Nightly Date Stamp 2013-02-11 00:01:27 -05:00
Alex Neundorf 27e14a813c automoc: use the header extensions from cmMakefile
Instead of having an own set of C header extensions, use
cmMakefile::GetHeaderExtensions() (#13904)

Alex
2013-02-10 18:10:20 +01:00
Alex Neundorf 10511aa084 automoc: use a std::vector<> instead a std::list
Alex
2013-02-10 17:49:42 +01:00
Kitware Robot 12806779be CMake Nightly Date Stamp 2013-02-10 00:01:20 -05:00
Stephen Kelly deb51a7113 Remove unused forward declarations. 2013-02-09 10:25:05 +01:00
Kitware Robot 4db712f6ef CMake Nightly Date Stamp 2013-02-09 00:01:19 -05:00
Brad King ccfeefae35 Fix crash on empty CMAKE_<lang>_COMPILER value (#13901)
Since commit fd33bf93 (fix for bug 6102, allow users to change the
compiler, 2007-12-13) we keep an internal ;-list of language compiler
variable and value pairs.  Preserve empty values on expansion to ensure
that the key/value pairing remains consistent.
2013-02-08 16:33:52 -05:00
Stephen Kelly 9712362b45 Don't allow utility or global targets in the LINKED expression.
The LINKED expression is exclusively for handling INTERFACE content
and it does not make sense for utility targets to have INTERFACE
content.
2013-02-08 21:44:11 +01:00
Stephen Kelly faa927e273 Make sure INTERFACE properties work with OBJECT libraries. 2013-02-08 20:10:22 +01:00
Brad King 7df05c8198 Merge topic 'style-fixes'
2ce7231 Style: Use this-> when invoking member functions.
2013-02-08 13:41:54 -05:00
Brad King 7dab997771 Merge topic 'generator-toolset'
56ca8d4 Tests: Add generator toolset support
f36c665 Tests: Consolidate ctest --build-and-test generator options
c0debb1 Merge branch 'master' into generator-toolset
daae0d2 ExternalProject: Propagate the generator toolset
e3841cf CTest: Add options to set generator toolset
f980a80 Xcode: Implement generator toolset selection (#9831, #13802)
650c647 VS: Implement generator toolset selection (#10722, #13774)
4fd5342 CMake: Add -T option to choose a generator toolset
118c32f Merge branch 'xcode-duplicate-flags-13354' into generator-toolset
cf8645e Tests: Run ctest custom commands with VERBATIM
5b2fba5 ExternalProject: Simplify CMake command line generation
2013-02-08 13:38:56 -05:00
Brad King f4d1474013 Merge topic 'exit-without-working-directory'
a943b5c Fail early if no current working directory exists
2013-02-08 13:38:43 -05:00
Brad King e8df4cab82 Merge topic 'update-kwsys'
7df291f Merge branch 'upstream-kwsys' into update-kwsys
9d66f74 KWSys 2013-02-05 (5c34ed2e)
2013-02-08 13:38:23 -05:00
Stephen Kelly 510fdcb188 Whitelist target types in target_{include_directories,compile_definitions}
Setting include directories or compile definitions on a target created
with add_custom_target does not make sense.
2013-02-08 19:21:30 +01:00
Stephen Kelly 4de71786e8 Ensure that the build interface includes have been added.
This is needed in the case that Automoc is used, as that calls
GetIncludeDirectories, which may cache the resulting include dirs
too early in the generate step.

Also, because the automoc step is so early, we can't cache the
include directories at that point. At that point the build interface
of all dependencies are not populated yet, so we'd be caching the
includes before appending the build interface. Only start caching
when we're definitely generating the buildsystem. At that point, the
includes should be stable.

We still need to invoke AppendBuildInterfaceIncludes
in the GlobalGenerator because the build interface includes affect
mostly the dependencies of targets (such as the automoc targets),
rather than the targets themselves, so the build interface needs
to be appended for all targets before generation is done.
2013-02-08 12:54:27 +01:00
Kitware Robot bc96f95a16 CMake Nightly Date Stamp 2013-02-08 00:01:15 -05:00
Stephen Kelly df74bc34d4 Only append build interface include dirs to particular targets.
We shouldn't set the property on all custom targets.
2013-02-07 21:57:35 +01:00
Brad King c0debb1f89 Merge branch 'master' into generator-toolset
We need the latest Tests/CMakeLists.txt so we can refactor all tests.
2013-02-07 11:09:01 -05:00
Brad King e3841cf4a2 CTest: Add options to set generator toolset
The ctest_configure command already reads the CTEST_CMAKE_GENERATOR
variable to get the value for the cmake -G option.  Read new variable
CTEST_CMAKE_GENERATOR_TOOLSET for -T.

The "ctest --build-and-test" mode already has "--build-generator" to
specify the -G option to CMake.  Add a "--build-generator-toolset" option
to specify the -T value.
2013-02-07 11:08:32 -05:00
Brad King f980a80495 Xcode: Implement generator toolset selection (#9831, #13802)
Implement generator toolset selection (cmake -T) for Xcode > 2.0 by
adding the GCC_VERSION build setting to project files.
2013-02-07 11:07:48 -05:00
Brad King 650c647160 VS: Implement generator toolset selection (#10722, #13774)
Implement generator toolset selection (cmake -T) for VS >= 10 by setting
the PlatformToolset.  Extend the RunCMake.GeneratorToolset test case to
verify CMAKE_GENERATOR_TOOLSET when the generator supports -T.

Since commit 485a940e (VS: Simplify MSVC version reporting, 2012-08-23)
all MSVC version information is detected during the compiler id step
from the actual compiler invoked by generated build systems rather than
hard-coded in VS generators.  Therefore we can set the PlatformToolset
in VS >= 10 project files and support toolsets from other VS versions.
2013-02-07 11:06:28 -05:00
Brad King 4fd5342956 CMake: Add -T option to choose a generator toolset
Reject the option by default.  It will be implemented on a per-generator
basis.  Pass the setting into try_compile project generation.  Add cache
entry CMAKE_GENERATOR_TOOLSET and associated variable documentation to
hold the value persistently.

Add a RunCMake.GeneratorToolset test to cover basic "-T" option cases.
Verify that CMAKE_GENERATOR_TOOLSET is empty without -T, that -T is
rejected when the generator doesn't support it, and that two -T options
are always rejected.
2013-02-07 10:53:19 -05:00
Stephen Kelly d4e5c6787c Don't keep track of content determined by target property values.
This tracking was added during the development of commit 042ecf04
(Add API to calculate link-interface-dependent bool properties
or error., 2013-01-06), but was never used.

It was not necessary to use the content because what is really
useful in that logic is to determine if a property has been implied
to be null by appearing in a LINK_LIBRARIES genex.

I think the motivating usecase for developing the feature of
keeping track of the targets relevant to a property was that I
thought it would  make it possible to allow requiring granular
compatibility of interface properties only for targets which
depended on the interface property. Eg:

 add_library(foo ...)
 add_library(bar ...)

 add_executable(user ...)
 # Read the INTERFACE_POSITION_INDEPENDENT_CODE from bar, but not
 # from foo:
 target_link_libraries(user foo $<$<TARGET_PROPERTY:POSTITION_INDEPENDENT_CODE>:bar>)

This obviously doesn't make sense. We require that INTERFACE
properties are consistent across all linked targets instead.
2013-02-07 16:21:09 +01:00
Stephen Kelly 1fb545ad3a Move a special case for PIC from the genex to the cmTarget code. 2013-02-07 16:21:09 +01:00
Stephen Kelly 57175d559e Only use early evaluation termination for transitive properties.
We need to make sure expressions which evaluate TARGET_PROPERTY:TYPE
multiple times for example get the correct result each time, and
not an empty string instead.
2013-02-07 16:21:09 +01:00
Stephen Kelly 4cf161a5e7 Fix determination of evaluating link libraries.
Added in commit 6fbe3ce4 (Exclude the LINK_LIBRARIES related properties
from INTERFACE evaluation., 2013-01-23)
2013-02-07 16:21:09 +01:00
Stephen Kelly 3a298c0bf4 Fix generation of COMPILE_DEFINITIONS in DependInfo.cmake.
As INTERFACE_COMPILE_DEFINITIONS are now possible, we can have
situations like this:

 add_library(foo ...)
 add_library(bar ...)
 target_link_libraries(foo bar)

 target_compile_definitions(bar INTERFACE SOME_DEF)

The INTERFACE_COMPILE_DEFINITIONS of bar determine how foo should be
compiled, and if they change, foo should be rebuilt.

Additionally, as of commit d1446ca7 (Append the COMPILE_DEFINITIONS
from the Makefile to all targets., 2012-09-17), we don't need to
read definitions from the makefile if we read them from the target,
so also de-duplicate the cached info.

The DependInfo for INTERFACE_INCLUDE_DIRECTORIES is already handled
correctly.
2013-02-07 16:21:09 +01:00
Stephen Kelly 655e98bf71 Ensure type specific compatible interface properties do not intersect.
Before, the boolean version would always win, and the string one would
be ignored.
2013-02-07 16:21:09 +01:00
Stephen Kelly 46e28960a5 The COMPATIBLE_INTERFACE does not affect the target it is set on.
Test and document this.
2013-02-07 16:21:09 +01:00
Stephen Kelly 7c0ec75cfa De-duplicate validation of genex target names. 2013-02-07 16:21:08 +01:00
Stephen Kelly 92e98dd909 Deduplicate the isGeneratorExpression method.
This API seems like the most appropriate.
2013-02-07 16:21:08 +01:00
Brad King a943b5c4f3 Fail early if no current working directory exists
Remove the old "nocwd" behavior that attempts to provide the "--help"
output when no working directory is available.  The long help output
scrolls the real error message out of typical terminal sizes.  Also
execute as little code as possible when no working directory exists.
2013-02-07 08:53:50 -05:00
Brad King 7df291fb6e Merge branch 'upstream-kwsys' into update-kwsys 2013-02-07 08:34:56 -05:00
Stephen Kelly 1714c27a74 Process generator expressions for 'system' include directories.
Since commit 08cb4fa4 (Process generator expressions in the
INCLUDE_DIRECTORIES property., 2012-09-18), it is possible to use
generator expressions with the include_directories command.

As that command can also have a SYSTEM argument, ensure that the
result of using that argument with generator expressions gives a
sane result.
2013-02-07 10:03:30 +01:00
Kitware Robot bc75f4c4c6 CMake Nightly Date Stamp 2013-02-07 00:01:14 -05:00
Stephen Kelly 2ce7231f56 Style: Use this-> when invoking member functions. 2013-02-07 00:10:04 +01:00
Kitware Robot 47eacab06d CMake Nightly Date Stamp 2013-02-06 00:01:19 -05:00
Brad King ec85306025 Merge topic 'tll-includes-defines'
e48d842 Cache context-independent includes on evaluation.
089fe1c Optimize genex evaluation for includes and defines.
179f495 find_package: Reword <package>_NO_INTERFACES documentation
e7b579b Test workaround of bad interface include directories from depends.
77cecb7 Add includes and compile definitions with target_link_libraries.
0b92602 Add the $<LINKED:...> generator expression.
0fa7f69 Add API to check if we're reading a includes or defines property.
2c3654c Add a way to exclude INTERFACE properties from exported targets.
d4297d5 Export targets to a targets file, not a Config file.
df4d2b2 Make it an error for INSTALL_PREFIX to be evaluated.
7ceeba9 Advance more when preprocessing exported strings.
30268b4 Handle reading empty properties defined by the link interface.
2013-02-05 14:46:43 -05:00
Brad King 252c5211b5 Merge topic 'ninja-link-rsp-newlines'
a55d5ca Ninja: Avoid LNK1170 linker error
2013-02-05 14:46:36 -05:00
Brad King e6b72e8b87 Merge topic 'vs6-rule-files'
0f24a66 VS 6: Create .rule file directory before file
2013-02-05 14:46:32 -05:00
Brad King 9ff34ff2fd Merge topic 'fix-atomic-rename-on-Windows'
59b568e Fix cmSystemTools::RenameFile race on Windows
2013-02-05 14:46:27 -05:00
Brad King d1660f0895 Merge topic 'fix-include-directories-unix-path'
b6f6654 Use the result of converting to a unix path.
2013-02-05 14:46:23 -05:00
Brad King 50de1247a0 Merge topic 'update-kwsys'
588d705 Merge branch 'upstream-kwsys' into update-kwsys
23ae484 KWSys 2013-01-31 (5b0d1bd9)
2013-02-05 14:46:13 -05:00
Brad King 4341fd2579 Merge topic 'new-command-class-type-macros'
9397270 Fix use of cmTypeMacro in new command classes
2013-02-05 14:45:57 -05:00
Stephen Kelly b6f6654267 Use the result of converting to a unix path.
The commit 18a3195a ('Keep track of INCLUDE_DIRECTORIES as a vector
of structs.', 2012-11-19) moved the handling of includes from
cmGeneratorTarget to cmTarget, but in the process introduced this
bug.
2013-02-05 09:19:27 +01:00
Kitware Robot f77a1147f5 CMake Nightly Date Stamp 2013-02-05 00:01:16 -05:00
Patrick Gansterer a55d5ca481 Ninja: Avoid LNK1170 linker error
link.exe has problems with very very long lines in rsp files too.
Use $in_newline instead of $in variable for rspcontent which
separates the arguments with a newline instead of a simple space
and was specially made for this purpose.
2013-02-04 16:26:39 -05:00
Brad King 59b568e5e8 Fix cmSystemTools::RenameFile race on Windows
Since commit d46d8df0 (Re-implemented cmGeneratedFileStream to look like a
real stream and replace the destination file atomically, 2004-11-03) our
RenameFile implementation tries to deal with MoveFile not replacing
read-only files.  In order to avoid the Get/SetFileAttributes pair we used
stat to test for existence of the destination file.  This has a race in
which the destination could be created between the test for existence and
the MoveFile call.

Remove the stat call and use GetFileAttributes to detect whether the file
exists.  This shortens the race but does not eliminate it.  Use a loop to
try multiple times in case we lose the race.  While at it, drop Win9x
support and always use MoveFileEx.
2013-02-04 15:15:21 -05:00
Kitware Robot 8669f64d54 CMake Nightly Date Stamp 2013-02-04 00:01:18 -05:00
Stephen Kelly e48d84209c Cache context-independent includes on evaluation.
Generator expressions whose output depends on the configuration
now record that fact. The GetIncludeDirectories method can use
that result to cache the include directories for later calls.

GetIncludeDirectories is called multiple times for a target
for each configuration, so this should restore performance for
multi-config generators.
2013-02-03 23:04:03 +01:00
Brad King 0f24a66715 VS 6: Create .rule file directory before file
The VS 6 IDE wants .rule files to exist in order to run the rule attached
to it.  When creating the dummy .rule file make sure the directory exists.
2013-02-03 12:03:14 -05:00
Kitware Robot a25f26f54f CMake Nightly Date Stamp 2013-02-03 00:01:21 -05:00
Stephen Kelly 089fe1c13d Optimize genex evaluation for includes and defines.
While porting boost to use these features, the generation step took
too long (several minutes before I stopped it). The reason was that
the boost libraries form a large interdependent mesh. The libraries
list their dependencies in their INTERFACE such as:

 $<LINKED:boost::core>;$<LINKED:boost::config>;$<LINKED:boost::mpl>

As boost::core already depends on the boost::config libraries, that
expression has no impact on the end-content, as it is removed after
the generation step. There is no DAG issue though, so the generator
expression evaluation would fully evaluate them. In the case of the
config library, it also depends on the core library, so all depends
are followed through that again, despite the fact that they've just
been evaluated. After this patch, the evaluation skips libraries if
they have already been seen via depends or directly in the content.

This patch keeps track of targets whose INTERFACE has been consumed
already. The INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS properties
are whitelisted because repeated content will be stripped out later
during generation. For other properties now and in the future, that
may not be the case.
2013-02-02 15:06:53 +01:00
Kitware Robot 425c56788d CMake Nightly Date Stamp 2013-02-02 00:01:22 -05:00
Brad King 179f495602 find_package: Reword <package>_NO_INTERFACES documentation 2013-02-01 10:30:57 -05:00
Brad King 588d705cb1 Merge branch 'upstream-kwsys' into update-kwsys 2013-02-01 09:28:50 -05:00
Kitware Robot 1638124680 CMake Nightly Date Stamp 2013-02-01 00:01:16 -05:00
Stephen Kelly 77cecb778f Add includes and compile definitions with target_link_libraries.
This establishes that linking is used to propagate usage-requirements
between targets in CMake code. The use of the target_link_libraries
command as the API for this is chosen because introducing a new command
would introduce confusion due to multiple commands which differ only in
a subtle way.
2013-01-31 17:34:20 +01:00
Stephen Kelly 0b92602b81 Add the $<LINKED:...> generator expression.
This is both a short form of using a TARGET_DEFINED expression
together with a TARGET_PROPERTY definition, and a way to strip
non-target content from interface properties when exporting.
2013-01-31 17:34:20 +01:00
Stephen Kelly 0fa7f69c0e Add API to check if we're reading a includes or defines property.
This will allow the implementation of the LINKED generator expression.
2013-01-31 17:30:49 +01:00
Stephen Kelly 2c3654c3de Add a way to exclude INTERFACE properties from exported targets.
Projects set interface requirements upstream, and existing
downstreams use of target_link_libraries will consume those interfaces.

This can create a backward compatibility concern as the result may
be changing the order of include directories of downstreams, or another
side-effect of using the INTERFACE properties.

Provide a way for them to emulate the behavior of a version-based
policy in the config file.
2013-01-31 17:29:04 +01:00
Stephen Kelly df4d2b28b2 Make it an error for INSTALL_PREFIX to be evaluated.
An empty string is not likely going to produce expected results
in any evaluation context. It is replaced by preprocessing
currently.
2013-01-31 17:27:06 +01:00
Brad King 9397270d73 Fix use of cmTypeMacro in new command classes
Both commit 8a37ebec (Add the target_include_directories command,
2013-01-01) and commit fc61a7a7 (Add the target_compile_definitions
command, 2013-01-08) added command implementations deriving from the new
cmTargetPropCommandBase class.  Fix cmTypeMacro declarations of the
inheritance relationship.
2013-01-31 11:08:40 -05:00
Stephen Kelly 7ceeba992b Advance more when preprocessing exported strings.
When evaluating TARGET_PROPERTY here, we can skip to the comma
location. We need to calculate it though as the string may have
just been changed.
2013-01-31 11:18:52 +01:00
Stephen Kelly 30268b46f8 Handle reading empty properties defined by the link interface.
This was segfaulting before.
2013-01-31 11:18:49 +01:00
Kitware Robot fc2638f0b4 CMake Nightly Date Stamp 2013-01-31 00:01:16 -05:00
Brad King da2b0245a3 Merge topic 'fix-target-property-commands'
7bf490e Make subclasses responsible for joining content.
f6b16d4 Don't allow targets args in the new target commands.
b3a7e19 Make the Property name protected so that subclasses can use it.
2013-01-30 09:38:52 -05:00
Kitware Robot 7462a8a8c3 CMake Nightly Date Stamp 2013-01-30 00:01:21 -05:00
Brad King 2eb7cee117 Merge topic 'fix-TARGET_PROPERTY-extraction'
5daaa5c Fix TARGET_PROPERTY target extractions.
2013-01-29 14:52:34 -05:00
Brad King 32b9e67057 Merge topic 'DocumentRelativePathHandling'
a7d6ebb documentation: handling of relative paths by include- and link_directories()
2013-01-29 14:52:22 -05:00
Brad King 5f78d2057f Merge topic 'fix-relocatable-include-dirs'
34d1ade Add the INSTALL_PREFIX genex.
3a17197 Generate the _IMPORT_PREFIX in the non-config export file.
2013-01-29 14:52:19 -05:00
Brad King 3e7bba3fb2 Merge topic 'fix-automoc-compile-defs'
429e369 Process COMPILE_DEFINITIONS as generator expressions in QtAutomoc.
0e10782 Move GetCompileDefinitions to cmTarget.
2013-01-29 14:52:13 -05:00
Stephen Kelly 429e369974 Process COMPILE_DEFINITIONS as generator expressions in QtAutomoc.
Fixes #13493.
2013-01-29 14:11:49 -05:00
Stephen Kelly 0e10782ba7 Move GetCompileDefinitions to cmTarget. 2013-01-29 14:11:49 -05:00
Stephen Kelly 7bf490e9bb Make subclasses responsible for joining content.
This way we can add handling of relative/absolute paths and of
-D in compile definitions.
2013-01-29 19:34:04 +01:00
Stephen Kelly f6b16d4b06 Don't allow targets args in the new target commands. 2013-01-29 18:44:54 +01:00
Stephen Kelly b3a7e19ee4 Make the Property name protected so that subclasses can use it.
Makes subclasses more dry in upcoming patches.
2013-01-29 17:20:45 +01:00
Stephen Kelly 5daaa5c48d Fix TARGET_PROPERTY target extractions.
We need to make sure we can export targets which have content such
as $<0:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>

That means making not finding a target non-fatal here.
2013-01-29 10:56:09 -05:00
Kitware Robot 61d641dccb CMake Nightly Date Stamp 2013-01-29 00:01:18 -05:00
Kitware Robot e2afc40d06 CMake Nightly Date Stamp 2013-01-28 00:01:18 -05:00
Alex Neundorf a7d6ebb01b documentation: handling of relative paths by include- and link_directories()
Alex
2013-01-27 18:00:14 +01:00
Stephen Kelly 34d1ade048 Add the INSTALL_PREFIX genex. 2013-01-27 09:59:26 +01:00
Stephen Kelly 3a1719793f Generate the _IMPORT_PREFIX in the non-config export file. 2013-01-27 09:42:54 +01:00
Kitware Robot 00ba2545fa CMake Nightly Date Stamp 2013-01-27 00:01:25 -05:00
Kitware Robot f7db6d115d CMake Nightly Date Stamp 2013-01-26 00:01:18 -05:00
Brad King aa6ad9c903 Merge topic 'generator-expression-lf'
6c57c31 doc: fix linebreaks in generator expression documentation
2013-01-25 13:38:13 -05:00
Brad King c29dd4fa76 Merge topic 'doc-link-interface'
f032fb9 target_link_libraries: Document that new sigs privatize old (#13876)
2013-01-25 13:38:10 -05:00
Brad King 2046de2a39 Merge topic 'compatible-interface-strings'
2fb2c32 Add the COMPATIBLE_INTERFACE_STRING property.
cd66b91 Make calculation of link-interface-dependent properties type-sensitive.
2013-01-25 13:38:06 -05:00
Kitware Robot a4eb27fbab CMake Nightly Date Stamp 2013-01-25 00:01:19 -05:00
Rolf Eike Beer 6c57c31414 doc: fix linebreaks in generator expression documentation 2013-01-24 23:12:36 +01:00
Brad King f032fb904b target_link_libraries: Document that new sigs privatize old (#13876)
Explain in the documentation for the legacy signature

 target_link_libraries(foo bar)

that the other signatures like

 target_link_libraries(foo LINK_INTERFACE_LIBRARIES ...)
 target_link_libraries(foo LINK_PRIVATE ...)

will set the LINK_INTERFACE_LIBRARIES target property and therefore make
libraries specified only by the legacy signature private.
2013-01-24 16:06:14 -05:00
Stephen Kelly 2fb2c32f9b Add the COMPATIBLE_INTERFACE_STRING property. 2013-01-24 20:36:04 +01:00
Stephen Kelly cd66b9131d Make calculation of link-interface-dependent properties type-sensitive. 2013-01-24 20:36:04 +01:00
Brad King 21fc6c46df Merge topic 'fix-COMPATIBLE_INTERFACE-link-libraries'
6fbe3ce Exclude the LINK_LIBRARIES related properties from INTERFACE evaluation.
2013-01-24 08:26:01 -05:00
Brad King 907f1e2227 Merge topic 'cmMakefile-comment-typos'
3853a6c spell: fix a few typos in comments
2013-01-24 08:25:53 -05:00
Stephen Kelly 6fbe3ce4ef Exclude the LINK_LIBRARIES related properties from INTERFACE evaluation.
These interface-related link-libraries properties are used to determine
the value of the other INTERFACE properties, so we were getting infinite
recursion and segfaults otherwise.
2013-01-24 08:17:46 -05:00
Kitware Robot 2cf9642e9c CMake Nightly Date Stamp 2013-01-24 00:01:18 -05:00
Brad King 76ace2b95a Merge topic 'disallow-IMPORTED-interface-porcelain'
b98d14d Disallow porcelain to populate includes and defines of IMPORTED targets.
48a4cf2 Revert "Allow target_link_libraries with IMPORTED targets."
2013-01-23 15:11:40 -05:00
Brad King 7db963a017 Merge topic 'clean-include-dirs-debugging'
6063fef Output include directories as LOG messages, not warnings.
aa66748 Specify the target whose includes are being listed.
d70204a Only output includes once after the start of 'generate-time' when debugging.
0d46e9a Store includes from the same include_directories call together.
2013-01-23 15:11:36 -05:00
Brad King 33695c616a Merge topic 'export-new-style-files'
02d4e53 Generate new-style cmake code during export.
2013-01-23 15:11:32 -05:00
Brad King 7a336d2e31 Merge topic 'fix-LINK_LIBRARIES-population'
d7f1520 Don't wrap all targets in LINK_LIBRARIES in a TARGET_NAME genex.
2013-01-23 15:11:28 -05:00
Brad King a37b0e3ebf Merge topic 'qt4-autolink-qtmain'
e3b5eb6 Automatically link to the qtmain library when linking to QtCore.
6c8d8af Add the $<TARGET_POLICY> expression
2013-01-23 15:11:24 -05:00
Brad King bf2e4e8cb1 Merge topic 'fix-COMPATIBLE_INTERFACE-properties'
830246e Export the COMPATIBLE_INTERFACE_BOOL content properties
bd82bb4 Clear the link information in ClearLinkMaps.
e987991 Make INTERFACE determined properties readable in generator expressions.
d9afacc Exit early if we find an inconsistent property.
1800f70 Populate the link information cache before checking dependent properties.
2013-01-23 15:11:15 -05:00
Brad King e7be8be8c0 Merge topic 'xcode-duplicate-flags-13354'
f447db7 XCode generator won't infinitely parse compiler flags (bug #13354).
2013-01-23 15:11:09 -05:00
Brad King 95f88fd2a1 Merge topic 'fix-target_include_directories-genex'
24dcf0c Make sure generator expressions can be used with target_include_directories.
2013-01-23 15:11:04 -05:00
Brad King c4c52b3273 Merge topic 'automoc-object'
0e35cac Automoc: add OBJECT library to QtAutomoc test
cf3faac Automoc: Fix automoc for OBJECT libraries.
2013-01-23 15:10:39 -05:00
Stephen Kelly e3b5eb6b23 Automatically link to the qtmain library when linking to QtCore.
When using QAxServer, ensure that the qtmain library is excluded
by reporting an error at CMake time if it is not.
2013-01-23 14:15:41 -05:00
Yury G. Kudryashov 3853a6c3a7 spell: fix a few typos in comments 2013-01-23 10:51:31 -05:00
Kitware Robot a40c4261e6 CMake Nightly Date Stamp 2013-01-23 00:01:06 -05:00
Kitware Robot 2db9b0b066 CMake Nightly Date Stamp 2013-01-22 00:01:18 -05:00
Stephen Kelly b98d14d400 Disallow porcelain to populate includes and defines of IMPORTED targets.
With similar reasoning to the parent commit, as downstreams, we can't
determine what $<CONFIG> generator expressions would be appropriate.

Upstream would have populated the INTERFACE_INCLUDE_DIRECTORIES with
config-specific generator expressions, possibly appropriate for
their DEBUG_CONFIGURATIONS. In theory, if we would add include
directories for a DEBUG intent, we would have to match the upstream
configurations for that.

Rather than attempting to discover the appropriate configurations
at this time, simplify the feature instead. The use of IMPORTED targets
with these commands could still be added in the future if targets
would export their DEBUG_CONFIGURATIONS somehow.
2013-01-21 12:32:46 +01:00
Stephen Kelly 48a4cf2182 Revert "Allow target_link_libraries with IMPORTED targets."
This reverts commit 9cfe4f1b76.

It turns out that correctly adding the content to
the IMPORTED_LINK_INTERFACE_LIBARIES_<CONFIG> of an upstream target
from the buildsystem of a downstream project is not simple.

If upstream had added the INTERFACE content, the config-specific
properties would  be determined by the DEBUG_CONFIGURATIONS of
upstream.

As downstream, we don't have any information about what
the DEBUG_CONFIGURATIONS of upstream were, so we can't determine
which configuration-specific properties to populate. The best we can do
is add it to all of them or add it to the ones downstream considers to
be DEBUG_CONFIGURATIONS, neither of which is a good solution.

So, removing the porcelain API for that is the best approach. A human
can still determine which properties to populate and use
the set_property API to populate the desired properies.

Another solution to this would be for upstream targets to publish
what they consider DEBUG_CONFIGURATIONS, but that can be added in
a future release.
2013-01-21 12:19:39 +01:00
Stephen Kelly 6063fef226 Output include directories as LOG messages, not warnings. 2013-01-21 09:12:22 +01:00
Stephen Kelly aa6674831c Specify the target whose includes are being listed. 2013-01-21 09:12:22 +01:00
Stephen Kelly d70204a86a Only output includes once after the start of 'generate-time' when debugging.
During configure-time, GetIncludeDirectories may be called too, for example
if using the export() command. As the content can be different, it should
be output each time then.
2013-01-21 09:12:22 +01:00
Stephen Kelly 0d46e9a029 Store includes from the same include_directories call together.
Otherwise, we get a separate IncludeDirectoriesEntry for each include,
and that causes unnecessary and confusing splitting in the output when
debugging the INCLUDE_DIRECTORIES property.
2013-01-21 09:12:22 +01:00
Stephen Kelly 830246e841 Export the COMPATIBLE_INTERFACE_BOOL content properties 2013-01-21 09:05:03 +01:00
Stephen Kelly bd82bb4787 Clear the link information in ClearLinkMaps.
The cache here needs to be cleared if GetLinkInformation is called
at configure-time, such as during an export().

The next commit does exactly that, and without this patch,
the LinkLanguage test would fail.
2013-01-21 09:05:03 +01:00
Kitware Robot 3ded614e31 CMake Nightly Date Stamp 2013-01-21 00:01:20 -05:00
Stephen Kelly 02d4e53f48 Generate new-style cmake code during export.
Use empty end*() commands and lowercase commands.
2013-01-20 18:05:23 +01:00
Stephen Kelly e98799105b Make INTERFACE determined properties readable in generator expressions.
The properties are evaluated as link-dependent interface properties when
evaluating the generator expressions.
2013-01-20 17:06:47 +01:00
Stephen Kelly d7f1520938 Don't wrap all targets in LINK_LIBRARIES in a TARGET_NAME genex.
It is not necessary and the current state is unintentional. Before
this patch,

 target_link_libraries(foo bar)

causes the LINK_LIBRARIES property of foo to contain

 $<TARGET_NAME:bar>

instead of just

 bar
2013-01-20 11:25:35 +01:00
Kitware Robot 35fbe4e4bc CMake Nightly Date Stamp 2013-01-20 00:01:25 -05:00
Kitware Robot 5e572619c6 CMake Nightly Date Stamp 2013-01-19 00:01:19 -05:00
Robert Maynard f447db7f10 XCode generator won't infinitely parse compiler flags (bug #13354).
When parsing the compiler flag list we reduce the search space on
each iteration to be the subset of the string we hadn't searched
before.
2013-01-18 11:55:50 -05:00
Stephen Kelly d9afacced3 Exit early if we find an inconsistent property.
Further messages about inconsistency are distracting.
2013-01-18 16:10:37 +01:00
Kitware Robot c482dd8c97 CMake Nightly Date Stamp 2013-01-18 00:01:03 -05:00
Stephen Kelly 6c8d8afe34 Add the $<TARGET_POLICY> expression
This new expression allows checking how a policy was set when a target
was created.  That information is only recorded for a subset of policies,
so a whitelist is used.
2013-01-17 17:20:17 +01:00
Kitware Robot 2b5459cd1a CMake Nightly Date Stamp 2013-01-17 00:01:19 -05:00
Stephen Kelly 1800f702a0 Populate the link information cache before checking dependent properties.
The dependent properties check can require the link information.
2013-01-16 22:43:49 +01:00
Stephen Kelly 24dcf0c007 Make sure generator expressions can be used with target_include_directories.
Handle the case that a generator expression is used before treating
a non-target as an error.
2013-01-16 22:16:46 +01:00
Kitware Robot c2ab74acb9 CMake Nightly Date Stamp 2013-01-16 00:01:30 -05:00
Brad King 3a7d1ce3ff Merge topic 'test-export-iface-genex'
1d74ba2 Test evaluation target via export for generator expressions
522bdac Export the INTERFACE_PIC property.
4ee872c Make the BUILD_INTERFACE of export()ed targets work.
1d47cd9 Add a test for the interfaces in targets exported from the build tree.
6c828f9 Move the exported check for file existence.
cfd4f0a Move the exported check for dependencies of targets
d8fe1fc Only generate one check per missing target.
f623d37 Don't write a comment in the export file without the code.
b279f2b Strip consecutive semicolons when preprocessing genex strings.
2013-01-15 14:43:05 -05:00
Stephen Kelly 522bdac149 Export the INTERFACE_PIC property. 2013-01-15 14:36:22 -05:00
Stephen Kelly 4ee872cb99 Make the BUILD_INTERFACE of export()ed targets work.
The existing BUILD_INTERFACE code is executed at generate time, which
is too late for export().
2013-01-15 14:36:22 -05:00
Stephen Kelly 6c828f9126 Move the exported check for file existence.
Check only once, in the Config.cmake file, instead of once in each
Config-<cfg>.cmake file.
2013-01-15 14:36:21 -05:00
Stephen Kelly cfd4f0a4f4 Move the exported check for dependencies of targets
Check only once, in the Config.cmake file, instead of once in each
Config-<cfg>.cmake file.
2013-01-15 14:36:21 -05:00
Stephen Kelly d8fe1fcd80 Only generate one check per missing target. 2013-01-15 14:36:21 -05:00
Stephen Kelly f623d37a95 Don't write a comment in the export file without the code. 2013-01-15 14:36:21 -05:00
Stephen Kelly b279f2b431 Strip consecutive semicolons when preprocessing genex strings. 2013-01-15 14:36:21 -05:00
Brad King 33d4e0db3f Merge topic 'update-kwsys'
e2c756f Merge branch 'upstream-kwsys' into update-kwsys
4ba0ac7 KWSys 2013-01-14 (6fa1c99f)
6f57a90 Merge branch 'upstream-kwsys' into update-kwsys
6318834 KWSys 2013-01-10 (608d6b47)
2013-01-15 14:34:43 -05:00
Brad King 9a7da738f1 Merge topic 'TARGET_DEFINED-genex'
2bee6f5 Add the TARGET_DEFINED generator expression
2013-01-15 14:34:38 -05:00
Brad King a269e65de4 Merge topic 'commands-genex-docs'
7c7b94f Document the use of generator expressions in new commands.
2013-01-15 14:34:33 -05:00
Brad King 8d91e23565 Merge topic 'tll-allow-genex'
1da7502 Don't include generator expressions in old-style link handling.
2013-01-15 14:34:29 -05:00
Brad King 0dce5bc2f2 Merge topic 'compatible-INTERFACE-user-properties'
7171fd0 Add a way to check INTERFACE user property compatibility.
2013-01-15 14:34:24 -05:00
Brad King d870867570 Merge topic 'fix-empty-link-line-crash'
8ff1d47 CMake: Skip empty link.txt lines (#13845)
2013-01-15 14:34:20 -05:00
Stephen Kelly 7171fd0a90 Add a way to check INTERFACE user property compatibility. 2013-01-15 14:33:45 -05:00
Kitware Robot 3a40a8adf3 CMake Nightly Date Stamp 2013-01-15 00:01:13 -05:00
Yury G. Kudryashov cf3faacad2 Automoc: Fix automoc for OBJECT libraries.
Before this patch,
add_library(obj OBJECT helper.cpp)
add_executable(tgt $<TARGET_OBJECTS:obj>)
didn't run automoc on helper.cpp.
2013-01-15 07:43:04 +04:00
Brad King e2c756fcf0 Merge branch 'upstream-kwsys' into update-kwsys 2013-01-14 09:41:52 -05:00
Kitware Robot 36480eaf5c CMake Nightly Date Stamp 2013-01-14 00:01:23 -05:00
Stephen Kelly 2bee6f5ba5 Add the TARGET_DEFINED generator expression
This tests whether the parameter is a usable target.
2013-01-14 00:08:47 +01:00
Stephen Kelly 7c7b94f21f Document the use of generator expressions in new commands. 2013-01-13 10:04:40 +01:00
Stephen Kelly 1da75022bb Don't include generator expressions in old-style link handling.
Don't add generator expressions to variables which are used
for CMP0003, CMP0004, and the old-style _LIB_DEPENDS content. They
will not be evaluated when read anyway and would probably confuse
the code reading them.

This makes it legitimate to use target_link_libraries with generator
expressions as arguments.
2013-01-13 09:59:42 +01:00
Kitware Robot 9822f8c931 CMake Nightly Date Stamp 2013-01-13 00:01:16 -05:00
Kitware Robot 3367d0cc7f CMake Nightly Date Stamp 2013-01-12 00:01:19 -05:00
Brad King 6f57a9041e Merge branch 'upstream-kwsys' into update-kwsys 2013-01-11 11:34:59 -05:00
Brad King c0c8ef85fc Merge topic 'LINK_INTERFACE_LIBRARIES-genex'
77d2646 Allow generator expressions in LINK_INTERFACE_LIBRARIES.
94aeaf7 Split LINK_INTERFACE_LIBRARIES export handling into dedicated method.
a3aedb8 Split the generator expression before extracting targets.
b6036d1 Extract the AddTargetNamespace method.
cb1afbf Don't pass a position when determining if a target name is a literal.
f99196d Add cmGeneratorExpression::Split() API.
2013-01-11 11:32:13 -05:00
Brad King 8ff1d4714f CMake: Skip empty link.txt lines (#13845)
In the implementation of "cmake -E cmake_link_script", skip lines from
the input file that are empty or contain only whitespace.  Do not try to
run a child with no command line.
2013-01-11 10:57:39 -05:00