Commit Graph

24512 Commits

Author SHA1 Message Date
Brad King b17729460b cmake: Implement placeholder --help-custom-modules compatibility
The implementation of the "cmake --help-custom-modules" was removed
along with the rest of the old help generation infrastructure when
documentation was converted to reStructuredText.  In order to avoid
breaking existing project builds outright when they use a custom command
that runs a command like "cmake --help-custom-modules foo.1", generate
the requested file with placeholder content explaining that the option
is not supported anymore.
2014-01-08 11:16:48 -05:00
Stephen Kelly 73e93400e2 get_target_property: Error on non-existent target.
Introduce policy CMP0045 to control this behavior.
2014-01-08 16:41:34 +01:00
Stephen Kelly ab9f58f657 FindQt4: Ensure target exists before calling get_target_property.
This macro is called for all potential Qt targets, even those which were
not found.
2014-01-08 16:41:34 +01:00
Stephen Kelly 37ebeb9100 FindQt4: Fix use of get_target_property to use actual target name.
This was introduced in ba48e63f (Generate config-specific interface
link libraries propeties., 2013-02-09).
2014-01-08 16:41:34 +01:00
Stephen Kelly 6aabb6a62b Genex: Use case-sensitive comparison for COMPILER_ID. 2014-01-08 16:41:34 +01:00
Stephen Kelly 5bb53f6b73 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy. 2014-01-08 16:41:34 +01:00
Nils Gladitz be0458c562 InstallRules: added new variable to disable generation of install rules
The boolean variable CMAKE_SKIP_INSTALL_RULES
allows disabling generation of install rules for projects which don't
want them.
2014-01-08 16:28:14 +01:00
Stephen Kelly f579fe0d7a Help: Fix link to MAP_IMPORTED_CONFIG_<CONFIG> 2014-01-08 16:06:41 +01:00
Stephen Kelly 590d238914 cmTarget: Handle NO_SYSTEM_FROM_IMPORTED.
This handling was lost in commit faedd2be (cmTarget: Fix system include
annotation propagation., 2014-01-01).
2014-01-08 16:06:41 +01:00
Brad King beb9cfae17 Merge topic 'cmp0022-docs'
28ffb7e Note how to write CMP0022 compatible code with CMake 2.8.9.
2014-01-08 09:58:47 -05:00
Brad King 1857660984 Merge topic 'wix-cmake-package-registry'
92c4d40 CPackWiX: added new CPACK_WIX_CMAKE_PACKAGE_REGISTRY variable
2014-01-08 09:58:45 -05:00
Brad King 9551b85a90 Merge topic 'xcode-storyboard-file-type'
e361c3c Merge branch 'xcode-storyboard-file-type-2.8.12' into xcode-storyboard-file-type
93fc5a5 Xcode: Fix storyboard view
2d23c1f Xcode: Fix storyboard view
2014-01-08 09:58:43 -05:00
Brad King afbac9f2d8 Merge topic 'minor-cleanups'
884fb7f Remove obsolete workaround for old cmake versions.
5d1fc19 Help: Ensure that target-policies are added to the documentation.
efc43cd Help: Fix some erroneous code block markers in Module docs.
2014-01-08 09:58:41 -05:00
Brad King c1311077b8 VS: Convert include path to backslashes for VS >= 10
In VS <= 9 we already convert include paths to use backslashes
but the conversion was left out of the VS >= 10 generator.
Add the conversion now for consistency.  VS 11 and 12 now require
it because they mistakenly interpret forward-slash options that
happen to occur in paths:

 http://connect.microsoft.com/VisualStudio/feedback/details/778367
2014-01-08 08:58:20 -05:00
Clinton Stimpson e8b8b37ef6 FindQt4: Use NO_CMAKE_FIND_ROOT_PATH where search paths are already rooted.
Thanks to Thomas Petazzoni for part of this fix.
2014-01-08 06:07:24 -07:00
Stephen Kelly 28ffb7e0be Note how to write CMP0022 compatible code with CMake 2.8.9.
This has come up on the mailing list, and various other places.
2014-01-08 13:41:24 +01:00
Kitware Robot 3af2afafc0 CMake Nightly Date Stamp 2014-01-08 00:01:11 -05:00
Nils Gladitz 92c4d4039e CPackWiX: added new CPACK_WIX_CMAKE_PACKAGE_REGISTRY variable
Allows automatic registration of installed packages with
the cmake package registry.
2014-01-08 01:28:24 +01:00
Brad King e361c3cb18 Merge branch 'xcode-storyboard-file-type-2.8.12' into xcode-storyboard-file-type
Resolve conflict in Source/cmGlobalXCodeGenerator.cxx by keeping
our side.
2014-01-07 14:28:30 -05:00
Ruslan Baratov 93fc5a53a6 Xcode: Fix storyboard view
Since commit 56831461 (Xcode: Use explicitFileType to mark source types,
2013-04-16) the Xcode generator prefers to use explicitFileType to tell
Xcode about each source file type.  This works better than
lastKnownFileType for some file types, but not for "file.storyboard".

