Commit Graph

13839 Commits

Author SHA1 Message Date
Kitware Robot 5929086634 CMake Nightly Date Stamp 2013-01-11 00:01:18 -05:00
Stephen Kelly 77d2646784 Allow generator expressions in LINK_INTERFACE_LIBRARIES.
The Config and IMPORTED_ variants may also contain generator
expressions.

If 'the implementation is the interface', then the result of
evaluating the expressions at generate time is used to populate
the IMPORTED_LINK_INTERFACE_LIBRARIES property.

1) In the case of non-static libraries, this is fine because the
  user still has the option to populate the LINK_INTERFACE_LIBRARIES
  with generator expressions if that is what is wanted.

2) In the case of static libraries, this prevents a footgun,
  enforcing that the interface and the implementation are really
  the same.

  Otherwise, the LINK_LIBRARIES could contain a generator
  expression which is evaluated with a different context at build
  time, and when used as an imported target. That would mean that the
  result of evaluating the INTERFACE_LINK_LIBRARIES property for
  a static library would not necessarily be the 'link implementation'.

  For example:

    add_library(libone STATIC libone.cpp)
    add_library(libtwo STATIC libtwo.cpp)
    add_library(libthree STATIC libthree.cpp)

    target_link_libraries(libtwo
      $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,STATIC_LIBRARY>:libone>)
    target_link_libraries(libthree libtwo)

  If the LINK_LIBRARIES content was simply copied to the
  IMPORTED_LINK_INTERFACE_LIBRARIES, then libthree links to libone, but
  executables linking to libthree will not link to libone.

3) As the 'implementation is the interface' concept is to be
  deprecated in the future anyway, this should be fine.
2013-01-10 23:04:06 +01:00
Stephen Kelly 94aeaf72c7 Split LINK_INTERFACE_LIBRARIES export handling into dedicated method. 2013-01-10 18:06:57 +01:00
Stephen Kelly a3aedb8152 Split the generator expression before extracting targets.
Now that we're processing a LINK_INTERFACE_LIBRARIES string, it
can contain targets. Make sure they are extracted for
namespacing purposes.

This needs to be restricted to strings which can actually have
targets named in them. For example, this is not done for
INTERFACE_COMPILE_DEFINITIONS, because even if there is a target
named 'foo', the string 'foo' in that property means that '-Dfoo'
will be set when compiling.
2013-01-10 18:06:57 +01:00
Stephen Kelly b6036d104a Extract the AddTargetNamespace method. 2013-01-10 18:06:03 +01:00
Stephen Kelly cb1afbf466 Don't pass a position when determining if a target name is a literal.
The lastPos refers to a position in a different string.
2013-01-10 18:06:03 +01:00
Stephen Kelly f99196dc0c Add cmGeneratorExpression::Split() API.
It can split a string like

 "A;$<1:B>;$<1:C>;D;E;$<1:F;G;H>;$<1:I>;J"

into

 "A" "$<1:B>" "$<1:C>" "D" "E" "$<1:F;G;H>" "$<1:I>" "J"
2013-01-10 18:06:03 +01:00
Brad King 378899ce87 Merge topic 'INTERFACE_POSITION_INDEPENDENT_CODE'
3581b96 Process the INTERFACE_PIC property from linked dependencies
042ecf0 Add API to calculate link-interface-dependent bool properties or error.
bf5ece5 Keep track of properties used to determine linker libraries.
2013-01-10 10:22:52 -05:00
Brad King 325e92fa22 Merge topic 'target-includes-defines-commands'
fc61a7a Add the target_compile_definitions command.
8a37ebe Add the target_include_directories command.
2013-01-10 10:22:46 -05:00
Brad King 2341470673 Merge topic 'tll-IMPORTED-targets'
9cfe4f1 Allow target_link_libraries with IMPORTED targets.
2013-01-10 10:22:26 -05:00
Brad King 42d9df9f4f Merge topic 'Haiku'
0380f36 FindOpenGL: add Haiku paths
8e9630c FindGLUT: BeOS does not have libXi and libXmu
50bfedf FindLua51: do not try to link libm on BeOS
3d2e6a0 check for Haiku only with __HAIKU__
7a1b961 Haiku no longer defines __BEOS__
ed96d9a bootstrap: use better defaults for Haiku
2013-01-10 10:22:14 -05:00
Stephen Kelly 3581b96caa Process the INTERFACE_PIC property from linked dependencies
This allows a dependee to inform a target that it should have its
POSITION_INDEPENDENT_CODE property set to ON, or OFF. The value of
the POSITION_INDEPENDENT_CODE property, if set, must be consistent
with any INTERFACE_POSITION_INDEPENDENT_CODE properties on dependees.

