Commit Graph

44 Commits

Author SHA1 Message Date
Brad King 88eb5824da try_compile: Pass linker flags into test project (#14066)
Copy CMAKE_EXE_LINKER_FLAGS into the test project generated by
try_compile, just like we already copy CMAKE_<LANG>_FLAGS.

Add CMake Policy CMP0056 to activate this behavior in a compatible way,
but do not warn by default when the policy is not set since it will
affect all try_compile calls.

Extend the RunCMake.try_compile test with a case covering this behavior
for each policy setting.
2014-12-03 15:30:22 -05:00
Gregor Jasny d54617d006 break: Add policy CMP0055 to check calls strictly
Reject break() without loop scope or any arguments.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-11-25 14:14:20 -05:00
Brad King 67c4be51a3 Merge branch 'release-doc-formatting' into doc-formatting
Resolve conflict in Modules/ExternalProject.cmake by keeping our side,
which is more completely revised.
2014-11-06 14:52:49 -05:00
Brad King a9dcf4773c Help: Drop TOC from latex manuals
A latex document can have its own TOC.
2014-11-06 14:46:18 -05:00
Stephen Kelly cd4fa896b1 Help: Document that policies are not feature toggles. 2014-10-20 22:21:57 +02:00
Nils Gladitz 188a1f236e If: Introduce policy CMP0054 - don't dereference quoted variables in if() 2014-09-11 21:23:17 +02:00
Ben Boeckel 25102efc1d EVIS: Add policy CMP0053
This policy switches between the old EVIS parser and the new, faster
parser.
2014-05-08 13:24:49 -04:00
Stephen Kelly 783bce295b Export: Disallow exported interface includes in src/build tree (#14592).
Allow directories in the source tree or build tree only if the
install tree is a subdirectory of the source tree or build tree,
as appropriate.

Re-use the test files in the RunCMake.include_directories test
to run in multiple scenarios.  Bump the required CMake version
in the test to 3.0 to ensure that the new policy warnings are
emitted correctly.
2014-04-09 10:38:49 +02:00
Stephen Kelly 5702e10677 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.
Add policy CMP0051 to control this behavior.
2014-04-02 23:12:56 +02:00
Stephen Kelly f2eee72fac add_custom_command: Disallow use of SOURCE signatures.
Add CMP0050 to control this behavior.
2014-02-12 11:19:27 -05:00
Stephen Kelly c248a437c4 Add policy CMP0049 to avoid variable expansion in source lists 2014-02-12 11:17:38 -05:00
Stephen Kelly a0fa025377 Help: Mark up references to NEW and OLD policy settings properly. 2014-02-06 16:15:52 -05:00
Brad King 7e142c5ac2 project: Manage VERSION variables
Teach the project() command to set variables

  {PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK}

holding the project version number and its components.  Add project()
command option "VERSION" to specify the version explicitly, and default
to the empty string when it is not given.

Since this clears variables when no VERSION is given, this may change
behavior for existing projects that set the version variables themselves
prior to calling project().  Add policy CMP0048 for compatibility.

Suggested-by: Alex Neundorf <neundorf@kde.org>
2014-01-29 09:45:18 -05:00
Stephen Kelly e00db59d6c QNX: Introduce QCC compiler id for that QNX platform compiler.
Introduce policy CMP0047 to control resetting the id for
compatibility.

De-duplicate content in the QNX platform file by including the GNU
one. QNX is a form of GNU platform.

Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables.  They
are populated again later by the Compiler/GNU.cmake file anyway.

Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC
compiler id is in use, and the language is CXX.  Use the QNX
recommended flag for QCC instead of the gcc compatible -x flag.

Populate new module files to handle system includes and depfiles
when using the QCC compiler.

Remove code which unsets the system include and depfiles related
variables.  When a GNU driver is used instead of the QCC one, the
appropriate flags will be used.  These variables were previously
cleared for lowest-common-denominator compatibility with both
drivers.
2014-01-22 08:47:32 -05:00
Nils Gladitz 0bf6f13b1d AddDependencies: new policy requires dependencies to exist
Added new policy CMP0046 which requires dependencies added by
add_dependencies() to actually exist.
2014-01-12 12:58:04 +01:00
Brad King 98bdd78afc Merge topic 'extend-docs'
2f15a07 Help: Link to CMAKE_POLICY_DEFAULT_CMP<NNNN> in policies manual.
bb8bde3 Help: Add notes about relocatability of config-file packages.
2014-01-09 16:26:30 -05:00
Stephen Kelly 2f15a07727 Help: Link to CMAKE_POLICY_DEFAULT_CMP<NNNN> in policies manual. 2014-01-09 19:45:08 +01: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 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
Stephen Kelly d98ea6c0b8 Help: Mark some code blocks as containing cmake code. 2014-01-04 11:28:57 +01:00
Brad King 0d63bdd2d9 Merge topic 'rpath-default'
d25ad48 OS X: Add CMP0042 to enable MACOSX_RPATH by default
2014-01-02 14:23:09 -05:00
Clinton Stimpson d25ad482e9 OS X: Add CMP0042 to enable MACOSX_RPATH by default
Also adding documentation for CMAKE_MACOSX_RPATH, and improving
documentation for MACOSX_RPATH.
2014-01-02 13:41:49 -05:00
Stephen Kelly 8f849b9071 Help: Mention if(POLICY) and NO_POLICY_SCOPE in policies manual. 2013-12-20 12:32:43 +01:00
Stephen Kelly 5838aba1aa Export: Report error on relative include with genex.
Diagnostics which check the sanity of exported include paths
previously skipped over any path containing a generator expression.

Introduce a policy to issue an error message in such cases.

The export files created in the OLD behavior are not usable, because
they contain relative paths or paths to the source or build location
which are not suitable for use on installation. CMake will report an
error on import.
2013-11-26 13:01:55 +01:00
Nils Gladitz a02f3d2de0 Add policy CMP0040 to disallow custom commands on missing targets 2013-11-21 09:24:08 -05:00
Stephen Kelly 596b2a8c08 Disallow linking to utility targets (#13902). 2013-11-07 11:06:40 +01:00
Stephen Kelly 301bb5cdda Disallow link-to-self (#13947). 2013-11-07 11:06:39 +01:00
Stephen Kelly 05f5fde0eb Disallow invalid target names (#13140)
Exclude Borland and NMake from the CMP0037 test. They do not accept
the colon in a target name.
2013-11-07 11:06:39 +01:00
Brad King c76e44e7b9 Help: Limit reference manual toctree depth to 1
Add a :maxdepth: option to all toctree directives to limit their depth
to 1.  We do not want subheadings from individual documents to pollute
the already large lists of CMake Domain objects.
2013-11-01 11:12:02 -04:00
Brad King f88332f5b7 Help: Glob manual/*.rst in Sphinx configuration
Add the man page description line as explicit markup at the top of each
Help/manual/*.rst file and scan it from conf.py to automatically
generate the man_pages Sphinx configuration value.  This reduces the
number of places that need to be changed when a new manual is added.
2013-10-30 09:58:25 -04:00
Brad King 6c9194488a Add policy CMP0036 to disallow build_name 2013-10-22 09:09:53 -04:00
Brad King 3969bb23aa Add policy CMP0035 to disallow variable_requires 2013-10-22 09:09:52 -04:00
Brad King 178b9af186 Add policy CMP0034 to disallow utility_source 2013-10-22 09:09:52 -04:00
Brad King 248d1dc057 Add policy CMP0033 to disallow export_library_dependencies 2013-10-22 09:09:52 -04:00
Brad King 6865c8fe05 Add policy CMP0032 to disallow output_required_files 2013-10-22 09:09:52 -04:00
Brad King aa76518f8b Add policy CMP0031 to disallow load_command 2013-10-22 09:09:52 -04:00
Brad King 97268cf5b7 Add policy CMP0030 to disallow use_mangled_mesa 2013-10-22 09:09:51 -04:00
Brad King 9f64fbf5b5 Add policy CMP0029 to disallow subdir_depends 2013-10-22 09:09:51 -04:00
Brad King 0d9e8b1ab9 Merge topic 'double-colon-is-imported'
f063c45 Consider targets with double colons to be IMPORTED or ALIAS targets.
2013-10-22 09:07:40 -04:00
Stephen Kelly f063c45589 Consider targets with double colons to be IMPORTED or ALIAS targets.
Introduce a policy to control the behavior.

The AliasTargets unit test already tests that using a
double-semicolon in the name is not an error. Change the ExportImport
test to use a namespace with a double-semicolon too.
2013-10-21 15:56:31 +02:00
Stephen Kelly 6d50d0197a Help: Add introduction section to cmake-policies manual
Explain the concept behind policies.
2013-10-18 14:23:28 -04:00
Stephen Kelly 70ae6dfd92 Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors. 2013-10-18 10:11:49 -04:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00