If storyboard file has attribute 'explicitFileType' it is displayed
incorrectly (as raw xml).  Switch it back to 'lastKnownFileType'.
2014-01-07 14:10:55 -05:00
Ruslan Baratov 2d23c1f177 Xcode: Fix storyboard view
Since commit 56831461 (Xcode: Use explicitFileType to mark source types,
2013-04-16) the Xcode generator prefers to use explicitFileType to tell
Xcode about each source file type.  This works better than
lastKnownFileType for some file types, but not for "file.storyboard".

If storyboard file has attribute 'explicitFileType' it is displayed
incorrectly (as raw xml).  Switch it back to 'lastKnownFileType'.
2014-01-07 14:07:32 -05:00
Stephen Kelly 884fb7f5b9 Remove obsolete workaround for old cmake versions. 2014-01-07 16:05:19 +01:00
Stephen Kelly 5d1fc198b7 Help: Ensure that target-policies are added to the documentation.
The two most-recently-added policies were not tested for.
2014-01-07 16:05:15 +01:00
Stephen Kelly efc43cde8f Help: Fix some erroneous code block markers in Module docs.
There are many style errors in these files. This patch fixes only
the syntactical errors.

The script which ported these to rst tripped on some incorrectly
formatted blocks in the original input documentation.  Use a new
script to find problematic code (and then fix them manually):

  #!/usr/bin/env python

  import os

  rootDir = '.'

  def checkFile(fname):

    f = open(fname)
    lines = f.readlines()
    started = False
    counter = 0
    for l in lines:
      if "#" in l:
        started = True
      elif started:
        return
      lin = l.find("(")
      if lin != -1 and l.find(")", lin) == -1 and \
          not "(To distribute this file outside of CMake, substitute the full" in l:
        for lp in lines[counter+1:]:
          if lp == "# ::\n":
            print "\n\n######### " + fname + "\n\n"
            print ''.join(lines[max(counter-2, 0):counter+6])
            break
          elif lp == "#\n" :
            continue
          break
      counter += 1

  for dirName, subdirList, fileList in os.walk(rootDir):
      for fname in fileList:
          checkFile(os.path.join(dirName, fname))
2014-01-07 09:52:56 -05:00
Brad King 855e8759fd Merge topic 'minor-cleanups'
3917d86 Genex: Add a nullary form for CONFIG
5169130 Help: Document the target properties exported to IMPORTED targets.
ee21f1c CompatibleInterface: Test debugging of not-set property.
80e9fe9 Help: Note that language-specific 'built-ins' are set by the project command.
0b5bf8a Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs.
28c865b Tests: simplify Qt4 target usage
6cfe6b8 Help: Fix typo: 'target' -> 'target property'
b7deca4 Test: Remove obsolete commented code.
9c9f69f Genex: Make EQUAL support upper case binary literals
6eb3218 Genex: Fix case of methods in the dag checker.
646c6ec Genex: Use a preprocessor loop to implement transitive DAG check.
711fb38 Genex: List transitive properties and methods as a table, not two lists.
802a28f Add cmHasLiteralSuffix API.
2014-01-07 09:39:22 -05:00
Brad King f74b607aa3 Merge topic 'doc-cpp-allowed'
58c174e Help: Document the C++ subset permitted for CMake code.
2014-01-07 09:39:20 -05:00
Brad King 3a024ce0d8 Merge topic 'unicode-fstream'
5730710 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
2014-01-07 09:39:17 -05:00
Brad King 91dcc9bef3 Merge topic 'unicode-main'
a1e542f Use Encoding::CommandLineArguments for main() functions.
2014-01-07 09:39:15 -05:00
Stephen Kelly 3917d86b26 Genex: Add a nullary form for CONFIG
This is consistent with other similar expressions such as PLATFORM_ID,
and makes the CONFIGURATION expression obsolete.

Fix an off-by-one error in
GeneratorExpressionContent::EvaluateParameters exposed by a unit test.

Remove the test for 'bad' nullary use of $<CONFIG>.