Add a test covering the consistency checks on platforms where they run.
2013-01-10 09:54:52 -05:00
Stephen Kelly fc61a7a746 Add the target_compile_definitions command.
This is a convenience API to populate the corresponding properties.
2013-01-10 09:46:58 -05:00
Stephen Kelly 8a37ebec78 Add the target_include_directories command.
This is a convenience API to populate the corresponding properties.
2013-01-10 09:46:57 -05:00
Kitware Robot 96c1a1b787 CMake Nightly Date Stamp 2013-01-10 00:01:20 -05:00
Kitware Robot 30c02f1bcf CMake Nightly Date Stamp 2013-01-09 00:01:16 -05:00
Stephen Kelly 042ecf0471 Add API to calculate link-interface-dependent bool properties or error.
This new method checks that the property FOO on a target is consistent
with the INTERFACE_FOO properties of its dependees. If they are not the
consistent, an error is reported. 'Consistent' means that iff the
property is set, it must have the same boolean value as all other
related properties.
2013-01-08 20:38:16 +01:00
Stephen Kelly bf5ece51c3 Keep track of properties used to determine linker libraries.
Those properties can't later be implicitly defined by the interface
of those link libraries.
2013-01-08 20:38:16 +01:00
Brad King a9f1bf4380 Merge topic 'LINK_LIBRARIES-property'
7653862 Add LINK_LIBRARIES property for direct target link dependencies
40cf3fb Make linking APIs aware of 'head' target
2013-01-08 14:32:41 -05:00
Brad King e41d4951b3 Merge topic 'update-kwsys'
6f6afbd Merge branch 'upstream-kwsys' into update-kwsys
495fa24 KWSys 2013-01-07 (fc60c8b8)
2013-01-08 14:32:37 -05:00
Brad King 6095e9fda6 Merge topic 'include-dirs-convenience'
9ce1b9e Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable.
2013-01-08 14:32:28 -05:00
Brad King 9549ac1df5 Merge topic 'vs11-external-object'
b684b39 VS11: Simplify external object file handling (#13831)
2013-01-08 14:32:17 -05:00
Brad King af770bc27e Merge topic 'deprecate-load_command'
09a0da7 Revert "load_command: Deprecate and document pending removal"
2013-01-08 14:31:57 -05:00
Stephen Kelly 9ce1b9ef29 Add CMAKE_BUILD_INTERFACE_INCLUDES build-variable.
This makes

 set(CMAKE_BUILD_INTERFACE_INCLUDES ON)

add the equivalent of

 set_property(TARGET tgt APPEND PROPERTY
   INTERFACE_INCLUDE_DIRECTORIES
   $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR}>
 )

to every target.

If the headers are in CMAKE_CURRENT_SOURCE_DIR, and the generated headers
are in CMAKE_CURRENT_BINARY_DIR, this is a convenient way to build a target
bar, which depends on foo, just by using target_link_libraries() and adding
the INTERFACE_INCLUDE_DIRECTORIES to the INCLUDE_DIRECTORIES of the target
being linked. There will be more-convenient porcelain API to consume the
property in the future.
2013-01-08 14:14:27 -05:00
Stephen Kelly 9cfe4f1b76 Allow target_link_libraries with IMPORTED targets.
This makes it possible to use:

 target_link_libraries(foo LINK_INTERFACE_LIBRARIES bar)

where foo is an IMPORTED target. Other tll() signatures are not
allowed.
2013-01-08 18:58:18 +01:00
Stephen Kelly 7653862798 Add LINK_LIBRARIES property for direct target link dependencies
Previously we kept direct link dependencies in OriginalLinkLibraries.
The property exposes the information in the CMake language through the
get/set_property commands.  We preserve the OriginalLinkLibraries value
internally to support old APIs like that for CMP0003's OLD behavior, but
the property is now authoritative.  This follows up from commit d5cf644a
(Split link information processing into two steps, 2012-11-01).

This will be used later to populate the link interface properties when
exporting targets, and will later allow use of generator expressions
when linking to libraries with target_link_libraries.

Also make targets depend on the (config-specific) union of dependencies.
CMake now allows linking to dependencies or not depending on the config.
However, generated build systems are not all capable of processing
config-specific dependencies, so the targets depend on the union of
dependencies for all configs.
2013-01-08 09:02:43 -05:00
Stephen Kelly 40cf3fb95b Make linking APIs aware of 'head' target
The 'head' is the dependent target to be linked with the current target.
It will be used to evaluate generator expressions with proper handling
of mapped configurations and is used as the source target of properties.

