summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/include_directories.rst2
-rw-r--r--Help/command/target_link_libraries.rst17
-rw-r--r--Help/manual/ccmake.1.rst8
-rw-r--r--Help/manual/cmake-commands.7.rst6
-rw-r--r--Help/manual/cmake-developer.7.rst10
-rw-r--r--Help/manual/cmake-generators.7.rst2
-rw-r--r--Help/manual/cmake-gui.1.rst10
-rw-r--r--Help/manual/cmake-modules.7.rst2
-rw-r--r--Help/manual/cmake-policies.7.rst2
-rw-r--r--Help/manual/cmake-properties.7.rst12
-rw-r--r--Help/manual/cmake-variables.7.rst14
-rw-r--r--Help/manual/cmake.1.rst15
-rw-r--r--Help/manual/cpack.1.rst6
-rw-r--r--Help/manual/ctest.1.rst6
-rw-r--r--Help/prop_tgt/INCLUDE_DIRECTORIES.rst13
-rw-r--r--Help/prop_tgt/INTERFACE_LINK_LIBRARIES.rst4
-rw-r--r--Help/prop_tgt/LINK_INTERFACE_LIBRARIES.rst2
-rw-r--r--Help/prop_tgt/LINK_INTERFACE_LIBRARIES_CONFIG.rst2
-rw-r--r--Help/variable/CMAKE_EDIT_COMMAND.rst2
-rw-r--r--Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst8
-rw-r--r--Help/variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE.rst8
-rw-r--r--Modules/CPack.cmake5
-rw-r--r--Modules/Compiler/Intel-C.cmake2
-rw-r--r--Modules/Compiler/Intel-CXX.cmake2
-rw-r--r--Modules/FindBoost.cmake45
-rw-r--r--Modules/FindJNI.cmake4
-rw-r--r--Modules/FindPHP4.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx7
-rw-r--r--Source/CTest/cmCTestP4.cxx12
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx63
-rw-r--r--Source/CTest/cmCTestScriptHandler.h3
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx44
-rw-r--r--Source/cmExportFileGenerator.cxx5
-rw-r--r--Source/cmFindCommon.cxx15
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx2
-rw-r--r--Source/cmGeneratorTarget.cxx23
-rw-r--r--Source/cmGeneratorTarget.h20
-rw-r--r--Source/cmGlobalGenerator.cxx9
-rw-r--r--Source/cmNinjaTargetGenerator.cxx13
-rw-r--r--Source/cmRST.cxx12
-rw-r--r--Source/cmRST.h2
-rw-r--r--Source/cmSystemTools.cxx49
-rw-r--r--Source/cmTarget.cxx266
-rw-r--r--Source/cmTarget.h14
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx19
-rw-r--r--Source/cmcmd.cxx2
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp13
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h14
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp8
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp7
-rw-r--r--Tests/CMakeLib/testRST.expect7
-rw-r--r--Tests/CMakeLib/testRST.rst7
-rw-r--r--Tests/CMakeLists.txt11
-rw-r--r--Tests/CPackComponentsForAll/CMakeLists.txt3
-rw-r--r--Tests/CPackComponentsForAll/license.txt3
-rw-r--r--Tests/CTestTestEmptyBinaryDirectory/test.cmake.in66
-rw-r--r--Tests/CTestUpdateCommon.cmake9
-rw-r--r--Tests/CTestUpdateP4.cmake.in1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe.cmake7
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared.cmake8
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt6
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt4
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-WARN.cmake5
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt1
-rw-r--r--Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake9
-rw-r--r--Tests/RunCMake/CMP0022/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/CMP0022/empty_vs6_4.cpp1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt26
-rw-r--r--Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake7
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/empty.c0
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-result.txt1
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt9
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource.cmake1
-rw-r--r--Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake1
83 files changed, 720 insertions, 345 deletions
diff --git a/Help/command/include_directories.rst b/Help/command/include_directories.rst
index 6744427..3e0c7a0 100644
--- a/Help/command/include_directories.rst
+++ b/Help/command/include_directories.rst
@@ -19,7 +19,7 @@ used by the generators.
By default the directories are appended onto the current list of
directories. This default behavior can be changed by setting
-CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON. By using AFTER or BEFORE
+:variable:`CMAKE_INCLUDE_DIRECTORIES_BEFORE` to ON. By using AFTER or BEFORE
explicitly, you can select between appending and prepending,
independent of the default.
diff --git a/Help/command/target_link_libraries.rst b/Help/command/target_link_libraries.rst
index 41265fd..c2d2dc6 100644
--- a/Help/command/target_link_libraries.rst
+++ b/Help/command/target_link_libraries.rst
@@ -32,13 +32,16 @@ per-configuration rules by creating and linking to IMPORTED library
targets. See the IMPORTED mode of the add_library command for more
information.
-Library dependencies are transitive by default. When this target is
-linked into another target then the libraries linked to this target
-will appear on the link line for the other target too. See the
-INTERFACE_LINK_LIBRARIES target property to override the set of
-transitive link dependencies for a target. Calls to other signatures
-of this command may set the property making any libraries linked
-exclusively by this signature private.
+Library dependencies are transitive by default with this signature.
+When this target is linked into another target then the libraries
+linked to this target will appear on the link line for the other
+target too. This transitive "link interface" is stored in the
+INTERFACE_LINK_LIBRARIES target property when policy CMP0022 is set to
+NEW and may be overridden by setting the property directly.
+(When CMP0022 is not set to NEW, transitive linking is builtin but may
+be overridden by the LINK_INTERFACE_LIBRARIES property. Calls to other
+signatures of this command may set the property making any libraries
+linked exclusively by this signature private.)
CMake will also propagate "usage requirements" from linked library
targets. Usage requirements affect compilation of sources in the
diff --git a/Help/manual/ccmake.1.rst b/Help/manual/ccmake.1.rst
index 0c4f47e..a5fe191 100644
--- a/Help/manual/ccmake.1.rst
+++ b/Help/manual/ccmake.1.rst
@@ -6,10 +6,9 @@ ccmake(1)
Synopsis
========
-::
+.. parsed-literal::
- ccmake <path-to-source>
- ccmake <path-to-existing-build>
+ ccmake [<options>] (<path-to-source> | <path-to-existing-build>)
Description
===========
@@ -25,6 +24,9 @@ in each directory of a source tree with the name CMakeLists.txt.
Users build a project by using CMake to generate a build system for a
native tool on their platform.
+Options
+=======
+
.. include:: OPTIONS_BUILD.txt
.. include:: OPTIONS_HELP.txt
diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst
index 9b23efa..fb0d2b5 100644
--- a/Help/manual/cmake-commands.7.rst
+++ b/Help/manual/cmake-commands.7.rst
@@ -13,6 +13,8 @@ Normal Commands
These commands may be used freely in CMake projects.
.. toctree::
+ :maxdepth: 1
+
/command/add_compile_options
/command/add_custom_command
/command/add_custom_target
@@ -105,6 +107,8 @@ These commands are available only for compatibility with older
versions of CMake. Do not use them in new code.
.. toctree::
+ :maxdepth: 1
+
/command/build_name
/command/exec_program
/command/export_library_dependencies
@@ -128,6 +132,8 @@ CTest Commands
These commands are available only in ctest scripts.
.. toctree::
+ :maxdepth: 1
+
/command/ctest_build
/command/ctest_configure
/command/ctest_coverage
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
index ee2016f..5d20c54 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -68,11 +68,21 @@ literal block after ``::``
space. We prefer the ``::`` to appear at the end of a paragraph
line instead of as its own line.
+``note`` directive
+ Call out a side note. The command-line help processor prints the
+ block content as if the lines were normal paragraph text with
+ interpretation.
+
``parsed-literal`` directive
Add a literal block with markup interpretation. The command-line
help processor prints the block content without the leading
directive line and with common indentation replaced by one space.
+``productionlist`` directive
+ Render context-free grammar productions. The command-line help
+ processor prints the block content as if the lines were normal
+ paragraph text with interpretation.
+
``replace`` directive
Define a ``|substitution|`` replacement.
The command-line help processor requires a substitution replacement
diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst
index a290d1a..ec1f58a 100644
--- a/Help/manual/cmake-generators.7.rst
+++ b/Help/manual/cmake-generators.7.rst
@@ -11,6 +11,8 @@ All Generators
==============
.. toctree::
+ :maxdepth: 1
+
/generator/Borland Makefiles
/generator/CodeBlocks - MinGW Makefiles
/generator/CodeBlocks - Ninja
diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst
index ff01332..032b51f 100644
--- a/Help/manual/cmake-gui.1.rst
+++ b/Help/manual/cmake-gui.1.rst
@@ -6,11 +6,10 @@ cmake-gui(1)
Synopsis
========
-::
+.. parsed-literal::
- cmake-gui [options]
- cmake-gui [options] <path-to-source>
- cmake-gui [options] <path-to-existing-build>
+ cmake-gui [<options>]
+ cmake-gui [<options>] (<path-to-source> | <path-to-existing-build>)
Description
===========
@@ -25,6 +24,9 @@ in each directory of a source tree with the name CMakeLists.txt.
Users build a project by using CMake to generate a build system for a
native tool on their platform.
+Options
+=======
+
.. include:: OPTIONS_HELP.txt
See Also
diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst
index 1f3e59f..01efcf7 100644
--- a/Help/manual/cmake-modules.7.rst
+++ b/Help/manual/cmake-modules.7.rst
@@ -11,6 +11,8 @@ All Modules
===========
.. toctree::
+ :maxdepth: 1
+
/module/AddFileDependencies
/module/BundleUtilities
/module/CheckCCompilerFlag
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index e3cf74d..5879a30 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -31,6 +31,8 @@ All Policies
============
.. toctree::
+ :maxdepth: 1
+
/policy/CMP0000
/policy/CMP0001
/policy/CMP0002
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 7fe1bf2..d6d42ad 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -11,6 +11,8 @@ Properties of Global Scope
==========================
.. toctree::
+ :maxdepth: 1
+
/prop_gbl/ALLOW_DUPLICATE_CUSTOM_TARGETS
/prop_gbl/AUTOGEN_TARGETS_FOLDER
/prop_gbl/AUTOMOC_TARGETS_FOLDER
@@ -39,6 +41,8 @@ Properties on Directories
=========================
.. toctree::
+ :maxdepth: 1
+
/prop_dir/ADDITIONAL_MAKE_CLEAN_FILES
/prop_dir/CACHE_VARIABLES
/prop_dir/CLEAN_NO_CUSTOM
@@ -68,6 +72,8 @@ Properties on Targets
=====================
.. toctree::
+ :maxdepth: 1
+
/prop_tgt/ALIASED_TARGET
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY_CONFIG
/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY
@@ -220,6 +226,8 @@ Properties on Tests
===================
.. toctree::
+ :maxdepth: 1
+
/prop_test/ATTACHED_FILES_ON_FAIL
/prop_test/ATTACHED_FILES
/prop_test/COST
@@ -241,6 +249,8 @@ Properties on Source Files
==========================
.. toctree::
+ :maxdepth: 1
+
/prop_sf/ABSTRACT
/prop_sf/AUTOUIC_OPTIONS
/prop_sf/AUTORCC_OPTIONS
@@ -265,6 +275,8 @@ Properties on Cache Entries
===========================
.. toctree::
+ :maxdepth: 1
+
/prop_cache/ADVANCED
/prop_cache/HELPSTRING
/prop_cache/MODIFIED
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 2fc02a1..59e8064 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -11,6 +11,8 @@ Variables that Provide Information
==================================
.. toctree::
+ :maxdepth: 1
+
/variable/CMAKE_ARGC
/variable/CMAKE_ARGV0
/variable/CMAKE_AR
@@ -76,6 +78,8 @@ Variables that Change Behavior
==============================
.. toctree::
+ :maxdepth: 1
+
/variable/BUILD_SHARED_LIBS
/variable/CMAKE_ABSOLUTE_DESTINATION_FILES
/variable/CMAKE_AUTOMOC_RELAXED_MODE
@@ -93,6 +97,8 @@ Variables that Change Behavior
/variable/CMAKE_FIND_NO_INSTALL_PREFIX
/variable/CMAKE_IGNORE_PATH
/variable/CMAKE_INCLUDE_PATH
+ /variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE
+ /variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
/variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
/variable/CMAKE_INSTALL_PREFIX
/variable/CMAKE_LIBRARY_PATH
@@ -116,6 +122,8 @@ Variables that Describe the System
==================================
.. toctree::
+ :maxdepth: 1
+
/variable/APPLE
/variable/BORLAND
/variable/CMAKE_CL_64
@@ -155,6 +163,8 @@ Variables that Control the Build
================================
.. toctree::
+ :maxdepth: 1
+
/variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY
/variable/CMAKE_AUTOMOC_MOC_OPTIONS
/variable/CMAKE_AUTOMOC
@@ -209,6 +219,8 @@ Variables for Languages
=======================
.. toctree::
+ :maxdepth: 1
+
/variable/CMAKE_COMPILER_IS_GNULANG
/variable/CMAKE_Fortran_MODDIR_DEFAULT
/variable/CMAKE_Fortran_MODDIR_FLAG
@@ -252,6 +264,8 @@ Variables for CPack
===================
.. toctree::
+ :maxdepth: 1
+
/variable/CPACK_ABSOLUTE_DESTINATION_FILES
/variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index f74402e..3594c3d 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -6,18 +6,20 @@ cmake(1)
Synopsis
========
-::
+.. parsed-literal::
- cmake [options] <path-to-source>
- cmake [options] <path-to-existing-build>
+ cmake [<options>] (<path-to-source> | <path-to-existing-build>)
+ cmake [(-D<var>=<value>)...] -P <cmake-script-file>
+ cmake --build <dir> [<options>] [-- <build-tool-options>...]
+ cmake -E <command> [<options>]
+ cmake --find-package <options>...
Description
===========
The "cmake" executable is the CMake command-line interface. It may be
used to configure projects in scripts. Project configuration settings
-may be specified on the command line with the -D option. The -i
-option will cause cmake to interactively prompt for such settings.
+may be specified on the command line with the -D option.
CMake is a cross-platform build system generator. Projects specify
their build process with platform-independent CMake listfiles included
@@ -25,6 +27,9 @@ in each directory of a source tree with the name CMakeLists.txt.
Users build a project by using CMake to generate a build system for a
native tool on their platform.
+Options
+=======
+
.. include:: OPTIONS_BUILD.txt
* ``-E``: CMake command mode.
diff --git a/Help/manual/cpack.1.rst b/Help/manual/cpack.1.rst
index 22e5d5a..5967d6f 100644
--- a/Help/manual/cpack.1.rst
+++ b/Help/manual/cpack.1.rst
@@ -6,9 +6,9 @@ cpack(1)
Synopsis
========
-::
+.. parsed-literal::
- cpack -G <generator> [options]
+ cpack -G <generator> [<options>]
Description
===========
@@ -24,6 +24,8 @@ in each directory of a source tree with the name CMakeLists.txt.
Users build a project by using CMake to generate a build system for a
native tool on their platform.
+Options
+=======
* ``-G <generator>``: Use the specified generator to generate package.
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 4a5f12e..ed9195e 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -6,9 +6,9 @@ ctest(1)
Synopsis
========
-::
+.. parsed-literal::
- ctest [options]
+ ctest [<options>]
Description
===========
@@ -18,6 +18,8 @@ CMake-generated build trees created for projects that use the
ENABLE_TESTING and ADD_TEST commands have testing support. This
program will run the tests and report results.
+Options
+=======
* ``-C <cfg>, --build-config <cfg>``: Choose configuration to test.
diff --git a/Help/prop_tgt/INCLUDE_DIRECTORIES.rst b/Help/prop_tgt/INCLUDE_DIRECTORIES.rst
index 40709a4..cf358b3 100644
--- a/Help/prop_tgt/INCLUDE_DIRECTORIES.rst
+++ b/Help/prop_tgt/INCLUDE_DIRECTORIES.rst
@@ -5,17 +5,20 @@ List of preprocessor include file search directories.
This property specifies the list of directories given so far to the
include_directories command. This property exists on directories and
-targets. In addition to accepting values from the include_directories
+targets. In addition to accepting values from the :command:`include_directories`
command, values may be set directly on any directory or any target
-using the set_property command. A target gets its initial value for
+using the :command:`set_property` command. A target gets its initial value for
this property from the value of the directory property. A directory
gets its initial value from its parent directory if it has one. Both
directory and target property values are adjusted by calls to the
-include_directories command.
+:command:`include_directories` command.
The target property values are used by the generators to set the
-include paths for the compiler. See also the include_directories
-command.
+include paths for the compiler. See also the :command:`include_directories`
+and :command:`target_include_directories` commands.
+
+Relative paths should not be added to this property directly. Use one of
+the commands above instead to handle relative paths.
Contents of INCLUDE_DIRECTORIES may use "generator expressions" with the
syntax "$<...>". See the :manual:`cmake-generator-expressions(7)` manual for
diff --git a/Help/prop_tgt/INTERFACE_LINK_LIBRARIES.rst b/Help/prop_tgt/INTERFACE_LINK_LIBRARIES.rst
index 24c2441..64ac46e 100644
--- a/Help/prop_tgt/INTERFACE_LINK_LIBRARIES.rst
+++ b/Help/prop_tgt/INTERFACE_LINK_LIBRARIES.rst
@@ -1,12 +1,12 @@
INTERFACE_LINK_LIBRARIES
------------------------
-List public interface libraries for a shared library or executable.
+List public interface libraries for a library.
This property contains the list of transitive link dependencies. When
the target is linked into another target the libraries listed (and
recursively their link interface libraries) will be provided to the
-other target also. This property is overriden by the
+other target also. This property is overridden by the
LINK_INTERFACE_LIBRARIES or LINK_INTERFACE_LIBRARIES_<CONFIG> property
if policy CMP0022 is OLD or unset.
diff --git a/Help/prop_tgt/LINK_INTERFACE_LIBRARIES.rst b/Help/prop_tgt/LINK_INTERFACE_LIBRARIES.rst
index 75c2a31..435e25e 100644
--- a/Help/prop_tgt/LINK_INTERFACE_LIBRARIES.rst
+++ b/Help/prop_tgt/LINK_INTERFACE_LIBRARIES.rst
@@ -16,7 +16,7 @@ the default set is non-empty. This property is initialized by the
value of the variable CMAKE_LINK_INTERFACE_LIBRARIES if it is set when
a target is created. This property is ignored for STATIC libraries.
-This property is overriden by the INTERFACE_LINK_LIBRARIES property if
+This property is overridden by the INTERFACE_LINK_LIBRARIES property if
policy CMP0022 is NEW.
This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.
diff --git a/Help/prop_tgt/LINK_INTERFACE_LIBRARIES_CONFIG.rst b/Help/prop_tgt/LINK_INTERFACE_LIBRARIES_CONFIG.rst
index 1a7a941..08bd650 100644
--- a/Help/prop_tgt/LINK_INTERFACE_LIBRARIES_CONFIG.rst
+++ b/Help/prop_tgt/LINK_INTERFACE_LIBRARIES_CONFIG.rst
@@ -7,7 +7,7 @@ This is the configuration-specific version of
LINK_INTERFACE_LIBRARIES. If set, this property completely overrides
the generic property for the named configuration.
-This property is overriden by the INTERFACE_LINK_LIBRARIES property if
+This property is overridden by the INTERFACE_LINK_LIBRARIES property if
policy CMP0022 is NEW.
This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.
diff --git a/Help/variable/CMAKE_EDIT_COMMAND.rst b/Help/variable/CMAKE_EDIT_COMMAND.rst
index 24d26b5..a5c13f4 100644
--- a/Help/variable/CMAKE_EDIT_COMMAND.rst
+++ b/Help/variable/CMAKE_EDIT_COMMAND.rst
@@ -4,4 +4,4 @@ CMAKE_EDIT_COMMAND
Full path to cmake-gui or ccmake.
This is the full path to the CMake executable that can graphically
-edit the cache. For example, cmake-gui, ccmake, or cmake -i.
+edit the cache. For example, cmake-gui or ccmake.
diff --git a/Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst b/Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst
new file mode 100644
index 0000000..3c1fbcf
--- /dev/null
+++ b/Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst
@@ -0,0 +1,8 @@
+CMAKE_INCLUDE_DIRECTORIES_BEFORE
+--------------------------------
+
+Whether to append or prepend directories by default in :command:`include_directories`.
+
+This variable affects the default behavior of the :command:`include_directories`
+command. Setting this variable to 'ON' is equivalent to using the BEFORE option
+in all uses of that command.
diff --git a/Help/variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE.rst b/Help/variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE.rst
new file mode 100644
index 0000000..cbd04d7
--- /dev/null
+++ b/Help/variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE.rst
@@ -0,0 +1,8 @@
+CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
+----------------------------------------
+
+Whether to force prepending of project include directories.
+
+This variable affects the order of include directories generated in compiler
+command lines. If set to 'ON', it causes the :variable:`CMAKE_SOURCE_DIR` and
+the :variable:`CMAKE_BINARY_DIR` to appear first.
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index da6b2e0..2d641f5 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -519,6 +519,11 @@ cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
# WiX specific variables
cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
+# set sysroot so SDK tools can be used
+if(CMAKE_OSX_SYSROOT)
+ cpack_set_if_not_set(CPACK_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
+endif()
+
if(DEFINED CPACK_COMPONENTS_ALL)
if(CPACK_MONOLITHIC_INSTALL)
message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
index 5b43db9..7d98f03 100644
--- a/Modules/Compiler/Intel-C.cmake
+++ b/Modules/Compiler/Intel-C.cmake
@@ -6,6 +6,8 @@ set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
+set(CMAKE_DEPFILE_FLAGS_C "-MMD -MT <OBJECT> -MF <DEPFILE>")
+
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_C_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
endif()
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 35bb3ec..36a838d 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -6,6 +6,8 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
+set(CMAKE_DEPFILE_FLAGS_CXX "-MMD -MT <OBJECT> -MF <DEPFILE>")
+
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
endif()
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 6e1c926..51a3d77 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -4,9 +4,7 @@
#
# Find Boost include dirs and libraries
#
-# Use this module by invoking find_package with the form:
-#
-# ::
+# Use this module by invoking find_package with the form::
#
# find_package(Boost
# [version] [EXACT] # Minimum or EXACT version e.g. 1.36.0
@@ -17,9 +15,7 @@
# This module finds headers and requested component libraries OR a CMake
# package configuration file provided by a "Boost CMake" build. For the
# latter case skip to the "Boost CMake" section below. For the former
-# case results are reported in variables:
-#
-# ::
+# case results are reported in variables::
#
# Boost_FOUND - True if headers and requested libraries were found
# Boost_INCLUDE_DIRS - Boost include directories
@@ -38,11 +34,7 @@
# information about Boost's automatic linking
# displayed during compilation
#
-#
-#
-# This module reads hints about search locations from variables:
-#
-# ::
+# This module reads hints about search locations from variables::
#
# BOOST_ROOT - Preferred installation prefix
# (or BOOSTROOT)
@@ -54,9 +46,7 @@
# - List of Boost versions not known to this module
# (Boost install locations may contain the version)
#
-# and saves search results persistently in CMake cache entries:
-#
-# ::
+# and saves search results persistently in CMake cache entries::
#
# Boost_INCLUDE_DIR - Directory containing Boost headers
# Boost_LIBRARY_DIR - Directory containing Boost libraries
@@ -83,9 +73,7 @@
#
# Boost libraries come in many variants encoded in their file name.
# Users or projects may tell this module which variant to find by
-# setting variables:
-#
-# ::
+# setting variables::
#
# Boost_USE_MULTITHREADED - Set to OFF to use the non-multithreaded
# libraries ('mt' tag). Default is ON.
@@ -109,9 +97,7 @@
# such as "pthread" or "win32". Names with
# and without this suffix will both be tried.
#
-# Other variables one may set to control this module are:
-#
-# ::
+# Other variables one may set to control this module are::
#
# Boost_DEBUG - Set to ON to enable debug output from FindBoost.
# Please enable this before filing any bug report.
@@ -132,17 +118,13 @@
# to be linked explicitly or available in the link library search path.
# In this case setting Boost_USE_STATIC_LIBS to OFF may not achieve
# dynamic linking. Boost automatic linking typically requests static
-# libraries with a few exceptions (such as Boost.Python). Use
-#
-# ::
+# libraries with a few exceptions (such as Boost.Python). Use::
#
# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
#
# to ask Boost to report information about automatic linking requests.
#
-# Example to find Boost headers only:
-#
-# ::
+# Example to find Boost headers only::
#
# find_package(Boost 1.36.0)
# if(Boost_FOUND)
@@ -150,11 +132,9 @@
# add_executable(foo foo.cc)
# endif()
#
-# Example to find Boost headers and some libraries:
+# Example to find Boost headers and some *static* libraries::
#
-# ::
-#
-# set(Boost_USE_STATIC_LIBS ON)
+# set(Boost_USE_STATIC_LIBS ON) # only find static libs
# set(Boost_USE_MULTITHREADED ON)
# set(Boost_USE_STATIC_RUNTIME OFF)
# find_package(Boost 1.36.0 COMPONENTS date_time filesystem system ...)
@@ -164,9 +144,8 @@
# target_link_libraries(foo ${Boost_LIBRARIES})
# endif()
#
-#
-#
-# Boost CMake ----------------------------------------------------------
+# Boost CMake
+# ^^^^^^^^^^^
#
# If Boost was built using the boost-cmake project it provides a package
# configuration file for use with find_package's Config mode. This
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 1780a8e..29a247d 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -39,7 +39,7 @@ macro(java_append_library_directories _var)
# 1.6.0_18 + icedtea patches. However, it would be much better to base the
# guess on the first part of the GNU config.guess platform triplet.
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
- set(_java_libarch "amd64")
+ set(_java_libarch "amd64" "i386")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
set(_java_libarch "i386")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")
@@ -52,7 +52,7 @@ macro(java_append_library_directories _var)
# endianess of the underlying system.
set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "mips" "mipsel" "mipseb")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
- set(_java_libarch "ppc64")
+ set(_java_libarch "ppc64" "ppc")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
set(_java_libarch "ppc")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
diff --git a/Modules/FindPHP4.cmake b/Modules/FindPHP4.cmake
index 51a89f3..25fff8c 100644
--- a/Modules/FindPHP4.cmake
+++ b/Modules/FindPHP4.cmake
@@ -46,7 +46,7 @@ if(PHP4_FOUND_INCLUDE_PATH)
foreach(php4_path Zend main TSRM)
set(php4_paths ${php4_paths} "${PHP4_FOUND_INCLUDE_PATH}/${php4_path}")
endforeach()
- set(PHP4_INCLUDE_PATH "${php4_paths}" INTERNAL "PHP4 include paths")
+ set(PHP4_INCLUDE_PATH "${php4_paths}")
endif()
find_program(PHP4_EXECUTABLE NAMES php4 php )
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index f2dd3bd..b68fdaf 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 12)
-set(CMake_VERSION_TWEAK 20131101)
+set(CMake_VERSION_TWEAK 20131105)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index d973c01..dfb2f15 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -474,7 +474,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
udco_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
udco_image_command << " convert \"" << temp_image << "\"";
udco_image_command << " -format UDCO";
- udco_image_command << " -o \"" << temp_udco << "\"";
+ udco_image_command << " -ov -o \"" << temp_udco << "\"";
std::string error;
if(!this->RunCommand(udco_image_command, &error))
@@ -504,6 +504,11 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// Rez the SLA
cmOStringStream embed_sla_command;
embed_sla_command << this->GetOption("CPACK_COMMAND_REZ");
+ const char* sysroot = this->GetOption("CPACK_OSX_SYSROOT");
+ if(sysroot && sysroot[0] != '\0')
+ {
+ embed_sla_command << " -isysroot \"" << sysroot << "\"";
+ }
embed_sla_command << " \"" << sla_r << "\"";
embed_sla_command << " -a -o ";
embed_sla_command << "\"" << temp_udco << "\"";
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index a504157..0058721 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -144,17 +144,7 @@ private:
if(!this->Line.empty() && this->Line[0] == '='
&& this->RegexDiff.find(this->Line))
{
- std::string Path = this->RegexDiff.match(1);
- // See if we need to remove the //depot prefix
- if(Path.length() > 2 && Path[0] == '/' && Path[1] == '/')
- {
- size_t found = Path.find('/', 2);
- if(found != std::string::npos)
- {
- Path = Path.substr(found + 1);
- }
- }
- CurrentPath = Path;
+ CurrentPath = this->RegexDiff.match(1);
AlreadyNotified = false;
}
else
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 64bcd59..7d33cf3 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -22,6 +22,7 @@
//#include <cmsys/RegularExpression.hxx>
#include <cmsys/Process.h>
+#include <cmsys/Directory.hxx>
// used for sleep
#ifdef _WIN32
@@ -1056,15 +1057,71 @@ bool cmCTestScriptHandler::EmptyBinaryDirectory(const char *sname)
return false;
}
+ // consider non existing target directory a success
+ if(!cmSystemTools::FileExists(sname))
+ {
+ return true;
+ }
+
// try to avoid deleting directories that we shouldn't
std::string check = sname;
check += "/CMakeCache.txt";
- if(cmSystemTools::FileExists(check.c_str()) &&
- !cmSystemTools::RemoveADirectory(sname))
+
+ if(!cmSystemTools::FileExists(check.c_str()))
{
return false;
}
- return true;
+
+ for(int i = 0; i < 5; ++i)
+ {
+ if(TryToRemoveBinaryDirectoryOnce(sname))
+ {
+ return true;
+ }
+ cmSystemTools::Delay(100);
+ }
+
+ return false;
+}
+
+//-------------------------------------------------------------------------
+bool cmCTestScriptHandler::TryToRemoveBinaryDirectoryOnce(
+ const std::string& directoryPath)
+{
+ cmsys::Directory directory;
+ directory.Load(directoryPath.c_str());
+
+ for(unsigned long i = 0; i < directory.GetNumberOfFiles(); ++i)
+ {
+ std::string path = directory.GetFile(i);
+
+ if(path == "." || path == ".." || path == "CMakeCache.txt")
+ {
+ continue;
+ }
+
+ std::string fullPath = directoryPath + std::string("/") + path;
+
+ bool isDirectory = cmSystemTools::FileIsDirectory(fullPath.c_str()) &&
+ !cmSystemTools::FileIsSymlink(fullPath.c_str());
+
+ if(isDirectory)
+ {
+ if(!cmSystemTools::RemoveADirectory(fullPath.c_str()))
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if(!cmSystemTools::RemoveFile(fullPath.c_str()))
+ {
+ return false;
+ }
+ }
+ }
+
+ return cmSystemTools::RemoveADirectory(directoryPath.c_str());
}
//-------------------------------------------------------------------------
diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h
index 80d5831..44e9dd0 100644
--- a/Source/CTest/cmCTestScriptHandler.h
+++ b/Source/CTest/cmCTestScriptHandler.h
@@ -135,6 +135,9 @@ private:
// Add ctest command
void AddCTestCommand(cmCTestCommand* command);
+ // Try to remove the binary directory once
+ static bool TryToRemoveBinaryDirectoryOnce(const std::string& directoryPath);
+
std::vector<cmStdString> ConfigurationScripts;
std::vector<bool> ScriptProcessScope;
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index a4dfdc9..a7665c8 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -1230,7 +1230,7 @@ void CMakeSetupDialog::doOutputFindNext(bool directionForward)
QString search = this->FindHistory.front();
- QTextCursor cursor = this->Output->textCursor();
+ QTextCursor textCursor = this->Output->textCursor();
QTextDocument* document = this->Output->document();
QTextDocument::FindFlags flags;
if (!directionForward)
@@ -1238,67 +1238,67 @@ void CMakeSetupDialog::doOutputFindNext(bool directionForward)
flags |= QTextDocument::FindBackward;
}
- cursor = document->find(search, cursor, flags);
+ textCursor = document->find(search, textCursor, flags);
- if (cursor.isNull())
+ if (textCursor.isNull())
{
// first search found nothing, wrap around and search again
- cursor = this->Output->textCursor();
- cursor.movePosition(directionForward ? QTextCursor::Start
- : QTextCursor::End);
- cursor = document->find(search, cursor, flags);
+ textCursor = this->Output->textCursor();
+ textCursor.movePosition(directionForward ? QTextCursor::Start
+ : QTextCursor::End);
+ textCursor = document->find(search, textCursor, flags);
}
- if (cursor.hasSelection())
+ if (textCursor.hasSelection())
{
- this->Output->setTextCursor(cursor);
+ this->Output->setTextCursor(textCursor);
}
}
void CMakeSetupDialog::doOutputErrorNext()
{
- QTextCursor cursor = this->Output->textCursor();
+ QTextCursor textCursor = this->Output->textCursor();
bool atEnd = false;
// move cursor out of current error-block
- if (cursor.blockCharFormat() == this->ErrorFormat)
+ if (textCursor.blockCharFormat() == this->ErrorFormat)
{
- atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+ atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
}
// move cursor to next error-block
- while (cursor.blockCharFormat() != this->ErrorFormat && !atEnd)
+ while (textCursor.blockCharFormat() != this->ErrorFormat && !atEnd)
{
- atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+ atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
}
if (atEnd)
{
// first search found nothing, wrap around and search again
- atEnd = !cursor.movePosition(QTextCursor::Start);
+ atEnd = !textCursor.movePosition(QTextCursor::Start);
// move cursor to next error-block
- while (cursor.blockCharFormat() != this->ErrorFormat && !atEnd)
+ while (textCursor.blockCharFormat() != this->ErrorFormat && !atEnd)
{
- atEnd = !cursor.movePosition(QTextCursor::NextBlock);
+ atEnd = !textCursor.movePosition(QTextCursor::NextBlock);
}
}
if (!atEnd)
{
- cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
+ textCursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
QTextCharFormat selectionFormat;
selectionFormat.setBackground(Qt::yellow);
- QTextEdit::ExtraSelection extraSelection = {cursor, selectionFormat};
+ QTextEdit::ExtraSelection extraSelection = {textCursor, selectionFormat};
this->Output->setExtraSelections(QList<QTextEdit::ExtraSelection>()
<< extraSelection);
// make the whole error-block visible
- this->Output->setTextCursor(cursor);
+ this->Output->setTextCursor(textCursor);
// remove the selection to see the extraSelection
- cursor.setPosition(cursor.anchor());
- this->Output->setTextCursor(cursor);
+ textCursor.setPosition(textCursor.anchor());
+ this->Output->setTextCursor(textCursor);
}
}
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 03e8dff..fdc075e 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -191,6 +191,10 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty(
ImportPropertyMap &properties,
std::vector<std::string> &missingTargets)
{
+ if(!target->IsLinkable())
+ {
+ return false;
+ }
const char *input = target->GetProperty("INTERFACE_LINK_LIBRARIES");
if (input)
{
@@ -654,6 +658,7 @@ cmExportFileGenerator
if (iface->ImplementationIsInterface)
{
+ // Policy CMP0022 must not be NEW.
this->SetImportLinkProperty(suffix, target,
"IMPORTED_LINK_INTERFACE_LIBRARIES",
iface->Libraries, properties, missingTargets);
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx
index 97a20ce..7beeda0 100644
--- a/Source/cmFindCommon.cxx
+++ b/Source/cmFindCommon.cxx
@@ -140,25 +140,14 @@ void cmFindCommon::RerootPaths(std::vector<std::string>& paths)
}
const char* rootPath =
this->Makefile->GetDefinition("CMAKE_FIND_ROOT_PATH");
- const char* osxRootPath =
- this->Makefile->GetDefinition("_CMAKE_OSX_SYSROOT_PATH");
- const bool noRootPath = !rootPath || !*rootPath;
- const bool noOSXRootPath = !osxRootPath || !*osxRootPath;
- if(noRootPath && noOSXRootPath)
+ if((rootPath == 0) || (strlen(rootPath) == 0))
{
return;
}
// Construct the list of path roots with no trailing slashes.
std::vector<std::string> roots;
- if(rootPath)
- {
- cmSystemTools::ExpandListArgument(rootPath, roots);
- }
- if(osxRootPath)
- {
- roots.push_back(osxRootPath);
- }
+ cmSystemTools::ExpandListArgument(rootPath, roots);
for(std::vector<std::string>::iterator ri = roots.begin();
ri != roots.end(); ++ri)
{
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 5374451..107ef73 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -1341,7 +1341,7 @@ struct TargetFilesystemArtifact : public cmGeneratorExpressionNode
"No target \"" + name + "\"");
return std::string();
}
- if(target->GetType() >= cmTarget::UTILITY &&
+ if(target->GetType() >= cmTarget::OBJECT_LIBRARY &&
target->GetType() != cmTarget::UNKNOWN_LIBRARY)
{
::reportError(context, content->GetOriginalExpression(),
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index b512675..b964f71 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -42,16 +42,16 @@ const char *cmGeneratorTarget::GetName() const
}
//----------------------------------------------------------------------------
-const char *cmGeneratorTarget::GetProperty(const char *prop)
+const char *cmGeneratorTarget::GetProperty(const char *prop) const
{
return this->Target->GetProperty(prop);
}
//----------------------------------------------------------------------------
std::vector<cmSourceFile*> const*
-cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf)
+cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf) const
{
- SourceEntriesType::iterator i = this->SourceEntries.find(sf);
+ SourceEntriesType::const_iterator i = this->SourceEntries.find(sf);
if(i != this->SourceEntries.end())
{
return &i->second.Depends;
@@ -61,7 +61,7 @@ cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf)
//----------------------------------------------------------------------------
bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
- const char *config)
+ const char *config) const
{
std::string config_upper;
if(config && *config)
@@ -70,7 +70,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
}
typedef std::map<std::string, std::vector<std::string> > IncludeCacheType;
- IncludeCacheType::iterator iter =
+ IncludeCacheType::const_iterator iter =
this->SystemIncludesCache.find(config_upper);
if (iter == this->SystemIncludesCache.end())
@@ -111,13 +111,13 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const char *dir,
}
//----------------------------------------------------------------------------
-bool cmGeneratorTarget::GetPropertyAsBool(const char *prop)
+bool cmGeneratorTarget::GetPropertyAsBool(const char *prop) const
{
return this->Target->GetPropertyAsBool(prop);
}
//----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles()
+std::vector<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles() const
{
return this->Target->GetSourceFiles();
}
@@ -270,7 +270,8 @@ void cmGeneratorTarget::LookupObjectLibraries()
}
//----------------------------------------------------------------------------
-void cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs)
+void
+cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs) const
{
for(std::vector<cmTarget*>::const_iterator
ti = this->ObjectLibraries.begin();
@@ -571,7 +572,7 @@ void cmGeneratorTarget::TraceDependencies()
//----------------------------------------------------------------------------
void cmGeneratorTarget::GetAppleArchs(const char* config,
- std::vector<std::string>& archVec)
+ std::vector<std::string>& archVec) const
{
const char* archs = 0;
if(config && *config)
@@ -591,7 +592,7 @@ void cmGeneratorTarget::GetAppleArchs(const char* config,
}
//----------------------------------------------------------------------------
-const char* cmGeneratorTarget::GetCreateRuleVariable()
+const char* cmGeneratorTarget::GetCreateRuleVariable() const
{
switch(this->GetType())
{
@@ -617,7 +618,7 @@ std::vector<std::string> cmGeneratorTarget::GetIncludeDirectories(
}
//----------------------------------------------------------------------------
-void cmGeneratorTarget::GenerateTargetManifest(const char* config)
+void cmGeneratorTarget::GenerateTargetManifest(const char* config) const
{
if (this->Target->IsImported())
{
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index a99f54b..177bc25 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -28,9 +28,9 @@ public:
int GetType() const;
const char *GetName() const;
- const char *GetProperty(const char *prop);
- bool GetPropertyAsBool(const char *prop);
- std::vector<cmSourceFile*> const& GetSourceFiles();
+ const char *GetProperty(const char *prop) const;
+ bool GetPropertyAsBool(const char *prop) const;
+ std::vector<cmSourceFile*> const& GetSourceFiles() const;
cmTarget* Target;
cmMakefile* Makefile;
@@ -60,22 +60,22 @@ public:
std::vector<cmTarget*> ObjectLibraries;
- void UseObjectLibraries(std::vector<std::string>& objs);
+ void UseObjectLibraries(std::vector<std::string>& objs) const;
void GetAppleArchs(const char* config,
- std::vector<std::string>& archVec);
+ std::vector<std::string>& archVec) const;
///! Return the rule variable used to create this type of target,
// need to add CMAKE_(LANG) for full name.
- const char* GetCreateRuleVariable();
+ const char* GetCreateRuleVariable() const;
/** Get the include directories for this target. */
std::vector<std::string> GetIncludeDirectories(const char *config);
- bool IsSystemIncludeDirectory(const char *dir, const char *config);
+ bool IsSystemIncludeDirectory(const char *dir, const char *config) const;
/** Add the target output files to the global generator manifest. */
- void GenerateTargetManifest(const char* config);
+ void GenerateTargetManifest(const char* config) const;
/**
* Trace through the source files in this target and add al source files
@@ -87,14 +87,14 @@ public:
void LookupObjectLibraries();
/** Get sources that must be built before the given source. */
- std::vector<cmSourceFile*> const* GetSourceDepends(cmSourceFile* sf);
+ std::vector<cmSourceFile*> const* GetSourceDepends(cmSourceFile* sf) const;
struct SourceEntry { std::vector<cmSourceFile*> Depends; };
typedef std::map<cmSourceFile*, SourceEntry> SourceEntriesType;
SourceEntriesType SourceEntries;
private:
- std::map<std::string, std::vector<std::string> > SystemIncludesCache;
+ mutable std::map<std::string, std::vector<std::string> > SystemIncludesCache;
cmGeneratorTarget(cmGeneratorTarget const&);
void operator=(cmGeneratorTarget const&);
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8a8d61a..dd7311e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -979,6 +979,14 @@ void cmGlobalGenerator::Configure()
delete this->LocalGenerators[i];
}
this->LocalGenerators.clear();
+ for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
+ li = this->EvaluationFiles.begin();
+ li != this->EvaluationFiles.end();
+ ++li)
+ {
+ delete *li;
+ }
+ this->EvaluationFiles.clear();
this->TargetDependencies.clear();
this->TotalTargets.clear();
this->ImportedTargets.clear();
@@ -1242,6 +1250,7 @@ bool cmGlobalGenerator::CheckTargets()
target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY ||
+ target.GetType() == cmTarget::OBJECT_LIBRARY ||
target.GetType() == cmTarget::UTILITY)
{
if(!target.FindSourceFiles())
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index a6f8159..26eadbe 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -398,11 +398,14 @@ cmNinjaTargetGenerator
depfile = "$DEP_FILE";
const std::string flagsName = "CMAKE_DEPFILE_FLAGS_" + lang;
std::string depfileFlags = mf->GetSafeDefinition(flagsName.c_str());
- cmSystemTools::ReplaceString(depfileFlags, "<DEPFILE>", "$DEP_FILE");
- cmSystemTools::ReplaceString(depfileFlags, "<OBJECT>", "$out");
- cmSystemTools::ReplaceString(depfileFlags, "<CMAKE_C_COMPILER>",
- mf->GetDefinition("CMAKE_C_COMPILER"));
- flags += " " + depfileFlags;
+ if (!depfileFlags.empty())
+ {
+ cmSystemTools::ReplaceString(depfileFlags, "<DEPFILE>", "$DEP_FILE");
+ cmSystemTools::ReplaceString(depfileFlags, "<OBJECT>", "$out");
+ cmSystemTools::ReplaceString(depfileFlags, "<CMAKE_C_COMPILER>",
+ mf->GetDefinition("CMAKE_C_COMPILER"));
+ flags += " " + depfileFlags;
+ }
}
vars.Flags = flags.c_str();
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index 6d4e281..3aa8e1b 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -34,6 +34,8 @@ cmRST::cmRST(std::ostream& os, std::string const& docroot):
ReplaceDirective("^.. (\\|[^|]+\\|) replace::[ \t]*(.*)$"),
IncludeDirective("^.. include::[ \t]+([^ \t\n]+)$"),
TocTreeDirective("^.. toctree::[ \t]*(.*)$"),
+ ProductionListDirective("^.. productionlist::[ \t]*(.*)$"),
+ NoteDirective("^.. note::[ \t]*(.*)$"),
ModuleRST("^#\\[(=*)\\[\\.rst:$"),
CMakeRole("(:cmake)?:("
"command|generator|variable|module|policy|"
@@ -227,6 +229,16 @@ void cmRST::ProcessLine(std::string const& line)
this->Directive = DirectiveTocTree;
this->MarkupLines.push_back(this->TocTreeDirective.match(1));
}
+ else if(this->ProductionListDirective.find(line))
+ {
+ // Output productionlist directives and their content normally.
+ this->NormalLine(line);
+ }
+ else if(this->NoteDirective.find(line))
+ {
+ // Output note directives and their content normally.
+ this->NormalLine(line);
+ }
}
// An explicit markup start followed nothing but whitespace and a
// blank line does not consume any indented text following.
diff --git a/Source/cmRST.h b/Source/cmRST.h
index fa987cd..3356008 100644
--- a/Source/cmRST.h
+++ b/Source/cmRST.h
@@ -84,6 +84,8 @@ private:
cmsys::RegularExpression ReplaceDirective;
cmsys::RegularExpression IncludeDirective;
cmsys::RegularExpression TocTreeDirective;
+ cmsys::RegularExpression ProductionListDirective;
+ cmsys::RegularExpression NoteDirective;
cmsys::RegularExpression ModuleRST;
cmsys::RegularExpression CMakeRole;
cmsys::RegularExpression Substitution;
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 8320ecf..1ecda88 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1619,18 +1619,23 @@ bool extract_tar(const char* outFileName, bool verbose,
archive_error_string(a));
break;
}
- if (verbose && extract)
+ if(verbose)
{
- cmSystemTools::Stdout("x ");
- cmSystemTools::Stdout(archive_entry_pathname(entry));
- }
- if(verbose && !extract)
- {
- list_item_verbose(stdout, entry);
+ if(extract)
+ {
+ cmSystemTools::Stdout("x ");
+ cmSystemTools::Stdout(archive_entry_pathname(entry));
+ }
+ else
+ {
+ list_item_verbose(stdout, entry);
+ }
+ cmSystemTools::Stdout("\n");
}
else if(!extract)
{
cmSystemTools::Stdout(archive_entry_pathname(entry));
+ cmSystemTools::Stdout("\n");
}
if(extract)
{
@@ -1644,15 +1649,7 @@ bool extract_tar(const char* outFileName, bool verbose,
}
r = archive_write_header(ext, entry);
- if (r != ARCHIVE_OK)
- {
- cmSystemTools::Error("Problem with archive_write_header(): ",
- archive_error_string(ext));
- cmSystemTools::Error("Current file: ",
- archive_entry_pathname(entry));
- break;
- }
- else
+ if (r == ARCHIVE_OK)
{
copy_data(a, ext);
r = archive_write_finish_entry(ext);
@@ -1663,10 +1660,22 @@ bool extract_tar(const char* outFileName, bool verbose,
break;
}
}
- }
- if (verbose || !extract)
- {
- cmSystemTools::Stdout("\n");
+#ifdef _WIN32
+ else if(const char* linktext = archive_entry_symlink(entry))
+ {
+ std::cerr << "cmake -E tar: warning: skipping symbolic link \""
+ << archive_entry_pathname(entry) << "\" -> \""
+ << linktext << "\"." << std::endl;
+ }
+#endif
+ else
+ {
+ cmSystemTools::Error("Problem with archive_write_header(): ",
+ archive_error_string(ext));
+ cmSystemTools::Error("Current file: ",
+ archive_entry_pathname(entry));
+ break;
+ }
}
}
archive_read_close(a);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 70ab947..d0390f7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -81,10 +81,12 @@ class cmTargetInternals
public:
cmTargetInternals()
{
+ this->PolicyWarnedCMP0022 = false;
this->SourceFileFlagsConstructed = false;
}
cmTargetInternals(cmTargetInternals const&)
{
+ this->PolicyWarnedCMP0022 = false;
this->SourceFileFlagsConstructed = false;
}
~cmTargetInternals();
@@ -104,6 +106,7 @@ public:
typedef std::map<TargetConfigPair, OptionalLinkInterface>
LinkInterfaceMapType;
LinkInterfaceMapType LinkInterfaceMap;
+ bool PolicyWarnedCMP0022;
typedef std::map<cmStdString, cmTarget::OutputInfo> OutputInfoMapType;
OutputInfoMapType OutputInfoMap;
@@ -507,7 +510,7 @@ bool cmTarget::FindSourceFiles()
}
//----------------------------------------------------------------------------
-std::vector<cmSourceFile*> const& cmTarget::GetSourceFiles()
+std::vector<cmSourceFile*> const& cmTarget::GetSourceFiles() const
{
return this->SourceFiles;
}
@@ -685,21 +688,10 @@ void cmTarget::MergeLinkLibraries( cmMakefile& mf,
i += this->PrevLinkedLibraries.size();
for( ; i != libs.end(); ++i )
{
- const char *lib = i->first.c_str();
- // We call this so that the dependencies get written to the cache
- this->AddLinkLibrary( mf, selfname, lib, i->second );
-
- if (this->GetType() == cmTarget::STATIC_LIBRARY)
- {
- std::string configLib = this->GetDebugGeneratorExpressions(lib,
- i->second);
- if (cmGeneratorExpression::IsValidTargetName(lib)
- || cmGeneratorExpression::Find(lib) != std::string::npos)
- {
- configLib = "$<LINK_ONLY:" + configLib + ">";
- }
- this->AppendProperty("INTERFACE_LINK_LIBRARIES", configLib.c_str());
- }
+ // This is equivalent to the target_link_libraries plain signature.
+ this->AddLinkLibrary( mf, selfname, i->first.c_str(), i->second );
+ this->AppendProperty("INTERFACE_LINK_LIBRARIES",
+ this->GetDebugGeneratorExpressions(i->first.c_str(), i->second).c_str());
}
this->PrevLinkedLibraries = libs;
}
@@ -3086,7 +3078,7 @@ std::string cmTarget::GetSOName(const char* config) const
}
//----------------------------------------------------------------------------
-bool cmTarget::HasMacOSXRpath(const char* config)
+bool cmTarget::HasMacOSXRpath(const char* config) const
{
bool install_name_is_rpath = false;
bool macosx_rpath = this->GetPropertyAsBool("MACOSX_RPATH");
@@ -3233,7 +3225,7 @@ cmTarget::GetFullNameImported(const char* config, bool implib) const
//----------------------------------------------------------------------------
void cmTarget::GetFullNameComponents(std::string& prefix, std::string& base,
std::string& suffix, const char* config,
- bool implib)
+ bool implib) const
{
this->GetFullNameInternal(config, implib, prefix, base, suffix);
}
@@ -3669,7 +3661,7 @@ bool cmTarget::HaveInstallTreeRPATH() const
}
//----------------------------------------------------------------------------
-bool cmTarget::NeedRelinkBeforeInstall(const char* config)
+bool cmTarget::NeedRelinkBeforeInstall(const char* config) const
{
// Only executables and shared libraries can have an rpath and may
// need relinking.
@@ -3732,7 +3724,7 @@ bool cmTarget::NeedRelinkBeforeInstall(const char* config)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetInstallNameDirForBuildTree(const char* config)
+std::string cmTarget::GetInstallNameDirForBuildTree(const char* config) const
{
// If building directly for installation then the build tree install_name
// is the same as the install tree.
@@ -3765,7 +3757,7 @@ std::string cmTarget::GetInstallNameDirForBuildTree(const char* config)
}
//----------------------------------------------------------------------------
-std::string cmTarget::GetInstallNameDirForInstallTree()
+std::string cmTarget::GetInstallNameDirForInstallTree() const
{
if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
{
@@ -5030,12 +5022,20 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
// An explicit list of interface libraries may be set for shared
// libraries and executables that export symbols.
const char* explicitLibraries = 0;
- const char* newExplicitLibraries =
- this->GetProperty("INTERFACE_LINK_LIBRARIES");
std::string linkIfaceProp;
- if(this->GetType() == cmTarget::SHARED_LIBRARY ||
- this->IsExecutableWithExports())
+ if(this->PolicyStatusCMP0022 != cmPolicies::OLD &&
+ this->PolicyStatusCMP0022 != cmPolicies::WARN)
{
+ // CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES.
+ linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
+ explicitLibraries = this->GetProperty(linkIfaceProp.c_str());
+ }
+ else if(this->GetType() == cmTarget::SHARED_LIBRARY ||
+ this->IsExecutableWithExports())
+ {
+ // CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a
+ // shared lib or executable.
+
// Lookup the per-configuration property.
linkIfaceProp = "LINK_INTERFACE_LIBRARIES";
linkIfaceProp += suffix;
@@ -5047,127 +5047,34 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
linkIfaceProp = "LINK_INTERFACE_LIBRARIES";
explicitLibraries = this->GetProperty(linkIfaceProp.c_str());
}
- if (newExplicitLibraries
- && (!explicitLibraries ||
- (explicitLibraries
- && strcmp(newExplicitLibraries, explicitLibraries) != 0)))
- {
- switch(this->GetPolicyStatusCMP0022())
- {
- case cmPolicies::WARN:
- {
- cmOStringStream w;
- w << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
- << "Target \"" << this->GetName() << "\" has a "
- "INTERFACE_LINK_LIBRARIES property which differs from its "
- << linkIfaceProp << " properties."
- "\n"
- "INTERFACE_LINK_LIBRARIES:\n "
- << newExplicitLibraries
- << "\n"
- << linkIfaceProp << ":\n "
- << (explicitLibraries ? explicitLibraries : "(empty)") << "\n";
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
- }
- // Fall through
- case cmPolicies::OLD:
- break;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- case cmPolicies::NEW:
- explicitLibraries = newExplicitLibraries;
- linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
- break;
- }
- }
}
- else if(this->GetType() == cmTarget::STATIC_LIBRARY)
+
+ if(explicitLibraries && this->PolicyStatusCMP0022 == cmPolicies::WARN &&
+ !this->Internal->PolicyWarnedCMP0022)
{
- if (newExplicitLibraries)
+ // Compare the explicitly set old link interface properties to the
+ // preferred new link interface property one and warn if different.
+ const char* newExplicitLibraries =
+ this->GetProperty("INTERFACE_LINK_LIBRARIES");
+ if (newExplicitLibraries
+ && strcmp(newExplicitLibraries, explicitLibraries) != 0)
{
- cmListFileBacktrace lfbt;
- cmGeneratorExpression ge(lfbt);
- cmGeneratorExpressionDAGChecker dagChecker(lfbt, this->GetName(),
- "INTERFACE_LINK_LIBRARIES", 0, 0);
- std::vector<std::string> ifaceLibs;
- cmSystemTools::ExpandListArgument(
- ge.Parse(newExplicitLibraries)->Evaluate(
- this->Makefile,
- config,
- false,
- headTarget,
- this, &dagChecker), ifaceLibs);
- LinkImplementation const* impl = this->GetLinkImplementation(config,
- headTarget);
- if (ifaceLibs != impl->Libraries)
- {
- switch(this->GetPolicyStatusCMP0022())
- {
- case cmPolicies::WARN:
- {
- std::string oldLibraries;
- std::string newLibraries;
- const char *sep = "";
- for(std::vector<std::string>::const_iterator it
- = impl->Libraries.begin(); it != impl->Libraries.end(); ++it)
- {
- oldLibraries += sep;
- oldLibraries += *it;
- sep = ";";
- }
- sep = "";
- for(std::vector<std::string>::const_iterator it
- = ifaceLibs.begin(); it != ifaceLibs.end(); ++it)
- {
- newLibraries += sep;
- newLibraries += *it;
- sep = ";";
- }
-
- cmOStringStream w;
- w << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
- << "Static library target \"" << this->GetName() << "\" has a "
- "INTERFACE_LINK_LIBRARIES property. This should be preferred "
- "as the source of the link interface for this library. "
- "Ignoring the property and using the link implementation "
- "as the link interface instead."
- "\n"
- "INTERFACE_LINK_LIBRARIES:\n "
- << newLibraries
- << "\n"
- << "Link implementation:\n "
- << oldLibraries << "\n";
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
- }
- // Fall through
- case cmPolicies::OLD:
- break;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- case cmPolicies::NEW:
- explicitLibraries = newExplicitLibraries;
- linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
- break;
- }
- }
- else
- {
- iface.Libraries = impl->Libraries;
- if(this->LinkLanguagePropagatesToDependents())
- {
- // Targets using this archive need its language runtime libraries.
- iface.Languages = impl->Languages;
- }
- }
+ cmOStringStream w;
+ w <<
+ (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
+ "Target \"" << this->GetName() << "\" has an "
+ "INTERFACE_LINK_LIBRARIES property which differs from its " <<
+ linkIfaceProp << " properties."
+ "\n"
+ "INTERFACE_LINK_LIBRARIES:\n"
+ " " << newExplicitLibraries << "\n" <<
+ linkIfaceProp << ":\n"
+ " " << (explicitLibraries ? explicitLibraries : "(empty)") << "\n";
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->Internal->PolicyWarnedCMP0022 = true;
}
}
- else if (this->GetType() == cmTarget::INTERFACE_LIBRARY)
- {
- explicitLibraries = newExplicitLibraries;
- linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
- }
// There is no implicit link interface for executables or modules
// so if none was explicitly set then there is no link interface.
@@ -5235,11 +5142,12 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
}
}
}
- else if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN
- || this->GetPolicyStatusCMP0022() == cmPolicies::OLD)
- // The implementation shouldn't be the interface if CMP0022 is NEW. That
- // way, the LINK_LIBRARIES property can be set directly without having to
- // empty the INTERFACE_LINK_LIBRARIES
+ else if (this->PolicyStatusCMP0022 == cmPolicies::WARN
+ || this->PolicyStatusCMP0022 == cmPolicies::OLD)
+ // If CMP0022 is NEW then the plain tll signature sets the
+ // INTERFACE_LINK_LIBRARIES, so if we get here then the project
+ // cleared the property explicitly and we should not fall back
+ // to the link implementation.
{
// The link implementation is the default link interface.
LinkImplementation const* impl = this->GetLinkImplementation(config,
@@ -5252,6 +5160,70 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
// Targets using this archive need its language runtime libraries.
iface.Languages = impl->Languages;
}
+
+ if(this->PolicyStatusCMP0022 == cmPolicies::WARN &&
+ !this->Internal->PolicyWarnedCMP0022)
+ {
+ // Compare the link implementation fallback link interface to the
+ // preferred new link interface property and warn if different.
+ cmListFileBacktrace lfbt;
+ cmGeneratorExpression ge(lfbt);
+ cmGeneratorExpressionDAGChecker dagChecker(lfbt, this->GetName(),
+ "INTERFACE_LINK_LIBRARIES", 0, 0);
+ std::vector<std::string> ifaceLibs;
+ const char* newExplicitLibraries =
+ this->GetProperty("INTERFACE_LINK_LIBRARIES");
+ cmSystemTools::ExpandListArgument(
+ ge.Parse(newExplicitLibraries)->Evaluate(this->Makefile,
+ config,
+ false,
+ headTarget,
+ this, &dagChecker),
+ ifaceLibs);
+ if (ifaceLibs != impl->Libraries)
+ {
+ std::string oldLibraries;
+ std::string newLibraries;
+ const char *sep = "";
+ for(std::vector<std::string>::const_iterator it
+ = impl->Libraries.begin(); it != impl->Libraries.end(); ++it)
+ {
+ oldLibraries += sep;
+ oldLibraries += *it;
+ sep = ";";
+ }
+ sep = "";
+ for(std::vector<std::string>::const_iterator it
+ = ifaceLibs.begin(); it != ifaceLibs.end(); ++it)
+ {
+ newLibraries += sep;
+ newLibraries += *it;
+ sep = ";";
+ }
+ if(oldLibraries.empty())
+ { oldLibraries = "(empty)"; }
+ if(newLibraries.empty())
+ { newLibraries = "(empty)"; }
+
+ cmOStringStream w;
+ w <<
+ (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
+ "Target \"" << this->GetName() << "\" has an "
+ "INTERFACE_LINK_LIBRARIES property. "
+ "This should be preferred as the source of the link interface "
+ "for this library but because CMP0022 is not set CMake is "
+ "ignoring the property and using the link implementation "
+ "as the link interface instead."
+ "\n"
+ "INTERFACE_LINK_LIBRARIES:\n"
+ " " << newLibraries << "\n"
+ "Link implementation:\n"
+ " " << oldLibraries << "\n";
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->Internal->PolicyWarnedCMP0022 = true;
+ }
+ }
}
if(this->GetType() == cmTarget::STATIC_LIBRARY)
@@ -5802,7 +5774,7 @@ std::string cmTarget::BuildMacContentDirectory(const std::string& base,
//----------------------------------------------------------------------------
std::string cmTarget::GetMacContentDirectory(const char* config,
- bool implib)
+ bool implib) const
{
// Start with the output directory for the target.
std::string fpath = this->GetDirectory(config, implib);
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index eae5009..fbb4914 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -124,7 +124,7 @@ public:
/**
* Get the list of the source files used by this target
*/
- std::vector<cmSourceFile*> const& GetSourceFiles();
+ std::vector<cmSourceFile*> const& GetSourceFiles() const;
void AddSourceFile(cmSourceFile* sf);
std::vector<std::string> const& GetObjectLibraries() const
{
@@ -361,7 +361,7 @@ public:
std::string GetFullName(const char* config=0, bool implib = false) const;
void GetFullNameComponents(std::string& prefix,
std::string& base, std::string& suffix,
- const char* config=0, bool implib = false);
+ const char* config=0, bool implib = false) const;
/** Get the name of the pdb file for the target. */
std::string GetPDBName(const char* config=0) const;
@@ -373,7 +373,7 @@ public:
std::string GetSOName(const char* config) const;
/** Whether this library has \@rpath and platform supports it. */
- bool HasMacOSXRpath(const char* config);
+ bool HasMacOSXRpath(const char* config) const;
/** Test for special case of a third-party shared library that has
no soname at all. */
@@ -409,7 +409,7 @@ public:
/**
* Compute whether this target must be relinked before installing.
*/
- bool NeedRelinkBeforeInstall(const char* config);
+ bool NeedRelinkBeforeInstall(const char* config) const;
bool HaveBuildTreeRPATH(const char *config) const;
bool HaveInstallTreeRPATH() const;
@@ -420,11 +420,11 @@ public:
/** Return the install name directory for the target in the
* build tree. For example: "\@rpath/", "\@loader_path/",
* or "/full/path/to/library". */
- std::string GetInstallNameDirForBuildTree(const char* config);
+ std::string GetInstallNameDirForBuildTree(const char* config) const;
/** Return the install name directory for the target in the
* install tree. For example: "\@rpath/" or "\@loader_path/". */
- std::string GetInstallNameDirForInstallTree();
+ std::string GetInstallNameDirForInstallTree() const;
cmComputeLinkInformation* GetLinkInformation(const char* config,
cmTarget const* head = 0) const;
@@ -497,7 +497,7 @@ public:
/** @return the mac content directory for this target. */
std::string GetMacContentDirectory(const char* config,
- bool implib);
+ bool implib) const;
/** @return whether this target have a well defined output file name. */
bool HaveWellDefinedOutputFiles() const;
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 6b6fe4c..c289459 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -384,19 +384,20 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
}
}
- if(this->CurrentProcessingState == ProcessingLinkLibraries
- && !this->Target->GetProperty("LINK_INTERFACE_LIBRARIES"))
- {
- this->Makefile
- ->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
- }
- else if(this->CurrentProcessingState != ProcessingKeywordLinkInterface
+ // Handle normal case first.
+ if(this->CurrentProcessingState != ProcessingKeywordLinkInterface
&& this->CurrentProcessingState != ProcessingPlainLinkInterface)
{
this->Makefile
->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
- if (this->CurrentProcessingState != ProcessingKeywordPublicInterface
- && this->CurrentProcessingState != ProcessingPlainPublicInterface)
+ if(this->CurrentProcessingState == ProcessingLinkLibraries)
+ {
+ this->Target->AppendProperty("INTERFACE_LINK_LIBRARIES",
+ this->Target->GetDebugGeneratorExpressions(lib, llt).c_str());
+ return true;
+ }
+ else if(this->CurrentProcessingState != ProcessingKeywordPublicInterface
+ && this->CurrentProcessingState != ProcessingPlainPublicInterface)
{
if (this->Target->GetType() == cmTarget::STATIC_LIBRARY)
{
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 26251b3..d4f464c 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -632,7 +632,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
{
return cmcmd::ExecuteEchoColor(args);
}
- else if (args[1] == "cmake_autogen")
+ else if (args[1] == "cmake_autogen" && args.size() >= 4)
{
cmQtAutoGenerators autogen;
const char *config = args[3].empty() ? 0 : args[3].c_str();
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index 33757b6..818b8c9 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -28,3 +28,10 @@ endif()
add_executable(staticlib_exe staticlib_exe.cpp)
target_link_libraries(staticlib_exe staticlib1)
+
+add_library(onlyplainlib1 SHARED onlyplainlib1.cpp)
+add_library(onlyplainlib2 SHARED onlyplainlib2.cpp)
+target_link_libraries(onlyplainlib2 onlyplainlib1)
+
+add_executable(onlyplainlib_user onlyplainlib_user.cpp)
+target_link_libraries(onlyplainlib_user onlyplainlib2)
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
new file mode 100644
index 0000000..41dc3ce
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp
@@ -0,0 +1,13 @@
+
+#include "onlyplainlib1.h"
+
+OnlyPlainLib1::OnlyPlainLib1()
+ : result(0)
+{
+
+}
+
+int OnlyPlainLib1::GetResult()
+{
+ return result;
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
new file mode 100644
index 0000000..c0373ce
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
@@ -0,0 +1,14 @@
+
+struct
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+OnlyPlainLib1
+{
+ OnlyPlainLib1();
+
+ int GetResult();
+
+private:
+ int result;
+};
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
new file mode 100644
index 0000000..2865ae9
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.cpp
@@ -0,0 +1,8 @@
+
+#include "onlyplainlib2.h"
+
+OnlyPlainLib1 onlyPlainLib2()
+{
+ OnlyPlainLib1 opl1;
+ return opl1;
+}
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
new file mode 100644
index 0000000..74b18a0
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
@@ -0,0 +1,7 @@
+
+#include "onlyplainlib1.h"
+
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+OnlyPlainLib1 onlyPlainLib2();
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
new file mode 100644
index 0000000..0fb7b0a
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp
@@ -0,0 +1,7 @@
+
+#include "onlyplainlib2.h"
+
+int main(int argc, char **argv)
+{
+ return onlyPlainLib2().GetResult();
+}
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect
index 744cb88..fa436cb 100644
--- a/Tests/CMakeLib/testRST.expect
+++ b/Tests/CMakeLib/testRST.expect
@@ -76,6 +76,13 @@ or after a paragraph ending in two colons::
but not after a line ending in two colons::
in the middle of a paragraph.
+.. productionlist::
+ grammar: `production`
+ production: "content rendered"
+
+.. note::
+ Notes are called out.
+
substituted text with multiple lines becomes one line
End of first include.
diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst
index 5cb6d91..54952dd 100644
--- a/Tests/CMakeLib/testRST.rst
+++ b/Tests/CMakeLib/testRST.rst
@@ -83,6 +83,13 @@ or after a paragraph ending in two colons::
but not after a line ending in two colons::
in the middle of a paragraph.
+.. productionlist::
+ grammar: `production`
+ production: "content rendered"
+
+.. note::
+ Notes are called out.
+
.. |substitution| replace::
|nested substitution|
with multiple lines becomes one line
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 7c939ed..d4a55fc 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1943,6 +1943,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
PASS_REGULAR_EXPRESSION "Upload\\.xml")
configure_file(
+ "${CMake_SOURCE_DIR}/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestTestEmptyBinaryDirectory/test.cmake"
+ @ONLY ESCAPE_QUOTES)
+ add_test(CTestTestEmptyBinaryDirectory ${CMAKE_CTEST_COMMAND}
+ -S "${CMake_BINARY_DIR}/Tests/CTestTestEmptyBinaryDirectory/test.cmake" -V
+ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestEmptyBinaryDirectory/testOut.log"
+ )
+ set_tests_properties(CTestTestEmptyBinaryDirectory PROPERTIES
+ PASS_REGULAR_EXPRESSION "TEST_SUCCESS")
+
+ configure_file(
"${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in"
"${CMake_BINARY_DIR}/Tests/CTestTestConfigFileInBuildDir1/test1.cmake"
@ONLY ESCAPE_QUOTES)
diff --git a/Tests/CPackComponentsForAll/CMakeLists.txt b/Tests/CPackComponentsForAll/CMakeLists.txt
index 8162f0c..ff40e30 100644
--- a/Tests/CPackComponentsForAll/CMakeLists.txt
+++ b/Tests/CPackComponentsForAll/CMakeLists.txt
@@ -59,6 +59,7 @@ set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "2")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CPack Component Example")
+set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/license.txt)
# Tell CPack all of the components to install. The "ALL"
# refers to the fact that this is the set of components that
@@ -120,4 +121,4 @@ if (NOT ("${CPackComponentWay}" STREQUAL "default"))
set(CPACK_PROJECT_CONFIG_FILE ${CPackComponentsForAll_BINARY_DIR}/MyLibCPackConfig-${CPackComponentWay}.cmake)
endif ()
# Include CPack to introduce the appropriate targets
-include(CPack) \ No newline at end of file
+include(CPack)
diff --git a/Tests/CPackComponentsForAll/license.txt b/Tests/CPackComponentsForAll/license.txt
new file mode 100644
index 0000000..ba8ba48
--- /dev/null
+++ b/Tests/CPackComponentsForAll/license.txt
@@ -0,0 +1,3 @@
+LICENSE
+-------
+This is an installer created using CPack (http://www.cmake.org). No license provided.
diff --git a/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in b/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in
new file mode 100644
index 0000000..8eb808f
--- /dev/null
+++ b/Tests/CTestTestEmptyBinaryDirectory/test.cmake.in
@@ -0,0 +1,66 @@
+cmake_minimum_required(VERSION 2.8.12)
+
+set(CTEST_RUN_CURRENT_SCRIPT 0)
+
+set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestEmptyBinaryDirectory")
+set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestEmptyBinaryDirectory")
+
+# make sure ctest does not remove directories without a CMakeCache.txt in it
+set(EMPTY_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/empty_binary_dir")
+file(MAKE_DIRECTORY "${EMPTY_BINARY_DIR}")
+
+if(NOT EXISTS "${EMPTY_BINARY_DIR}"
+ OR EXISTS "${EMPTY_BINARY_DIR}/CMakeCache.txt")
+ message(FATAL_ERROR "empty_binary_dir precondition failed")
+endif()
+
+ctest_empty_binary_directory("${EMPTY_BINARY_DIR}")
+
+if(NOT EXISTS "${EMPTY_BINARY_DIR}")
+ message(FATAL_ERROR "empty_binary_dir should not have been removed")
+endif()
+
+# make sure ctest does remove directories with a CMakeCache.txt
+set(VALID_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/valid_binary_dir")
+file(MAKE_DIRECTORY "${VALID_BINARY_DIR}")
+file(WRITE "${VALID_BINARY_DIR}/CMakeCache.txt")
+
+if(NOT EXISTS "${VALID_BINARY_DIR}"
+ OR NOT EXISTS "${VALID_BINARY_DIR}/CMakeCache.txt")
+ message(FATAL_ERROR "valid_binary_dir precondition failed")
+endif()
+
+ctest_empty_binary_directory("${VALID_BINARY_DIR}")
+
+if(EXISTS "${VALID_BINARY_DIR}")
+ message(FATAL_ERROR "valid_binary_dir should have been removed")
+endif()
+
+# make sure ctest removes build directories recursively
+set(DEEP_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/deep_binary_dir")
+file(MAKE_DIRECTORY "${DEEP_BINARY_DIR}")
+file(WRITE "${DEEP_BINARY_DIR}/CMakeCache.txt")
+
+foreach(SUBDIR A Z A/A A/Z Z/A Z/Z)
+ set(FULL_SUBDIR "${DEEP_BINARY_DIR}/${SUBDIR}")
+ file(MAKE_DIRECTORY "${FULL_SUBDIR}")
+
+ foreach(SUBFILE A.cpp Z.bat)
+ set(FULL_SUBFILE "${FULL_SUBDIR}/${SUBFILE}")
+ file(WRITE "${FULL_SUBFILE}" "I am '${FULL_SUBFILE}'")
+ endforeach()
+endforeach()
+
+if(NOT EXISTS "${DEEP_BINARY_DIR}"
+ OR NOT EXISTS "${DEEP_BINARY_DIR}/CMakeCache.txt"
+ OR NOT EXISTS "${DEEP_BINARY_DIR}/Z/A/Z.bat")
+ message(FATAL_ERROR "deep_binary_dir precondition failed")
+endif()
+
+ctest_empty_binary_directory("${DEEP_BINARY_DIR}")
+
+if(EXISTS "${DEEP_BINARY_DIR}")
+ message(FATAL_ERROR "deep_binary_dir should have been removed")
+endif()
+
+message("TEST_SUCCESS")
diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake
index ae8fda2..db4e08d 100644
--- a/Tests/CTestUpdateCommon.cmake
+++ b/Tests/CTestUpdateCommon.cmake
@@ -37,10 +37,19 @@ function(check_updates build)
REGEX "<(${types}|FullName)>"
LIMIT_INPUT ${max_update_xml_size}
)
+
string(REGEX REPLACE
"[ \t]*<(${types})>[ \t]*;[ \t]*<FullName>([^<]*)</FullName>"
"\\1{\\2}" UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}")
+ # If specified, remove the given prefix from the files in Update.xml.
+ # Some VCS systems, like Perforce, return absolute locations
+ if(DEFINED REPOSITORY_FILE_PREFIX)
+ string(REPLACE
+ "${REPOSITORY_FILE_PREFIX}" ""
+ UPDATE_XML_ENTRIES "${UPDATE_XML_ENTRIES}")
+ endif()
+
# Compare expected and actual entries
set(EXTRA "${UPDATE_XML_ENTRIES}")
list(REMOVE_ITEM EXTRA ${ARGN} ${UPDATE_EXTRA} ${UPDATE_MAYBE})
diff --git a/Tests/CTestUpdateP4.cmake.in b/Tests/CTestUpdateP4.cmake.in
index f23bd11..f0420c4 100644
--- a/Tests/CTestUpdateP4.cmake.in
+++ b/Tests/CTestUpdateP4.cmake.in
@@ -8,6 +8,7 @@ set(P4_TOP "${TOP}")
set(TOP "${TOP}/@CTestUpdateP4_DIR@")
# Include code common to all update tests.
+set(REPOSITORY_FILE_PREFIX "//ctest/")
include("@CMAKE_CURRENT_SOURCE_DIR@/CTestUpdateCommon.cmake")
#-----------------------------------------------------------------------------
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe.cmake
new file mode 100644
index 0000000..b0268c8
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe.cmake
@@ -0,0 +1,7 @@
+enable_language(CXX)
+
+add_library(testLib empty_vs6_1.cpp)
+add_executable(testExe empty_vs6_2.cpp)
+target_link_libraries(testExe testLib)
+
+export(TARGETS testExe FILE "${CMAKE_CURRENT_BINARY_DIR}/cmp0022NOWARN-exe.cmake")
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared.cmake b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared.cmake
new file mode 100644
index 0000000..57c3ed0
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared.cmake
@@ -0,0 +1,8 @@
+enable_language(CXX)
+
+add_library(foo SHARED empty_vs6_1.cpp)
+add_library(bar SHARED empty_vs6_2.cpp)
+target_link_libraries(bar foo)
+
+add_executable(zot empty.cpp)
+target_link_libraries(zot bar)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
index 6d519f0..6a6a0c7 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
@@ -3,14 +3,16 @@ CMake Warning \(dev\) in CMakeLists.txt:
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
- Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its
- LINK_INTERFACE_LIBRARIES properties.
+ Target "bar" has an INTERFACE_LINK_LIBRARIES property. This should be
+ preferred as the source of the link interface for this library but because
+ CMP0022 is not set CMake is ignoring the property and using the link
+ implementation as the link interface instead.
INTERFACE_LINK_LIBRARIES:
foo
- LINK_INTERFACE_LIBRARIES:
+ Link implementation:
\(empty\)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
index e41133a..1370c5e 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-static-stderr.txt
@@ -3,10 +3,10 @@ CMake Warning \(dev\) in CMakeLists.txt:
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
- Static library target "bar" has a INTERFACE_LINK_LIBRARIES property. This
- should be preferred as the source of the link interface for this library.
- Ignoring the property and using the link implementation as the link
- interface instead.
+ Target "bar" has an INTERFACE_LINK_LIBRARIES property. This should be
+ preferred as the source of the link interface for this library but because
+ CMP0022 is not set CMake is ignoring the property and using the link
+ implementation as the link interface instead.
INTERFACE_LINK_LIBRARIES:
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
index 93c0ab3..2f7dfbf 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-stderr.txt
@@ -1,10 +1,10 @@
-CMake Warning \(dev\) in CMakeLists.txt:
+^CMake Warning \(dev\) in CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
- Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its
- LINK_INTERFACE_LIBRARIES properties.
+ Target "bar" has an INTERFACE_LINK_LIBRARIES property which differs from
+ its LINK_INTERFACE_LIBRARIES properties.
INTERFACE_LINK_LIBRARIES:
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
index 6370b24..f672285 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt
@@ -3,8 +3,8 @@ CMake Warning \(dev\) in CMakeLists.txt:
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
- Target "bar" has a INTERFACE_LINK_LIBRARIES property which differs from its
- LINK_INTERFACE_LIBRARIES properties.
+ Target "bar" has an INTERFACE_LINK_LIBRARIES property which differs from
+ its LINK_INTERFACE_LIBRARIES properties.
INTERFACE_LINK_LIBRARIES:
diff --git a/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake b/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake
index 24b7f45..fe7e858 100644
--- a/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake
+++ b/Tests/RunCMake/CMP0022/CMP0022-WARN.cmake
@@ -9,3 +9,8 @@ set_property(TARGET bar PROPERTY LINK_INTERFACE_LIBRARIES bat)
add_library(user empty.cpp)
target_link_libraries(user bar)
+
+# Use "bar" again with a different "head" target to check
+# that the warning does not appear again.
+add_library(user2 empty_vs6_3.cpp)
+target_link_libraries(user2 bar)
diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake b/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake
new file mode 100644
index 0000000..d832fac
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake
@@ -0,0 +1,9 @@
+enable_language(CXX)
+
+cmake_policy(SET CMP0022 NEW)
+
+add_library(testLib empty_vs6_1.cpp)
+add_executable(testExe empty_vs6_2.cpp)
+target_link_libraries(testExe testLib)
+
+export(TARGETS testExe FILE "${CMAKE_CURRENT_BINARY_DIR}/cmp0022NEW-exe.cmake")
diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
index 8e5824a..2781d20 100644
--- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake
@@ -4,7 +4,10 @@ run_cmake(CMP0022-WARN)
run_cmake(CMP0022-WARN-tll)
run_cmake(CMP0022-WARN-static)
run_cmake(CMP0022-WARN-empty-old)
+run_cmake(CMP0022-NOWARN-exe)
+run_cmake(CMP0022-NOWARN-shared)
run_cmake(CMP0022-NOWARN-static)
run_cmake(CMP0022-NOWARN-static-link_libraries)
run_cmake(CMP0022-export)
+run_cmake(CMP0022-export-exe)
run_cmake(CMP0022-install-export)
diff --git a/Tests/RunCMake/CMP0022/empty_vs6_4.cpp b/Tests/RunCMake/CMP0022/empty_vs6_4.cpp
new file mode 100644
index 0000000..7efedab
--- /dev/null
+++ b/Tests/RunCMake/CMP0022/empty_vs6_4.cpp
@@ -0,0 +1 @@
+#include "empty.cpp"
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt
new file mode 100644
index 0000000..533d38c
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject-stderr.txt
@@ -0,0 +1,26 @@
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_SONAME_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
++
+CMake Error at BadTargetTypeObject.cmake:3 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<TARGET_LINKER_FILE:objlib>
+
+ Target "objlib" is not an executable or library.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake
new file mode 100644
index 0000000..c47ee2b
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/BadTargetTypeObject.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+add_library(objlib OBJECT empty.c)
+add_custom_target(check ALL COMMAND echo
+ $<TARGET_FILE:objlib>
+ $<TARGET_SONAME_FILE:objlib>
+ $<TARGET_LINKER_FILE:objlib>
+ )
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 62bf29b..54d5064 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -7,4 +7,5 @@ run_cmake(BadNOT)
run_cmake(BadStrEqual)
run_cmake(BadZero)
run_cmake(BadTargetName)
+run_cmake(BadTargetTypeObject)
run_cmake(BadInstallPrefix)
diff --git a/Tests/RunCMake/GeneratorExpression/empty.c b/Tests/RunCMake/GeneratorExpression/empty.c
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/empty.c
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
new file mode 100644
index 0000000..411cd7c
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at MissingSource.cmake:1 \(add_library\):
+ Cannot find source file:
+
+ missing.c
+
+ Tried extensions( \.[A-Za-z+]+|
+ )*
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource.cmake b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake
new file mode 100644
index 0000000..258eaed
--- /dev/null
+++ b/Tests/RunCMake/ObjectLibrary/MissingSource.cmake
@@ -0,0 +1 @@
+add_library(A OBJECT missing.c)
diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
index a74eaa8..42973f8 100644
--- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake
@@ -11,6 +11,7 @@ run_cmake(Install)
run_cmake(LinkObjLHS)
run_cmake(LinkObjRHS1)
run_cmake(LinkObjRHS2)
+run_cmake(MissingSource)
run_cmake(ObjWithObj)
run_cmake(PostBuild)
run_cmake(PreBuild)