Add a unit test to verify that $<CONFIG> and $<CONFIGURATION> have
the same value.
2014-01-07 09:38:01 -05:00
Stephen Kelly 5169130539 Help: Document the target properties exported to IMPORTED targets. 2014-01-07 09:38:01 -05:00
Stephen Kelly ee21f1c605 CompatibleInterface: Test debugging of not-set property. 2014-01-07 09:38:01 -05:00
Stephen Kelly 80e9fe9cee Help: Note that language-specific 'built-ins' are set by the project command. 2014-01-07 09:38:01 -05:00
Stephen Kelly 0b5bf8ad0b Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs. 2014-01-07 09:38:00 -05:00
Stephen Kelly 28c865bb22 Tests: simplify Qt4 target usage
This content was copied from another test where both the Core and Gui
targets are used.
2014-01-07 09:38:00 -05:00
Stephen Kelly 6cfe6b881d Help: Fix typo: 'target' -> 'target property' 2014-01-07 09:38:00 -05:00
Stephen Kelly b7deca4a54 Test: Remove obsolete commented code.
This should not have survived in commit a247911a (Tests: Don't read
the LOCATION property from build targets., 2013-11-18).
2014-01-07 09:38:00 -05:00
Clinton Stimpson 5730710c86 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
2014-01-07 09:27:44 -05:00
Kitware Robot 69ccc951cc CMake Nightly Date Stamp 2014-01-07 00:01:08 -05:00
Stephen Kelly 58c174e945 Help: Document the C++ subset permitted for CMake code.
This may be incomplete, but further limitations can be added when
needed.
2014-01-06 19:15:31 +01:00
Stephen Kelly 9c9f69fb9c Genex: Make EQUAL support upper case binary literals
As C++11, python, D and java do.

 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3472.pdf

Add test for uppercase hex literals.
2014-01-06 18:46:45 +01:00
Stephen Kelly 6eb3218105 Genex: Fix case of methods in the dag checker. 2014-01-06 18:46:45 +01:00
Stephen Kelly 646c6ec2f9 Genex: Use a preprocessor loop to implement transitive DAG check.
The other infrastructure for transitive property handling is
already using a preprocessor loop.

Implement special backward-compatibility handling of
COMPILE_DEFINITIONS_<CONFIG> using a template switch for the
extra check.
2014-01-06 18:46:45 +01:00
Stephen Kelly 711fb38f72 Genex: List transitive properties and methods as a table, not two lists.
Introduce a new set of macros to select the column.
2014-01-06 18:46:44 +01:00
Stephen Kelly 802a28fc5e Add cmHasLiteralSuffix API. 2014-01-06 18:46:44 +01:00
Brad King dc08199848 Merge topic 'minor-cleanups'
84fac67 Don't allow include() of export(EXPORT) file at configure time.
faedd2b cmTarget: Fix system include annotation propagation.
9eb06d0 add_library: Disallow invalid signatures for INTERFACE_LIBRARY.
10d65d5 cmTarget: Move a variable initialization closer to where it is used.
0f3e8e9 Undefine local preprocessor loop variables.
9ba47ee Genex: Reform error-checking for nullary/unary expressions.
fa651c7 cmTarget: Remove some of the INTERFACE_LIBRARY whitelisted properties.
61d138a cmTarget: INTERFACE_LIBRARY is always EXCLUDE_FROM_ALL.
3429541 export: Rename some variables to reflect content type.
7461d67 cmTarget: Enable convenient include dir handling for INTERFACE_LIBRARY.
7fc6e3d cmTarget: Remove dead code.
2af966d Genex: Add EQUAL expression.
2d66380 cmTarget: Use strtol for numeric parsing.
2014-01-06 11:43:12 -05:00
Stephen Kelly 84fac67f90 Don't allow include() of export(EXPORT) file at configure time.
As a new feature it does not need to participate in CMP0024.

Store cmExportBuildFileGenerator instances which correspond to the
export(EXPORT) signature in a second map which does not own the
pointers.  This avoids the need to add cmExportBuildFileGenerator
and dependencies to the bootstrap system.
2014-01-06 17:25:11 +01:00
Stephen Kelly faedd2bea9 cmTarget: Fix system include annotation propagation.
Direct users of IMPORTED targets treat INTERFACE_INCLUDE_DIRECTORIES
as SYSTEM, after commit a63fcbcb (Always consider includes from IMPORTED
targets to be SYSTEM., 2013-08-29).  It was intended that transitive
use of an IMPORTED target would have the same behavior, but that
did not work.  The implementation processed only direct dependencies
in cmTarget::FinalizeSystemIncludeDirectories.

Implement transitive evaluation of dependencies by traversing the
link interface of each target in the link implementation.
2014-01-06 17:25:10 +01:00
Stephen Kelly 9eb06d0dde add_library: Disallow invalid signatures for INTERFACE_LIBRARY.
Document the valid signatures. Add a test for the IMPORTED GLOBAL
signature.
2014-01-06 17:25:10 +01:00
Stephen Kelly 10d65d5019 cmTarget: Move a variable initialization closer to where it is used.
This is more readable and easier to reason about.
2014-01-06 17:25:10 +01:00
Stephen Kelly 0f3e8e957f Undefine local preprocessor loop variables.
Most occurances of this pattern already contain the undef, so add it to
the rest too.
2014-01-06 17:25:10 +01:00