This requires that memoization is done with a key of a pair of target
and config, instead of just config, because now the result also depends
on the target.  Removing the memoization entirely is not an option
because it slows cmake down considerably.
2013-01-08 08:53:25 -05:00
Brad King 6f6afbd69f Merge branch 'upstream-kwsys' into update-kwsys 2013-01-08 08:42:58 -05:00
Kitware Robot 97758f2920 CMake Nightly Date Stamp 2013-01-08 00:01:19 -05:00
Rolf Eike Beer 7a1b961de8 Haiku no longer defines __BEOS__ 2013-01-07 21:20:11 +01:00
Brad King c2cde7f104 Merge topic 'osx-implicit-link-dirs'
cc676c3 OS X: Detect implicit linker framework search paths
2dd67c7 OS X: Detect implicit link directories on modern toolchains
ba58d0c OS X: Link with all framework search paths, not just the last
2013-01-07 14:23:04 -05:00
Brad King db925e3532 Merge topic 'interface-includes-defines'
894f52f Handle INTERFACE properties transitively for includes and defines.
f5b1980 Populate the ExportedTargets member early in GenerateMainFile
c67b812 Make cycles in target properties ignored, not an error.
d0f950f Use mapped config properties to evaluate $<CONFIG>
26def17 Make all relevant targets available in the genex context.
0c657dc Add API to populate INTERFACE properties in exported targets.
e04f737 Add API to extract target names from a genex string.
b0c8f73 Add the TARGET_NAME generator expression.
77475fe Allow generator expressions to require literals.
b2f1700 GenEx: Add expressions to specify build- or install-only values
2013-01-07 14:20:13 -05:00
Brad King b5ab3f0707 Merge topic 'ninja-codeblocks-gui'
76c4430 Ninja: fix building from Codeblocks GUI
2013-01-07 14:20:04 -05:00
Brad King bb68d60571 Merge topic 'doc-Xcode-obj-lib-workaround'
51988a4 add_library: Document object library portability suggestion
2013-01-07 14:19:57 -05:00
Brad King 34f959e5b1 Merge topic 'fix-genex-with-no-target'
e767ffc Don't crash when a target is expected but is not available.
2013-01-07 14:19:47 -05:00
Brad King b684b39581 VS11: Simplify external object file handling (#13831)
Since commit 9a6ff950 (Fix for bug where VS2010 did not use .obj files as
part of the build, 2011-04-01) and commit b291d9e7 (VS10: Fix external
objects generated outside target, 2012-03-19) we try to detect whether an
external object file is also a custom command output in the same target.
This is because VS10 includes .obj custom command outputs on the link line
by default.

VS 11 supports a "<LinkObjects ...>false</LinkObjects>" setting in custom
command rules to tell VS not to link the outputs.  From the VS help:

 Specify whether the Inputs and output files with specific extensions (.obj,
 .lib, .res, .rsc) are passed to the linker.

Treat all external object files the same and add "<Object>" settings for them.
2013-01-07 11:42:53 -05:00
Brad King 09a0da7789 Revert "load_command: Deprecate and document pending removal"
This reverts commit d2d43986e7.
We will add a policy to remove the command more gracefully.
2013-01-07 10:31:07 -05:00
Kitware Robot c7550d5ef1 CMake Nightly Date Stamp 2013-01-07 00:01:16 -05:00
Kitware Robot 427ef82498 CMake Nightly Date Stamp 2013-01-06 00:01:29 -05:00
Peter Kümmel 76c4430971 Ninja: fix building from Codeblocks GUI
Many thx to Chuck Frayman

BUG: 13652
2013-01-05 08:29:58 +01:00
Kitware Robot 0c1f291a27 CMake Nightly Date Stamp 2013-01-05 00:01:14 -05:00
Stephen Kelly 894f52f32d Handle INTERFACE properties transitively for includes and defines.
Contextually, the behavior is as if the properties content from another
target is included in the string and then the result is evaluated.
2013-01-05 01:18:37 +01:00
Stephen Kelly f5b1980fb2 Populate the ExportedTargets member early in GenerateMainFile
The member variable is checked to determine whether to call
HandleMissingTarget(). As that could be called during the loop in
the comming commits, ensure that it contains all targets being
exported.
2013-01-05 01:18:37 +01:00
Stephen Kelly c67b8124f7 Make cycles in target properties ignored, not an error.
Constructs such as these are an error as they are direct self-references:

 set_property(TARGET foo APPEND PROPERTY
   INCLUDE_DIRECTORIES $<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>)
 set_property(TARGET foo APPEND PROPERTY
   INCLUDE_DIRECTORIES $<TARGET_PROPERTY:INCLUDE_DIRECTORIES>)

However, this is an indirect self-reference in a cycle, and not an error:

 set_property(TARGET foo APPEND PROPERTY
   INCLUDE_DIRECTORIES $<TARGET_PROPERTY:bar,INCLUDE_DIRECTORIES>)
 set_property(TARGET bar APPEND PROPERTY
   INCLUDE_DIRECTORIES $<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>)
2013-01-05 01:18:36 +01:00
Stephen Kelly d0f950fdba Use mapped config properties to evaluate $<CONFIG> 2013-01-05 01:18:36 +01:00
Stephen Kelly 26def1771d Make all relevant targets available in the genex context.
The current node being evaluated transitively in the generator
expression must be available to resolve mapped configs.
2013-01-05 01:18:36 +01:00
Stephen Kelly 0c657dc637 Add API to populate INTERFACE properties in exported targets.
The INTERFACE properties need to be preprocessed for context (build
location or install location) and to extract target names etc.
2013-01-05 01:18:36 +01:00
Stephen Kelly e04f737c7a Add API to extract target names from a genex string.
The TARGET_NAME expression, which requires a literal, provides
target names. $<TARGET_PROPERTY:tgt,prop> also provides target
names in the cases where tgt is a literal, so that TARGET_NAME is
not needed then in addition.
2013-01-05 01:18:36 +01:00
Stephen Kelly b0c8f73eb6 Add the TARGET_NAME generator expression.
It will be used as a preprocessing marker.
2013-01-05 01:05:09 +01:00
Stephen Kelly 77475fe61d Allow generator expressions to require literals. 2013-01-05 01:05:09 +01:00
Stephen Kelly b2f1700bc7 GenEx: Add expressions to specify build- or install-only values
This is for specifying INCLUDE_DIRECTORIES relevant to the build-location
or the install location for example:

 set_property(TARGET foo PROPERTY
   INTERFACE_INCLUDE_DIRECTORIES
   "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
   "$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>"
 )

A 'bar' target can then use:

 set_property(TARGET bar PROPERTY
   INCLUDE_DIRECTORIES
   "$<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>"
 )

and it will work whether foo is in the same project, or an imported target
from an installation location, or an imported target from a build location
generated by the export() command.

Because the generator expressions are only evaluated at build-time, these
new expressions are equivalent to the ZeroNode and OneNode.

The GeneratorExpression test is split into parts. Some shells can't run
the custom command as it is getting too long.
2013-01-05 01:05:08 +01:00
Brad King 51988a4f91 add_library: Document object library portability suggestion
Xcode and VS <= 7.1 will not build targets that have no source files
besides $<TARGET_OBJECTS:...>.  Suggest in the documentation that
projects always add at least one real source file.
2013-01-04 09:38:22 -05:00
Kitware Robot 95b74cafed CMake Nightly Date Stamp 2013-01-04 00:01:13 -05:00
Stephen Kelly e767ffcda5 Don't crash when a target is expected but is not available. 2013-01-03 20:56:32 +01:00
Brad King 1a25113959 Merge topic 'fix-13789-wix-ui-enhancements'
3793dca CPack: WIX Product Icon, UI Banner, UI Dialog support (#13789)
2013-01-03 13:53:24 -05:00
Brad King 9f8975a1a9 Merge topic 'include-dirs-debugging'
0941d62 Add a way to print the origins of used include directories.
18a3195 Keep track of INCLUDE_DIRECTORIES as a vector of structs.
76ea420 Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressions
2013-01-03 13:53:21 -05:00
Brad King e2969c503b Merge topic 'fix-12904-avoid-overflow'
e378ba5 Add CTestLimitDashJ test (#12904)
3247806 CTest: Prevent creation of unbounded number of tests in ctest (#12904)
2013-01-03 13:53:18 -05:00
Brad King de53c4c695 Merge topic 'iface-depends'
3096202 Make targets depend on the link interface of their dependees.
2013-01-03 13:53:15 -05:00
Brad King 690d6baece Merge topic 'genex-cleanup'
7d736af Replace some 'if' with 'else if'
2013-01-03 13:53:11 -05:00
Brad King 60cf243fc1 Merge topic 'update-kwsys'
81c0be4 Merge branch 'upstream-kwsys' into update-kwsys
567e7d9 KWSys 2012-12-21 (8ce09af5)
2c24ca9 Remove references to KWSys Process Win9x support
e33fa5b Merge branch 'upstream-kwsys' into update-kwsys
a0f91f1 KWSys 2012-12-19 (933eb822)
2013-01-03 13:53:08 -05:00
Brad King 3475f51f57 Merge topic 'fix-undef-warnings'
310455c Fix some warnings from -Wundef
2013-01-03 13:53:05 -05:00
Stephen Kelly 0941d6232a Add a way to print the origins of used include directories. 2013-01-03 13:45:40 -05:00
Stephen Kelly 18a3195ad5 Keep track of INCLUDE_DIRECTORIES as a vector of structs.
The struct can keep track of where the include came from, which gives
us proper backtraces.
2013-01-03 13:45:40 -05:00
Stephen Kelly 3096202932 Make targets depend on the link interface of their dependees. 2013-01-03 13:31:50 -05:00
Kitware Robot 510c9cfe03 CMake Nightly Date Stamp 2013-01-03 00:01:17 -05:00
Kitware Robot 953043e679 CMake Nightly Date Stamp 2013-01-02 00:01:16 -05:00
Kitware Robot 74be149bb3 CMake Nightly Date Stamp 2013-01-01 00:01:05 -05:00
Kitware Robot 34a8c82378 CMake Nightly Date Stamp 2012-12-31 00:01:17 -05:00
Kitware Robot 2716d8976f CMake Nightly Date Stamp 2012-12-30 00:01:07 -05:00
Kitware Robot 6bd93ea240 CMake Nightly Date Stamp 2012-12-29 00:01:11 -05:00
Eric LaFranchi 3793dca08a CPack: WIX Product Icon, UI Banner, UI Dialog support (#13789) 2012-12-28 15:32:15 -05:00
Kitware Robot fb2db0e470 CMake Nightly Date Stamp 2012-12-28 00:01:02 -05:00
Kitware Robot 539c222de0 CMake Nightly Date Stamp 2012-12-27 00:01:14 -05:00
Kitware Robot 94933a5ec9 CMake Nightly Date Stamp 2012-12-26 00:01:05 -05:00
Kitware Robot a73294b908 CMake Nightly Date Stamp 2012-12-25 00:01:07 -05:00
Kitware Robot 4d580517a9 CMake Nightly Date Stamp 2012-12-24 00:01:20 -05:00
Stephen Kelly 7d736af60e Replace some 'if' with 'else if'
For consistency with the rest of the method.
2012-12-23 16:37:01 +01:00
Kitware Robot 00deb127be CMake Nightly Date Stamp 2012-12-23 00:01:21 -05:00
Brad King 81c0be4f00 Merge branch 'upstream-kwsys' into update-kwsys 2012-12-22 09:52:05 -05:00
Stephen Kelly 310455cc18 Fix some warnings from -Wundef
Other warnings come from kwsys, so the flag can't be enabled.
2012-12-22 12:47:54 +01:00
Kitware Robot c95a13ecb9 CMake Nightly Date Stamp 2012-12-22 00:01:12 -05:00
Kitware Robot 0d3b89ed76 CMake Nightly Date Stamp 2012-12-21 00:01:16 -05:00
Stephen Kelly 76ea420fb9 Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressions
The compiled generator expressions need to outlive the creating
type. For the same reason, store the input string in a std::string.
2012-12-20 12:17:37 +01:00
Kitware Robot e1d211abba CMake Nightly Date Stamp 2012-12-20 00:01:02 -05:00
Brad King e33fa5b678 Merge branch 'upstream-kwsys' into update-kwsys 2012-12-19 08:09:36 -05:00
Kitware Robot 5ac16ea6e4 CMake Nightly Date Stamp 2012-12-19 00:01:09 -05:00
David Cole 12e10272b2 Merge topic 'doc-implicit-link-dirs'
017d90c Documentation: Clarify handling of implicit link directories
2012-12-18 13:55:48 -05:00
Casey Goodlett 324780697c CTest: Prevent creation of unbounded number of tests in ctest (#12904)
Note it is still possible for CTest to start more than the number of
processes specified by PARALLEL_LEVEL, but this prevents the number of
tests to start from being unbounded because of overflow.
2012-12-18 13:30:34 -05:00
Kitware Robot 8931dd6e74 CMake Nightly Date Stamp 2012-12-18 00:01:03 -05:00
Kitware Robot a3f63661e6 CMake Nightly Date Stamp 2012-12-17 00:01:05 -05:00
Kitware Robot d8dcd63910 CMake Nightly Date Stamp 2012-12-16 00:01:04 -05:00
Kitware Robot a076b256c4 CMake Nightly Date Stamp 2012-12-15 00:01:04 -05:00
Kitware Robot 34ecf7088b CMake Nightly Date Stamp 2012-12-14 00:01:02 -05:00
Kitware Robot f6a9a64f16 CMake Nightly Date Stamp 2012-12-13 00:01:03 -05:00
Kitware Robot daf17b13d5 CMake Nightly Date Stamp 2012-12-12 00:01:06 -05:00
Brad King cc676c3a08 OS X: Detect implicit linker framework search paths
Previously we hard-coded a list of implicit framework directories but
did not account for CMAKE_OSX_SYSROOT or for changes to the list across
OS X versions.  Instead we should automatically detect the framework
directories for the active toolchain.

The parent commit added the "-Wl,-v" option to ask "ld" to print its
implicit directories.  It displays a block such as:

 Framework search paths:
	/...

Parse this block to extract the list of framework directories.

Detection may fail on toolchains that do not list their framework
directories, such as older OS X linkers.  Always treat the paths

 <sdk>/Library/Frameworks
 <sdk>/System/Library/Frameworks
 <sdk>/Network/Library/Frameworks # Older OS X only
 /System/Library/Frameworks

as implicit.  Note that /System/Library/Frameworks should always be
considered implicit so that frameworks CMake finds there will not
override the SDK copies.
2012-12-11 15:15:52 -05:00
Brad King ba58d0c06f OS X: Link with all framework search paths, not just the last
Refactoring in commit 8d674e78 (Ninja: move -LIBPATH behind -link
option, 2012-09-26) accidentally added code that overwrites the
framework search path flags on each iteration instead of appending.
Change '=' to '+=' to fix it.  This affects Makefile and Ninja
generators.
2012-12-11 15:15:51 -05:00
Brad King 017d90c500 Documentation: Clarify handling of implicit link directories
Extend documentation for CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES to
explain how it is used by CMake and how it can be influenced by
environment variables.

Inspired-by: Alex Neundorf <neundorf@kde.org>
2012-12-11 14:00:23 -05:00
David Cole d0369a9888 Merge topic 'fix-13657-more-gcov47-output'
61ace1d CTest: Coverage handler: expect certain output lines from gcov 4.7 (#13657)
2012-12-11 13:44:33 -05:00
David Cole bc9dcadf19 Merge topic 'xcode-framework-paths'
f0d9385 Makefile: Use modern link information for framework search paths
2bc22bd Xcode: Add frameworks search paths from link dependeny closure (#13397)
2012-12-11 13:44:25 -05:00
David Cole 7b20f893c2 Merge topic 'TheRealAutomocIncludeDirFix'
acc2240 Automoc: get include dirs without stripping implicit include dirs off
2012-12-11 13:44:17 -05:00
David Cole 28c6d32688 Merge topic 'skip-variable-re-expansion'
711b63f Add policy CMP0019 to skip include/link variable re-expansion
2012-12-11 13:44:08 -05:00
David Cole b575eadcda Merge topic 'add-timestamp-subcommands'
12d87c0 CMake: Fix dashboard build errors and warnings
e28ce24 CMake: Fix dashboard test failure
354ecc1 CMake: Fix dashboard warnings
d842d90 CMake: Stylistic changes and documentation tweaks
711e2b3 CMake: Add TIMESTAMP subcommand to string and file commands
2012-12-11 13:43:50 -05:00
Kitware Robot ab2b1f44f8 CMake Nightly Date Stamp 2012-12-11 00:01:14 -05:00
David Cole 61ace1df26 CTest: Coverage handler: expect certain output lines from gcov 4.7 (#13657)
And do not report them as errors.
2012-12-10 17:03:57 -05:00
Kitware Robot 7ecaa4047b CMake Nightly Date Stamp 2012-12-10 00:01:04 -05:00
Kitware Robot 140ed91dd2 CMake Nightly Date Stamp 2012-12-09 00:01:06 -05:00
Kitware Robot 0cbe7dd1e3 CMake Nightly Date Stamp 2012-12-08 00:01:06 -05:00
Brad King f0d938549e Makefile: Use modern link information for framework search paths
Use cmComputeLinkInformation::GetFrameworkPaths to get the list of
framework paths needed by the linker.  Drop the now unused framework
information from the old-style cmTarget link dependency analysis.
2012-12-07 15:29:21 -05:00
Alex Neundorf acc224005e Automoc: get include dirs without stripping implicit include dirs off
This should finally fix #13667 and #13762.
Instead of adding special handling to guess whether implicit include dirs
may have been removed, simply make it possible to query the include dirs
without removing the implicit ones.

Alex
2012-12-07 21:24:28 +01:00
Brad King 2bc22bdaac Xcode: Add frameworks search paths from link dependeny closure (#13397)
The Xcode generator produces FRAMEWORK_SEARCH_PATHS from:

(1) Include directories of the form /path/to/Foo.framework become
    -F/path/to so '#include <Foo/H>' can find H in the framework.

(2) Linked frameworks of the form /path/to/Foo.framework become
    -F/path/to -framework Foo so the linker can find the framework.

Originally commit 82bb6fae (add framework support to FIND_FILE,
2005-12-27) added these and used the (then current) old-style link
dependency analysis results to get the frameworks.  Later a second
setting was added by commit 2ed6191f (add initial xcode framework stuff,
2007-05-08) to transform -F/path/to linker options produced by the old
link line generation into entries appended to FRAMEWORK_SEARCH_PATHS.
Then commit 96fd5909 (Implement linking with paths to library files,
2008-01-22) updated the second setting to directly use the results of
full modern link dependency analysis, but forgot to remove the use of
old-style link results from the original setting location.

The two settings worked together for a while, with the second one
appending to the first.  Then commit f33a27ab (Generate native Xcode 3.0
and 3.1 projects, 2009-06-29) changed the internal representation format
produced by the first setting but did not update the second setting to
append to the new representation.  As a result, if the first setting
added any paths (usually via the old-style link analysis) then the
second setting containing the modern link analysis results would not be
applied at all.

Fix this by removing use of the old-style link analysis results.
Replace it using the modern link dependencies and remove the second
setting altogether.  Now all values for FRAMEWORK_SEARCH_PATHS are
collected in one place so no special append logic is needed.
2012-12-07 15:14:19 -05:00
Brad King 711b63f7e0 Add policy CMP0019 to skip include/link variable re-expansion
Historically CMake has always expanded ${} variable references in the
values given to include_directories(), link_directories(), and
link_libraries().  This has been unnecessary since general ${}
evaluation syntax was added to the language a LONG time ago, but has
remained for compatibility with VERY early CMake versions.

For a long time the re-expansion was a lightweight operation because it
was only processed once at the directory level and the fast-path of
cmMakefile::ExpandVariablesInString was usually taken because values did
not have any '$' in them.  Then commit d899eb71 (Call
ExpandVariablesInString for each target's INCLUDE_DIRECTORIES,
2012-02-22) made the operation a bit heavier because the expansion is
now needed on a per-target basis.  In the future we will support
generator expressions in INCLUDE_DIRECTORIES with $<> syntax, so the
fast-path in cmMakefile::ExpandVariablesInString will no longer be taken
and re-expansion will be very expensive.

Add policy CMP0019 to skip the re-expansion altogether in NEW behavior.
In OLD behavior perform the expansion but improve the fast-path
heuristic to match ${} but not $<>.  If the policy is not set then warn
if expansion actually does anything.  We expect this to be encountered
very rarely in practice.
2012-12-07 09:51:19 -05:00
Kitware Robot 2be87f8ff8 CMake Nightly Date Stamp 2012-12-07 00:01:10 -05:00
David Cole 12d87c0425 CMake: Fix dashboard build errors and warnings
memset is not in std:: for VS6, and though quite silly, 0 is not a char
2012-12-06 07:20:12 -05:00
Kitware Robot 8521a9e9ca CMake Nightly Date Stamp 2012-12-06 00:01:05 -05:00
David Cole e28ce2483d CMake: Fix dashboard test failure
Eliminate the platform difference in calling stat. We call stat normally
in other places in the CMake code base just fine. Works everywhere we
work. Will hopefully also fix the Borland Continuous dashboard failure
that is occurring with respect to correctly measuring the modification
time of a freshly generated file.
2012-12-05 15:16:22 -05:00
David Cole 354ecc1e1f CMake: Fix dashboard warnings
...in the new file and string TIMESTAMP sub-commands
2012-12-05 13:19:09 -05:00
David Cole d842d90622 CMake: Stylistic changes and documentation tweaks
...for the contributed file and string TIMESTAMP sub-commands.
2012-12-05 10:39:11 -05:00
Nils Gladitz 711e2b3b5c CMake: Add TIMESTAMP subcommand to string and file commands 2012-12-05 10:39:10 -05:00
David Cole 2bb2745fa8 Merge topic 'fix-11575-add-wix-support-to-cpack'
a74bd47 CPack: Fix dashboard errors and warnings (#11575)
ad0f735 CPack: Fix dashboard warnings (#11575)
0729ad4 CPack: Fix dashboard errors (#11575)
85baac1 CPack: Add a WiX Generator (#11575)
2012-12-05 10:31:05 -05:00
David Cole 41fe73a6bf Merge topic 'fix-13770-folders-w-vs11-express'
7fa0f4b VS11: Allow using folders with the VS11 Express Edition (#13770)
2012-12-05 10:30:48 -05:00
David Cole 4df341b041 Merge topic 'windows-ce-env-helper'
dce54b1 Add command to generate environment for a Windows CE SDK
2012-12-05 10:29:58 -05:00
David Cole 8a581696ef Merge topic 'safe-target-file-import'
bf2ddce Generate an early-return guard in target Export files.
2012-12-05 10:29:48 -05:00
David Cole 00dc0ce592 Merge topic 'ninja_launchers'
9fc2e20 Ninja: fix usage of cldeps with ctest launchers
965358f enable CTEST_USE_LAUNCHERS with Ninja too
2012-12-05 10:29:36 -05:00
Kitware Robot 7c2891daeb CMake Nightly Date Stamp 2012-12-05 00:01:05 -05:00
David Cole a74bd470a4 CPack: Fix dashboard errors and warnings (#11575)
...revealed by the Nightly dashboard runs last night.

Use "size_t" instead of "std::size_t" so that it compiles with
Visual Studio 6, too.

Fix warnings about shadowed "tmp" local variable and ordering of
member variables vs. lines of code in the constructor initializer
list.
2012-12-04 14:37:41 -05:00
Kitware Robot 9d95dc3e23 CMake Nightly Date Stamp 2012-12-04 00:01:07 -05:00
David Cole 7fa0f4b870 VS11: Allow using folders with the VS11 Express Edition (#13770)
Solution folders are supported as read-only in the VS11 Express
Edition, so do not prohibit their use just because we detect the
express edition (as we did in the VS10 generator).

Inspired-by: Paris
2012-12-03 13:53:43 -05:00
David Cole ad0f73573f CPack: Fix dashboard warnings (#11575)
Fix int vs. size_t conversion warnings that only showed up in
the 64-bit builds.
2012-12-03 13:35:29 -05:00
David Cole 0729ad476c CPack: Fix dashboard errors (#11575)
Use same technique here with UuidToString as already found in
cmGlobalVisualStudio7Generator::CreateGUID to avoid using a type
that is not defined on older systems... (VS 7.0 and Borland)
2012-12-03 13:16:35 -05:00
Nils Gladitz 85baac1503 CPack: Add a WiX Generator (#11575)
This new CPack generator produces an *.msi installer file.
Requires having the WiX Toolset installed in order to work
properly.

Download the WiX Toolset installer "WiX36.exe" here:

  http://wix.codeplex.com/releases/view/93929
2012-12-03 11:00:31 -05:00
Kitware Robot 538af16425 CMake Nightly Date Stamp 2012-12-03 00:01:06 -05:00
Kitware Robot cb15efc370 CMake Nightly Date Stamp 2012-12-02 00:01:05 -05:00
Kitware Robot 6e58a4c714 CMake Nightly Date Stamp 2012-12-01 00:01:08 -05:00
Brad King 1be60d6dc7 Merge topic 'multiarch-include'
da1d9ba Test find_path multiarch support (#13742)
b96f6fc Teach find_(path|file) about Linux multiarch (#13742)
2012-11-30 10:35:59 -05:00
Patrick Gansterer dce54b103a Add command to generate environment for a Windows CE SDK 2012-11-30 07:59:25 -05:00
Stephen Kelly bf2ddceb4e Generate an early-return guard in target Export files.
Previously it was necessary for writers of Config files
which incude exported target files to write the guard themselves, but
this was not immediately obvious or documented. Options for them
would be to use a variable, or an INHERITED directory property in an
effort to avoid accidental name clashes in all contexts in
which find_package can be used.

Getting this right requires boiler plate code, so generate a simpler
check automatically instead.
2012-11-30 09:51:17 +01:00
Kitware Robot e0af55a5f4 CMake Nightly Date Stamp 2012-11-30 00:01:04 -05:00
Mathias Gaunard 9fc2e20244 Ninja: fix usage of cldeps with ctest launchers 2012-11-30 03:46:55 +01:00
Kitware Robot d5ac791366 CMake Nightly Date Stamp 2012-11-29 00:01:01 -05:00
Brad King 581b0c0d07 Merge topic 'windows-ce'
3a1006e VS: Added "Deploy" at project configuration for WindowsCE targets
40c36c9 VS: Make DetermineCompilerId working with WinCE too
038df9e VS: Allow setting the name of the target platform
6fe4fcb VS: Add parser for WCE.VCPlatform.config to read WinCE platforms
2118a20 VS: Support setting correct subsystem and entry point for WinCE
6920fed VS: Change variable type of Name from const char* to string
102521b VS: Change variable type of ArchitectureId from const char* to string
332dc09 VS: Add static method to get the base of the registry
d41d4d3 VS: Add CMAKE_VS_PLATFORM_NAME definition to cmMakefile
14861f8 VS: Remove TargetMachine for linker when checking compiler id
2012-11-28 08:49:56 -05:00
Kitware Robot 1ed0464851 CMake Nightly Date Stamp 2012-11-28 00:01:06 -05:00
Brad King 5f30a56f29 Merge topic 'generator-expression-fixes'
b581be0 Genex: Don't segfault on $<FOO,>
07749e3 Genex: Ensure that $<0:...> has a parameter.
ee96dc7 Genex: Extract a method to parse parameters.
2012-11-27 13:35:02 -05:00
Brad King ccf23f295c Merge topic 'fix-13611-source-group-issues'
00e9680 CMake: source_group needs to check its own regex after its children (#13611)
2012-11-27 13:34:40 -05:00
Brad King 9f832033d5 Merge topic 'revert-use-generator-target'
0bbae6f Revert "Move GetLinkInformation to cmGeneratorTarget"
d5cf644 Split link information processing into two steps.
d8a59ea Port cmGeneratorExpression to cmTarget from cmGeneratorTarget.
2012-11-27 13:34:36 -05:00
Brad King 9c48fc7213 Merge topic 'fix-13392-nmake-empty-depends-problem'
7ae7d66 NMake: Fix problem with empty DEPENDS args (#13392)
078e35d NMake: Add a test to demonstrate EmptyDepends issue (#13392)
2012-11-27 13:34:31 -05:00
Brad King 4046fc0104 Merge topic 'use-cmsys-auto_ptr'
ddc0520 Always use the auto_ptr from cmsys.
2012-11-27 13:34:25 -05:00
Brad King 9e395feb46 Merge topic 'ninja-encode-LINK_FLAGS'
12ab135 Ninja: encode LINK_FLAGS to handle bash variables
2012-11-27 13:34:21 -05:00
Brad King f30393e28a Merge topic 'cpack-nsis64-patches'
6ff730a CPack/NSIS: Add support for 64-bit NSIS (#13203)
51da766 CPack/NSIS: Fix compatibility issues with prerelease NSIS (#13202)
2012-11-27 13:34:13 -05:00
Brad King 805c0f3f89 Merge topic 'fix-untar-infinite-loop'
37c34d7 CMake: Fix infinite loop untarring corrupt tar file
2012-11-27 13:34:07 -05:00