summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/command/get_filename_component.rst37
-rw-r--r--Help/manual/cmake.1.rst2
-rw-r--r--Help/prop_tgt/NO_SONAME.rst6
-rw-r--r--Help/release/dev/get-filename-component-base-dir.rst6
-rw-r--r--Help/release/dev/modules-no-soname.rst7
-rw-r--r--Help/variable/APPLE.rst4
-rw-r--r--Help/variable/BORLAND.rst4
-rw-r--r--Help/variable/BUILD_SHARED_LIBS.rst6
-rw-r--r--Help/variable/CMAKE_ABSOLUTE_DESTINATION_FILES.rst4
-rw-r--r--Help/variable/CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES.rst4
-rw-r--r--Help/variable/CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES.rst4
-rw-r--r--Help/variable/CMAKE_ARGC.rst5
-rw-r--r--Help/variable/CMAKE_ARGV0.rst8
-rw-r--r--Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst12
-rw-r--r--Help/variable/CMAKE_AUTORCC.rst4
-rw-r--r--Help/variable/CMAKE_AUTOUIC.rst4
-rw-r--r--Help/variable/CMAKE_BINARY_DIR.rst2
-rw-r--r--Help/variable/CMAKE_BUILD_TYPE.rst25
-rw-r--r--Help/variable/CMAKE_BUILD_WITH_INSTALL_RPATH.rst10
-rw-r--r--Help/variable/CMAKE_CACHEFILE_DIR.rst6
-rw-r--r--Help/variable/CMAKE_CACHE_MAJOR_VERSION.rst2
-rw-r--r--Help/variable/CMAKE_CACHE_MINOR_VERSION.rst2
-rw-r--r--Help/variable/CMAKE_CACHE_PATCH_VERSION.rst2
-rw-r--r--Help/variable/CMAKE_CFG_INTDIR.rst21
-rw-r--r--Help/variable/CMAKE_CL_64.rst4
-rw-r--r--Help/variable/CMAKE_COLOR_MAKEFILE.rst4
-rw-r--r--Help/variable/CMAKE_COMMAND.rst8
-rw-r--r--Help/variable/CMAKE_COMPILER_IS_GNULANG.rst6
-rw-r--r--Help/variable/CMAKE_CONFIGURATION_TYPES.rst6
-rw-r--r--Help/variable/CMAKE_CONFIG_POSTFIX.rst6
-rw-r--r--Help/variable/CMAKE_CTEST_COMMAND.rst8
-rw-r--r--Help/variable/CMAKE_CURRENT_BINARY_DIR.rst2
-rw-r--r--Help/variable/CMAKE_CURRENT_LIST_DIR.rst6
-rw-r--r--Help/variable/CMAKE_CURRENT_LIST_FILE.rst2
-rw-r--r--Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst4
-rw-r--r--Help/variable/CMAKE_CXX_EXTENSIONS.rst2
-rw-r--r--Help/variable/CMAKE_CXX_STANDARD.rst2
-rw-r--r--Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst2
-rw-r--r--Help/variable/CMAKE_C_COMPILE_FEATURES.rst4
-rw-r--r--Help/variable/CMAKE_C_EXTENSIONS.rst2
-rw-r--r--Help/variable/CMAKE_C_STANDARD.rst2
-rw-r--r--Help/variable/CMAKE_C_STANDARD_REQUIRED.rst2
-rw-r--r--Help/variable/CMAKE_DEBUG_POSTFIX.rst4
-rw-r--r--Help/variable/CMAKE_DEBUG_TARGET_PROPERTIES.rst6
-rw-r--r--Help/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.rst9
-rw-r--r--Help/variable/CMAKE_DL_LIBS.rst6
-rw-r--r--Help/variable/CMAKE_EDIT_COMMAND.rst6
-rw-r--r--Help/variable/CMAKE_ERROR_DEPRECATED.rst4
-rw-r--r--Help/variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst5
-rw-r--r--Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst4
-rw-r--r--Help/variable/CMAKE_EXE_LINKER_FLAGS_CONFIG.rst2
-rw-r--r--Help/variable/CMAKE_EXTRA_GENERATOR.rst9
-rw-r--r--Help/variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES.rst2
-rw-r--r--Help/variable/CMAKE_FIND_LIBRARY_PREFIXES.rst6
-rw-r--r--Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst6
-rw-r--r--Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst6
-rw-r--r--Help/variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE.rst18
-rw-r--r--Help/variable/CMAKE_FIND_ROOT_PATH.rst4
-rw-r--r--Help/variable/CMAKE_Fortran_FORMAT.rst6
-rw-r--r--Help/variable/CMAKE_Fortran_MODDIR_DEFAULT.rst6
-rw-r--r--Help/variable/CMAKE_Fortran_MODDIR_FLAG.rst2
-rw-r--r--Help/variable/CMAKE_Fortran_MODOUT_FLAG.rst2
-rw-r--r--Help/variable/CMAKE_Fortran_MODULE_DIRECTORY.rst2
-rw-r--r--Help/variable/CMAKE_GENERATOR.rst4
-rw-r--r--Help/variable/CMAKE_GENERATOR_PLATFORM.rst4
-rw-r--r--Help/variable/CMAKE_GENERATOR_TOOLSET.rst4
-rw-r--r--Help/variable/CMAKE_GNUtoMS.rst6
-rw-r--r--Help/variable/CMAKE_HOST_APPLE.rst4
-rw-r--r--Help/variable/CMAKE_HOST_SYSTEM_NAME.rst2
-rw-r--r--Help/variable/CMAKE_HOST_SYSTEM_PROCESSOR.rst4
-rw-r--r--Help/variable/CMAKE_HOST_SYSTEM_VERSION.rst2
-rw-r--r--Help/variable/CMAKE_HOST_UNIX.rst4
-rw-r--r--Help/variable/CMAKE_HOST_WIN32.rst4
-rw-r--r--Help/variable/CMAKE_IMPORT_LIBRARY_PREFIX.rst2
-rw-r--r--Help/variable/CMAKE_IMPORT_LIBRARY_SUFFIX.rst2
-rw-r--r--Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst8
-rw-r--r--Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst10
-rw-r--r--Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst7
-rw-r--r--Help/variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE.rst4
-rw-r--r--Help/variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME.rst8
-rw-r--r--Help/variable/CMAKE_INSTALL_NAME_DIR.rst6
-rw-r--r--Help/variable/CMAKE_INSTALL_PREFIX.rst25
-rw-r--r--Help/variable/CMAKE_INSTALL_RPATH.rst2
-rw-r--r--Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst6
-rw-r--r--Help/variable/CMAKE_LANG_ARCHIVE_APPEND.rst7
-rw-r--r--Help/variable/CMAKE_LANG_ARCHIVE_CREATE.rst7
-rw-r--r--Help/variable/CMAKE_LANG_ARCHIVE_FINISH.rst7
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER.rst4
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN.rst6
-rw-r--r--Help/variable/CMAKE_LANG_COMPILER_LOADED.rst4
-rw-r--r--Help/variable/CMAKE_LANG_COMPILE_OBJECT.rst2
-rw-r--r--Help/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY.rst2
-rw-r--r--Help/variable/CMAKE_LANG_CREATE_SHARED_MODULE.rst2
-rw-r--r--Help/variable/CMAKE_LANG_CREATE_STATIC_LIBRARY.rst2
-rw-r--r--Help/variable/CMAKE_LANG_FLAGS.rst2
-rw-r--r--Help/variable/CMAKE_LANG_FLAGS_DEBUG.rst4
-rw-r--r--Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL.rst6
-rw-r--r--Help/variable/CMAKE_LANG_FLAGS_RELEASE.rst4
-rw-r--r--Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO.rst6
-rw-r--r--Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG.rst4
-rw-r--r--Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL.rst6
-rw-r--r--Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE.rst4
-rw-r--r--Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELWITHDEBINFO.rst6
-rw-r--r--Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst2
-rw-r--r--Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst8
-rw-r--r--Help/variable/CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES.rst2
-rw-r--r--Help/variable/CMAKE_LANG_IMPLICIT_LINK_LIBRARIES.rst2
-rw-r--r--Help/variable/CMAKE_LANG_LIBRARY_ARCHITECTURE.rst8
-rw-r--r--Help/variable/CMAKE_LANG_LINKER_PREFERENCE.rst4
-rw-r--r--Help/variable/CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES.rst2
-rw-r--r--Help/variable/CMAKE_LANG_OUTPUT_EXTENSION.rst4
-rw-r--r--Help/variable/CMAKE_LANG_SIMULATE_ID.rst4
-rw-r--r--Help/variable/CMAKE_LANG_SIMULATE_VERSION.rst4
-rw-r--r--Help/variable/CMAKE_LANG_SIZEOF_DATA_PTR.rst4
-rw-r--r--Help/variable/CMAKE_LIBRARY_ARCHITECTURE.rst4
-rw-r--r--Help/variable/CMAKE_LIBRARY_ARCHITECTURE_REGEX.rst4
-rw-r--r--Help/variable/CMAKE_LIBRARY_PATH_FLAG.rst2
-rw-r--r--Help/variable/CMAKE_LINK_DEF_FILE_FLAG.rst4
-rw-r--r--Help/variable/CMAKE_LINK_DEPENDS_NO_SHARED.rst2
-rw-r--r--Help/variable/CMAKE_LINK_INTERFACE_LIBRARIES.rst4
-rw-r--r--Help/variable/CMAKE_LINK_LIBRARY_FLAG.rst2
-rw-r--r--Help/variable/CMAKE_LINK_LIBRARY_SUFFIX.rst2
-rw-r--r--Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst6
-rw-r--r--Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst10
-rw-r--r--Help/variable/CMAKE_MACOSX_BUNDLE.rst6
-rw-r--r--Help/variable/CMAKE_MAKE_PROGRAM.rst10
-rw-r--r--Help/variable/CMAKE_MAP_IMPORTED_CONFIG_CONFIG.rst8
-rw-r--r--Help/variable/CMAKE_MFC_FLAG.rst6
-rw-r--r--Help/variable/CMAKE_MINIMUM_REQUIRED_VERSION.rst6
-rw-r--r--Help/variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG.rst2
-rw-r--r--Help/variable/CMAKE_NOT_USING_CONFIG_FLAGS.rst4
-rw-r--r--Help/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.rst4
-rw-r--r--Help/variable/CMAKE_PARENT_LIST_FILE.rst8
-rw-r--r--Help/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.rst19
-rw-r--r--Help/variable/CMAKE_PROJECT_NAME.rst2
-rw-r--r--Help/variable/CMAKE_ROOT.rst4
-rw-r--r--Help/variable/CMAKE_SCRIPT_MODE_FILE.rst9
-rw-r--r--Help/variable/CMAKE_SHARED_LIBRARY_PREFIX.rst4
-rw-r--r--Help/variable/CMAKE_SHARED_LIBRARY_SUFFIX.rst4
-rw-r--r--Help/variable/CMAKE_SHARED_LINKER_FLAGS_CONFIG.rst2
-rw-r--r--Help/variable/CMAKE_SHARED_MODULE_PREFIX.rst2
-rw-r--r--Help/variable/CMAKE_SHARED_MODULE_SUFFIX.rst2
-rw-r--r--Help/variable/CMAKE_SIZEOF_VOID_P.rst6
-rw-r--r--Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst12
-rw-r--r--Help/variable/CMAKE_SKIP_INSTALL_RPATH.rst2
-rw-r--r--Help/variable/CMAKE_SKIP_INSTALL_RULES.rst5
-rw-r--r--Help/variable/CMAKE_SKIP_RPATH.rst4
-rw-r--r--Help/variable/CMAKE_SOURCE_DIR.rst2
-rw-r--r--Help/variable/CMAKE_STAGING_PREFIX.rst11
-rw-r--r--Help/variable/CMAKE_STATIC_LIBRARY_PREFIX.rst4
-rw-r--r--Help/variable/CMAKE_STATIC_LIBRARY_SUFFIX.rst4
-rw-r--r--Help/variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG.rst2
-rw-r--r--Help/variable/CMAKE_SYSTEM.rst2
-rw-r--r--Help/variable/CMAKE_SYSTEM_NAME.rst6
-rw-r--r--Help/variable/CMAKE_SYSTEM_PROCESSOR.rst2
-rw-r--r--Help/variable/CMAKE_SYSTEM_VERSION.rst2
-rw-r--r--Help/variable/CMAKE_TOOLCHAIN_FILE.rst6
-rw-r--r--Help/variable/CMAKE_TRY_COMPILE_CONFIGURATION.rst7
-rw-r--r--Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst20
-rw-r--r--Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE_LANG.rst7
-rw-r--r--Help/variable/CMAKE_VERBOSE_MAKEFILE.rst2
-rw-r--r--Help/variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD.rst8
-rw-r--r--Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst4
-rw-r--r--Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst2
-rw-r--r--Help/variable/CMAKE_WARN_DEPRECATED.rst4
-rw-r--r--Help/variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst7
-rw-r--r--Help/variable/CMAKE_WIN32_EXECUTABLE.rst6
-rw-r--r--Help/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute.rst4
-rw-r--r--Help/variable/CMAKE_XCODE_PLATFORM_TOOLSET.rst6
-rw-r--r--Help/variable/CPACK_ABSOLUTE_DESTINATION_FILES.rst6
-rw-r--r--Help/variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY.rst6
-rw-r--r--Help/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst9
-rw-r--r--Help/variable/CPACK_INCLUDE_TOPLEVEL_DIRECTORY.rst11
-rw-r--r--Help/variable/CPACK_INSTALL_SCRIPT.rst2
-rw-r--r--Help/variable/CPACK_PACKAGING_INSTALL_PREFIX.rst12
-rw-r--r--Help/variable/CPACK_SET_DESTDIR.rst31
-rw-r--r--Help/variable/CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst7
-rw-r--r--Help/variable/CTEST_COVERAGE_COMMAND.rst20
-rw-r--r--Help/variable/CTEST_MEMORYCHECK_TYPE.rst5
-rw-r--r--Help/variable/CYGWIN.rst4
-rw-r--r--Help/variable/ENV.rst4
-rw-r--r--Help/variable/EXECUTABLE_OUTPUT_PATH.rst4
-rw-r--r--Help/variable/LIBRARY_OUTPUT_PATH.rst8
-rw-r--r--Help/variable/MINGW.rst4
-rw-r--r--Help/variable/MSVC.rst4
-rw-r--r--Help/variable/MSVC10.rst4
-rw-r--r--Help/variable/MSVC11.rst4
-rw-r--r--Help/variable/MSVC12.rst4
-rw-r--r--Help/variable/MSVC14.rst4
-rw-r--r--Help/variable/MSVC60.rst4
-rw-r--r--Help/variable/MSVC70.rst4
-rw-r--r--Help/variable/MSVC71.rst4
-rw-r--r--Help/variable/MSVC80.rst4
-rw-r--r--Help/variable/MSVC90.rst4
-rw-r--r--Help/variable/MSVC_IDE.rst4
-rw-r--r--Help/variable/UNIX.rst6
-rw-r--r--Help/variable/WIN32.rst4
-rw-r--r--Help/variable/XCODE_VERSION.rst4
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake7
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake7
-rw-r--r--Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake4
-rw-r--r--Modules/FindCUDA.cmake5
-rw-r--r--Modules/Platform/HP-UX.cmake8
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmDefinitions.cxx14
-rw-r--r--Source/cmDefinitions.h17
-rw-r--r--Source/cmExportInstallFileGenerator.cxx4
-rw-r--r--Source/cmGeneratorTarget.cxx126
-rw-r--r--Source/cmGeneratorTarget.h4
-rw-r--r--Source/cmGetFilenameComponentCommand.cxx20
-rw-r--r--Source/cmGlobalGenerator.cxx47
-rw-r--r--Source/cmGlobalGenerator.h4
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx45
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h5
-rw-r--r--Source/cmInstallCommand.cxx4
-rw-r--r--Source/cmInstallExportGenerator.cxx13
-rw-r--r--Source/cmInstallExportGenerator.h8
-rw-r--r--Source/cmInstallFilesCommand.cxx2
-rw-r--r--Source/cmInstallFilesGenerator.cxx15
-rw-r--r--Source/cmInstallFilesGenerator.h9
-rw-r--r--Source/cmInstallProgramsCommand.cxx2
-rw-r--r--Source/cmLinkedTree.h7
-rw-r--r--Source/cmLocalGenerator.cxx1
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx4
-rw-r--r--Source/cmMakefile.cxx147
-rw-r--r--Source/cmMakefile.h3
-rw-r--r--Source/cmState.cxx143
-rw-r--r--Source/cmState.h25
-rw-r--r--Source/cmTestGenerator.cxx19
-rw-r--r--Source/cmTestGenerator.h4
-rw-r--r--Source/cmake.cxx2
-rw-r--r--Source/cmake.h2
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt5
-rw-r--r--Tests/ExportImport/Export/testLibNoSONAME.c7
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt44
-rw-r--r--Tests/ExportImport/Import/A/check_lib_nosoname.cmake7
-rw-r--r--Tests/ExportImport/Import/A/check_lib_soname.cmake7
-rw-r--r--Tests/Plugin/CMakeLists.txt9
-rw-r--r--Tests/Plugin/PluginTest/CMakeLists.txt17
-rw-r--r--Tests/Plugin/check_mod_soname.cmake17
-rw-r--r--Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-result.txt1
-rw-r--r--Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-stderr.txt4
-rw-r--r--Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion.cmake3
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake32
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeBundles.cmake46
-rw-r--r--Tests/RunCMake/XcodeProject/main.m3
-rw-r--r--Tests/RunCMake/get_filename_component/KnownComponents.cmake33
-rw-r--r--Tests/RunCMake/include_directories/DirectoryBefore-stdout.txt1
-rw-r--r--Tests/RunCMake/include_directories/DirectoryBefore.cmake4
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake1
252 files changed, 1247 insertions, 826 deletions
diff --git a/Help/command/get_filename_component.rst b/Help/command/get_filename_component.rst
index 60488da..82f9120 100644
--- a/Help/command/get_filename_component.rst
+++ b/Help/command/get_filename_component.rst
@@ -3,6 +3,8 @@ get_filename_component
Get a specific component of a full filename.
+------------------------------------------------------------------------------
+
::
get_filename_component(<VAR> <FileName> <COMP> [CACHE])
@@ -15,8 +17,6 @@ Set ``<VAR>`` to a component of ``<FileName>``, where ``<COMP>`` is one of:
NAME = File name without directory
EXT = File name longest extension (.b.c from d/a.b.c)
NAME_WE = File name without directory or longest extension
- ABSOLUTE = Full path to file
- REALPATH = Full path to existing file with symlinks resolved
PATH = Legacy alias for DIRECTORY (use for CMake <= 2.8.11)
Paths are returned with forward slashes and have no trailing slahes.
@@ -24,14 +24,41 @@ The longest file extension is always considered. If the optional
``CACHE`` argument is specified, the result variable is added to the
cache.
+------------------------------------------------------------------------------
+
+::
+
+ get_filename_component(<VAR> <FileName>
+ <COMP> [BASE_DIR <BASE_DIR>]
+ [CACHE])
+
+Set ``<VAR>`` to the absolute path of ``<FileName>``, where ``<COMP>`` is one
+of:
+
+::
+
+ ABSOLUTE = Full path to file
+ REALPATH = Full path to existing file with symlinks resolved
+
+If the provided ``<FileName>`` is a relative path, it is evaluated relative
+to the given base directory ``<BASE_DIR>``. If no base directory is
+provided, the default base directory will be
+:variable:`CMAKE_CURRENT_SOURCE_DIR`.
+
+Paths are returned with forward slashes and have no trailing slahes. If the
+optional ``CACHE`` argument is specified, the result variable is added to the
+cache.
+
+------------------------------------------------------------------------------
+
::
- get_filename_component(<VAR> FileName
+ get_filename_component(<VAR> <FileName>
PROGRAM [PROGRAM_ARGS <ARG_VAR>]
[CACHE])
-The program in ``FileName`` will be found in the system search path or
+The program in ``<FileName>`` will be found in the system search path or
left as a full path. If ``PROGRAM_ARGS`` is present with ``PROGRAM``, then
-any command-line arguments present in the ``FileName`` string are split
+any command-line arguments present in the ``<FileName>`` string are split
from the program name and stored in ``<ARG_VAR>``. This is used to
separate a program name from its arguments in a command line string.
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 9ce4971..dac16bf 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -27,6 +27,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.
+.. _`CMake Options`:
+
Options
=======
diff --git a/Help/prop_tgt/NO_SONAME.rst b/Help/prop_tgt/NO_SONAME.rst
index fc668b5..ee45ed8 100644
--- a/Help/prop_tgt/NO_SONAME.rst
+++ b/Help/prop_tgt/NO_SONAME.rst
@@ -1,11 +1,11 @@
NO_SONAME
---------
-Whether to set "soname" when linking a shared library or module.
+Whether to set "soname" when linking a shared library.
-Enable this boolean property if a generated shared library or module
+Enable this boolean property if a generated shared library
should not have "soname" set. Default is to set "soname" on all
-shared libraries and modules as long as the platform supports it.
+shared libraries as long as the platform supports it.
Generally, use this property only for leaf private libraries or
plugins. If you use it on normal shared libraries which other targets
link against, on some platforms a linker will insert a full path to
diff --git a/Help/release/dev/get-filename-component-base-dir.rst b/Help/release/dev/get-filename-component-base-dir.rst
new file mode 100644
index 0000000..c0df759
--- /dev/null
+++ b/Help/release/dev/get-filename-component-base-dir.rst
@@ -0,0 +1,6 @@
+get-filename-component-base-dir
+-------------------------------
+
+* The :command:`get_filename_component` command learned a new ``BASE_DIR``
+ subcommand. This is used to specify a base directory when calculating an
+ absolute path from a relative path.
diff --git a/Help/release/dev/modules-no-soname.rst b/Help/release/dev/modules-no-soname.rst
new file mode 100644
index 0000000..8fe74f8
--- /dev/null
+++ b/Help/release/dev/modules-no-soname.rst
@@ -0,0 +1,7 @@
+modules-no-soname
+-----------------
+
+* The ``SONAME`` field is no longer set for ``MODULE`` libraries
+ created with the :command:`add_library` command. ``MODULE``
+ libraries are meant for explicit dynamic loading at runtime.
+ They cannot be linked so ``SONAME`` is not useful.
diff --git a/Help/variable/APPLE.rst b/Help/variable/APPLE.rst
index 3afdee8..a8d2429 100644
--- a/Help/variable/APPLE.rst
+++ b/Help/variable/APPLE.rst
@@ -1,6 +1,6 @@
APPLE
-----
-True if running on Mac OS X.
+``True`` if running on Mac OS X.
-Set to true on Mac OS X.
+Set to ``true`` on Mac OS X.
diff --git a/Help/variable/BORLAND.rst b/Help/variable/BORLAND.rst
index 4af6085..badb733 100644
--- a/Help/variable/BORLAND.rst
+++ b/Help/variable/BORLAND.rst
@@ -1,6 +1,6 @@
BORLAND
-------
-True if the Borland compiler is being used.
+``True`` if the Borland compiler is being used.
-This is set to true if the Borland compiler is being used.
+This is set to ``true`` if the Borland compiler is being used.
diff --git a/Help/variable/BUILD_SHARED_LIBS.rst b/Help/variable/BUILD_SHARED_LIBS.rst
index 6f30efb..53087b2 100644
--- a/Help/variable/BUILD_SHARED_LIBS.rst
+++ b/Help/variable/BUILD_SHARED_LIBS.rst
@@ -1,10 +1,10 @@
BUILD_SHARED_LIBS
-----------------
-Global flag to cause add_library to create shared libraries if on.
+Global flag to cause :command:`add_library` to create shared libraries if on.
If present and true, this will cause all libraries to be built shared
unless the library was explicitly added as a static library. This
-variable is often added to projects as an OPTION so that each user of
-a project can decide if they want to build the project using shared or
+variable is often added to projects as an :command:`option` so that each user
+of a project can decide if they want to build the project using shared or
static libraries.
diff --git a/Help/variable/CMAKE_ABSOLUTE_DESTINATION_FILES.rst b/Help/variable/CMAKE_ABSOLUTE_DESTINATION_FILES.rst
index 3691453..b6d0054 100644
--- a/Help/variable/CMAKE_ABSOLUTE_DESTINATION_FILES.rst
+++ b/Help/variable/CMAKE_ABSOLUTE_DESTINATION_FILES.rst
@@ -1,9 +1,9 @@
CMAKE_ABSOLUTE_DESTINATION_FILES
--------------------------------
-List of files which have been installed using an ABSOLUTE DESTINATION path.
+List of files which have been installed using an ``ABSOLUTE DESTINATION`` path.
-This variable is defined by CMake-generated cmake_install.cmake
+This variable is defined by CMake-generated ``cmake_install.cmake``
scripts. It can be used (read-only) by programs or scripts that
source those install scripts. This is used by some CPack generators
(e.g. RPM).
diff --git a/Help/variable/CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES.rst b/Help/variable/CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES.rst
index 52e60b1..4191907 100644
--- a/Help/variable/CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES.rst
+++ b/Help/variable/CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES.rst
@@ -1,5 +1,5 @@
CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES
-------------------------------------
-Default value for the :prop_tgt:`ANDROID_NATIVE_LIB_DEPENDENCIES` target property.
-See that target property for additional information.
+Default value for the :prop_tgt:`ANDROID_NATIVE_LIB_DEPENDENCIES` target
+property. See that target property for additional information.
diff --git a/Help/variable/CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES.rst b/Help/variable/CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES.rst
index 8480575..7cb9527 100644
--- a/Help/variable/CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES.rst
+++ b/Help/variable/CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES.rst
@@ -1,5 +1,5 @@
CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES
------------------------------------
-Default value for the :prop_tgt:`ANDROID_NATIVE_LIB_DIRECTORIES` target property.
-See that target property for additional information.
+Default value for the :prop_tgt:`ANDROID_NATIVE_LIB_DIRECTORIES` target
+property. See that target property for additional information.
diff --git a/Help/variable/CMAKE_ARGC.rst b/Help/variable/CMAKE_ARGC.rst
index be120b8..aec9711 100644
--- a/Help/variable/CMAKE_ARGC.rst
+++ b/Help/variable/CMAKE_ARGC.rst
@@ -3,5 +3,6 @@ CMAKE_ARGC
Number of command line arguments passed to CMake in script mode.
-When run in -P script mode, CMake sets this variable to the number of
-command line arguments. See also CMAKE_ARGV0, 1, 2 ...
+When run in :ref:`-P <CMake Options>` script mode, CMake sets this variable to
+the number of command line arguments. See also :variable:`CMAKE_ARGV0`,
+``1``, ``2`` ...
diff --git a/Help/variable/CMAKE_ARGV0.rst b/Help/variable/CMAKE_ARGV0.rst
index e5ed419..8b1ecb7 100644
--- a/Help/variable/CMAKE_ARGV0.rst
+++ b/Help/variable/CMAKE_ARGV0.rst
@@ -3,7 +3,7 @@ CMAKE_ARGV0
Command line argument passed to CMake in script mode.
-When run in -P script mode, CMake sets this variable to the first
-command line argument. It then also sets CMAKE_ARGV1, CMAKE_ARGV2,
-... and so on, up to the number of command line arguments given. See
-also CMAKE_ARGC.
+When run in :ref:`-P <CMake Options>` script mode, CMake sets this variable to
+the first command line argument. It then also sets ``CMAKE_ARGV1``,
+``CMAKE_ARGV2``, ... and so on, up to the number of command line arguments
+given. See also :variable:`CMAKE_ARGC`.
diff --git a/Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst b/Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst
index a814d40..addc62d 100644
--- a/Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst
+++ b/Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst
@@ -3,11 +3,11 @@ CMAKE_AUTOMOC_RELAXED_MODE
Switch between strict and relaxed automoc mode.
-By default, :prop_tgt:`AUTOMOC` behaves exactly as described in the documentation
-of the :prop_tgt:`AUTOMOC` target property. When set to ``TRUE``, it accepts more
-input and tries to find the correct input file for ``moc`` even if it
-differs from the documented behaviour. In this mode it e.g. also
-checks whether a header file is intended to be processed by moc when a
-``"foo.moc"`` file has been included.
+By default, :prop_tgt:`AUTOMOC` behaves exactly as described in the
+documentation of the :prop_tgt:`AUTOMOC` target property. When set to
+``TRUE``, it accepts more input and tries to find the correct input file for
+``moc`` even if it differs from the documented behaviour. In this mode it
+e.g. also checks whether a header file is intended to be processed by moc
+when a ``"foo.moc"`` file has been included.
Relaxed mode has to be enabled for KDE4 compatibility.
diff --git a/Help/variable/CMAKE_AUTORCC.rst b/Help/variable/CMAKE_AUTORCC.rst
index 067f766..7426105 100644
--- a/Help/variable/CMAKE_AUTORCC.rst
+++ b/Help/variable/CMAKE_AUTORCC.rst
@@ -3,5 +3,5 @@ CMAKE_AUTORCC
Whether to handle ``rcc`` automatically for Qt targets.
-This variable is used to initialize the :prop_tgt:`AUTORCC` property on all the targets.
-See that target property for additional information.
+This variable is used to initialize the :prop_tgt:`AUTORCC` property on all
+the targets. See that target property for additional information.
diff --git a/Help/variable/CMAKE_AUTOUIC.rst b/Help/variable/CMAKE_AUTOUIC.rst
index 0beb555..5abefaa 100644
--- a/Help/variable/CMAKE_AUTOUIC.rst
+++ b/Help/variable/CMAKE_AUTOUIC.rst
@@ -3,5 +3,5 @@ CMAKE_AUTOUIC
Whether to handle ``uic`` automatically for Qt targets.
-This variable is used to initialize the :prop_tgt:`AUTOUIC` property on all the targets.
-See that target property for additional information.
+This variable is used to initialize the :prop_tgt:`AUTOUIC` property on all
+the targets. See that target property for additional information.
diff --git a/Help/variable/CMAKE_BINARY_DIR.rst b/Help/variable/CMAKE_BINARY_DIR.rst
index 703bb58..f8dd8ab 100644
--- a/Help/variable/CMAKE_BINARY_DIR.rst
+++ b/Help/variable/CMAKE_BINARY_DIR.rst
@@ -5,4 +5,4 @@ The path to the top level of the build tree.
This is the full path to the top level of the current CMake build
tree. For an in-source build, this would be the same as
-CMAKE_SOURCE_DIR.
+:variable:`CMAKE_SOURCE_DIR`.
diff --git a/Help/variable/CMAKE_BUILD_TYPE.rst b/Help/variable/CMAKE_BUILD_TYPE.rst
index 68f08ba..2d54d60 100644
--- a/Help/variable/CMAKE_BUILD_TYPE.rst
+++ b/Help/variable/CMAKE_BUILD_TYPE.rst
@@ -4,16 +4,17 @@ CMAKE_BUILD_TYPE
Specifies the build type on single-configuration generators.
This statically specifies what build type (configuration) will be
-built in this build tree. Possible values are empty, Debug, Release,
-RelWithDebInfo and MinSizeRel. This variable is only meaningful to
-single-configuration generators (such as make and Ninja) i.e. those
-which choose a single configuration when CMake runs to generate a
-build tree as opposed to multi-configuration generators which offer
-selection of the build configuration within the generated build
+built in this build tree. Possible values are empty, ``Debug``, ``Release``,
+``RelWithDebInfo`` and ``MinSizeRel``. This variable is only meaningful to
+single-configuration generators (such as :ref:`Makefile Generators` and
+:generator:`Ninja`) i.e. those which choose a single configuration when CMake
+runs to generate a build tree as opposed to multi-configuration generators
+which offer selection of the build configuration within the generated build
environment. There are many per-config properties and variables
-(usually following clean SOME_VAR_<CONFIG> order conventions), such as
-CMAKE_C_FLAGS_<CONFIG>, specified as uppercase:
-CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL]. For example,
-in a build tree configured to build type Debug, CMake will see to
-having CMAKE_C_FLAGS_DEBUG settings get added to the CMAKE_C_FLAGS
-settings. See also CMAKE_CONFIGURATION_TYPES.
+(usually following clean ``SOME_VAR_<CONFIG>`` order conventions), such as
+``CMAKE_C_FLAGS_<CONFIG>``, specified as uppercase:
+``CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL]``. For example,
+in a build tree configured to build type ``Debug``, CMake will see to
+having :variable:`CMAKE_C_FLAGS_DEBUG <CMAKE_<LANG>_FLAGS_DEBUG>` settings get
+added to the :variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>` settings. See
+also :variable:`CMAKE_CONFIGURATION_TYPES`.
diff --git a/Help/variable/CMAKE_BUILD_WITH_INSTALL_RPATH.rst b/Help/variable/CMAKE_BUILD_WITH_INSTALL_RPATH.rst
index 6875da6..5b59a6e 100644
--- a/Help/variable/CMAKE_BUILD_WITH_INSTALL_RPATH.rst
+++ b/Help/variable/CMAKE_BUILD_WITH_INSTALL_RPATH.rst
@@ -1,11 +1,11 @@
CMAKE_BUILD_WITH_INSTALL_RPATH
------------------------------
-Use the install path for the RPATH
+Use the install path for the ``RPATH``.
-Normally CMake uses the build tree for the RPATH when building
-executables etc on systems that use RPATH. When the software is
+Normally CMake uses the build tree for the ``RPATH`` when building
+executables etc on systems that use ``RPATH``. When the software is
installed the executables etc are relinked by CMake to have the
-install RPATH. If this variable is set to true then the software is
-always built with the install path for the RPATH and does not need to
+install ``RPATH``. If this variable is set to true then the software is
+always built with the install path for the ``RPATH`` and does not need to
be relinked when installed.
diff --git a/Help/variable/CMAKE_CACHEFILE_DIR.rst b/Help/variable/CMAKE_CACHEFILE_DIR.rst
index 78c7d93..8604d0e 100644
--- a/Help/variable/CMAKE_CACHEFILE_DIR.rst
+++ b/Help/variable/CMAKE_CACHEFILE_DIR.rst
@@ -1,7 +1,7 @@
CMAKE_CACHEFILE_DIR
-------------------
-The directory with the CMakeCache.txt file.
+The directory with the ``CMakeCache.txt`` file.
-This is the full path to the directory that has the CMakeCache.txt
-file in it. This is the same as CMAKE_BINARY_DIR.
+This is the full path to the directory that has the ``CMakeCache.txt``
+file in it. This is the same as :variable:`CMAKE_BINARY_DIR`.
diff --git a/Help/variable/CMAKE_CACHE_MAJOR_VERSION.rst b/Help/variable/CMAKE_CACHE_MAJOR_VERSION.rst
index e6887d9..1e53ed6 100644
--- a/Help/variable/CMAKE_CACHE_MAJOR_VERSION.rst
+++ b/Help/variable/CMAKE_CACHE_MAJOR_VERSION.rst
@@ -1,7 +1,7 @@
CMAKE_CACHE_MAJOR_VERSION
-------------------------
-Major version of CMake used to create the CMakeCache.txt file
+Major version of CMake used to create the ``CMakeCache.txt`` file
This stores the major version of CMake used to write a CMake cache
file. It is only different when a different version of CMake is run
diff --git a/Help/variable/CMAKE_CACHE_MINOR_VERSION.rst b/Help/variable/CMAKE_CACHE_MINOR_VERSION.rst
index 799f0a9..5d174a3 100644
--- a/Help/variable/CMAKE_CACHE_MINOR_VERSION.rst
+++ b/Help/variable/CMAKE_CACHE_MINOR_VERSION.rst
@@ -1,7 +1,7 @@
CMAKE_CACHE_MINOR_VERSION
-------------------------
-Minor version of CMake used to create the CMakeCache.txt file
+Minor version of CMake used to create the ``CMakeCache.txt`` file
This stores the minor version of CMake used to write a CMake cache
file. It is only different when a different version of CMake is run
diff --git a/Help/variable/CMAKE_CACHE_PATCH_VERSION.rst b/Help/variable/CMAKE_CACHE_PATCH_VERSION.rst
index e67d544..22d267c 100644
--- a/Help/variable/CMAKE_CACHE_PATCH_VERSION.rst
+++ b/Help/variable/CMAKE_CACHE_PATCH_VERSION.rst
@@ -1,7 +1,7 @@
CMAKE_CACHE_PATCH_VERSION
-------------------------
-Patch version of CMake used to create the CMakeCache.txt file
+Patch version of CMake used to create the ``CMakeCache.txt`` file
This stores the patch version of CMake used to write a CMake cache
file. It is only different when a different version of CMake is run
diff --git a/Help/variable/CMAKE_CFG_INTDIR.rst b/Help/variable/CMAKE_CFG_INTDIR.rst
index 55f7b01..dcc1aed 100644
--- a/Help/variable/CMAKE_CFG_INTDIR.rst
+++ b/Help/variable/CMAKE_CFG_INTDIR.rst
@@ -4,11 +4,11 @@ CMAKE_CFG_INTDIR
Build-time reference to per-configuration output subdirectory.
For native build systems supporting multiple configurations in the
-build tree (such as Visual Studio and Xcode), the value is a reference
-to a build-time variable specifying the name of the per-configuration
-output subdirectory. On Makefile generators this evaluates to "."
-because there is only one configuration in a build tree. Example
-values:
+build tree (such as :ref:`Visual Studio Generators` and :generator:`Xcode`),
+the value is a reference to a build-time variable specifying the name
+of the per-configuration output subdirectory. On :ref:`Makefile Generators`
+this evaluates to `.` because there is only one configuration in a build tree.
+Example values:
::
@@ -33,13 +33,14 @@ evaluated at build time. Example of intended usage:
)
add_custom_target(drive ALL DEPENDS out.txt)
-Note that CMAKE_CFG_INTDIR is no longer necessary for this purpose but
+Note that ``CMAKE_CFG_INTDIR`` is no longer necessary for this purpose but
has been left for compatibility with existing projects. Instead
-add_custom_command() recognizes executable target names in its COMMAND
-option, so "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool"
-can be replaced by just "mytool".
+:command:`add_custom_command` recognizes executable target names in its
+``COMMAND`` option, so
+``${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool`` can be replaced
+by just ``mytool``.
This variable is read-only. Setting it is undefined behavior. In
multi-configuration build systems the value of this variable is passed
-as the value of preprocessor symbol "CMAKE_INTDIR" to the compilation
+as the value of preprocessor symbol ``CMAKE_INTDIR`` to the compilation
of all source files.
diff --git a/Help/variable/CMAKE_CL_64.rst b/Help/variable/CMAKE_CL_64.rst
index 5096829..a1e86a5 100644
--- a/Help/variable/CMAKE_CL_64.rst
+++ b/Help/variable/CMAKE_CL_64.rst
@@ -1,6 +1,6 @@
CMAKE_CL_64
-----------
-Using the 64 bit compiler from Microsoft
+Using the 64-bit compiler from Microsoft
-Set to true when using the 64 bit cl compiler from Microsoft.
+Set to ``true`` when using the 64-bit ``cl`` compiler from Microsoft.
diff --git a/Help/variable/CMAKE_COLOR_MAKEFILE.rst b/Help/variable/CMAKE_COLOR_MAKEFILE.rst
index 170baf3..bb86ecc 100644
--- a/Help/variable/CMAKE_COLOR_MAKEFILE.rst
+++ b/Help/variable/CMAKE_COLOR_MAKEFILE.rst
@@ -1,7 +1,7 @@
CMAKE_COLOR_MAKEFILE
--------------------
-Enables color output when using the Makefile generator.
+Enables color output when using the :ref:`Makefile Generators`.
When enabled, the generated Makefiles will produce colored output.
-Default is ON.
+Default is ``ON``.
diff --git a/Help/variable/CMAKE_COMMAND.rst b/Help/variable/CMAKE_COMMAND.rst
index f4e5f1e..f80b46c 100644
--- a/Help/variable/CMAKE_COMMAND.rst
+++ b/Help/variable/CMAKE_COMMAND.rst
@@ -1,8 +1,8 @@
CMAKE_COMMAND
-------------
-The full path to the cmake executable.
+The full path to the :manual:`cmake(1)` executable.
-This is the full path to the CMake executable cmake which is useful
-from custom commands that want to use the cmake -E option for portable
-system commands. (e.g. /usr/local/bin/cmake
+This is the full path to the CMake executable :manual:`cmake(1)` which is
+useful from custom commands that want to use the ``cmake -E`` option for
+portable system commands. (e.g. ``/usr/local/bin/cmake``)
diff --git a/Help/variable/CMAKE_COMPILER_IS_GNULANG.rst b/Help/variable/CMAKE_COMPILER_IS_GNULANG.rst
index bc5652f..4b652c0 100644
--- a/Help/variable/CMAKE_COMPILER_IS_GNULANG.rst
+++ b/Help/variable/CMAKE_COMPILER_IS_GNULANG.rst
@@ -3,10 +3,10 @@ CMAKE_COMPILER_IS_GNU<LANG>
True if the compiler is GNU.
-If the selected <LANG> compiler is the GNU compiler then this is TRUE,
-if not it is FALSE. Unlike the other per-language variables, this
+If the selected ``<LANG>`` compiler is the GNU compiler then this is ``TRUE``,
+if not it is ``FALSE``. Unlike the other per-language variables, this
uses the GNU syntax for identifying languages instead of the CMake
-syntax. Recognized values of the <LANG> suffix are:
+syntax. Recognized values of the ``<LANG>`` suffix are:
::
diff --git a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
index 986b969..34e99eb 100644
--- a/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
+++ b/Help/variable/CMAKE_CONFIGURATION_TYPES.rst
@@ -4,7 +4,7 @@ CMAKE_CONFIGURATION_TYPES
Specifies the available build types on multi-config generators.
This specifies what build types (configurations) will be available
-such as Debug, Release, RelWithDebInfo etc. This has reasonable
+such as ``Debug``, ``Release``, ``RelWithDebInfo`` etc. This has reasonable
defaults on most platforms, but can be extended to provide other build
-types. See also CMAKE_BUILD_TYPE for details of managing
-configuration data, and CMAKE_CFG_INTDIR.
+types. See also :variable:`CMAKE_BUILD_TYPE` for details of managing
+configuration data, and :variable:`CMAKE_CFG_INTDIR`.
diff --git a/Help/variable/CMAKE_CONFIG_POSTFIX.rst b/Help/variable/CMAKE_CONFIG_POSTFIX.rst
index af38bed..e686a43 100644
--- a/Help/variable/CMAKE_CONFIG_POSTFIX.rst
+++ b/Help/variable/CMAKE_CONFIG_POSTFIX.rst
@@ -1,7 +1,7 @@
CMAKE_<CONFIG>_POSTFIX
----------------------
-Default filename postfix for libraries under configuration <CONFIG>.
+Default filename postfix for libraries under configuration ``<CONFIG>``.
-When a non-executable target is created its <CONFIG>_POSTFIX target
-property is initialized with the value of this variable if it is set.
+When a non-executable target is created its :prop_tgt:`<CONFIG>_POSTFIX`
+target property is initialized with the value of this variable if it is set.
diff --git a/Help/variable/CMAKE_CTEST_COMMAND.rst b/Help/variable/CMAKE_CTEST_COMMAND.rst
index d5dd2c3..b2942e2 100644
--- a/Help/variable/CMAKE_CTEST_COMMAND.rst
+++ b/Help/variable/CMAKE_CTEST_COMMAND.rst
@@ -1,8 +1,8 @@
CMAKE_CTEST_COMMAND
-------------------
-Full path to ctest command installed with cmake.
+Full path to :manual:`ctest(1)` command installed with CMake.
-This is the full path to the CTest executable ctest which is useful
-from custom commands that want to use the cmake -E option for portable
-system commands.
+This is the full path to the CTest executable :manual:`ctest(1)` which is
+useful from custom commands that want to use the :manual:`cmake(1)` ``-E``
+option for portable system commands.
diff --git a/Help/variable/CMAKE_CURRENT_BINARY_DIR.rst b/Help/variable/CMAKE_CURRENT_BINARY_DIR.rst
index fb55a11..cc3b639 100644
--- a/Help/variable/CMAKE_CURRENT_BINARY_DIR.rst
+++ b/Help/variable/CMAKE_CURRENT_BINARY_DIR.rst
@@ -4,7 +4,7 @@ CMAKE_CURRENT_BINARY_DIR
The path to the binary directory currently being processed.
This the full path to the build directory that is currently being
-processed by cmake. Each directory added by add_subdirectory will
+processed by cmake. Each directory added by :command:`add_subdirectory` will
create a binary directory in the build tree, and as it is being
processed this variable will be set. For in-source builds this is the
current source directory being processed.
diff --git a/Help/variable/CMAKE_CURRENT_LIST_DIR.rst b/Help/variable/CMAKE_CURRENT_LIST_DIR.rst
index b816821..ebc3ab9 100644
--- a/Help/variable/CMAKE_CURRENT_LIST_DIR.rst
+++ b/Help/variable/CMAKE_CURRENT_LIST_DIR.rst
@@ -5,8 +5,8 @@ Full directory of the listfile currently being processed.
As CMake processes the listfiles in your project this variable will
always be set to the directory where the listfile which is currently
-being processed (CMAKE_CURRENT_LIST_FILE) is located. The value has
-dynamic scope. When CMake starts processing commands in a source file
+being processed (:variable:`CMAKE_CURRENT_LIST_FILE`) is located. The value
+has dynamic scope. When CMake starts processing commands in a source file
it sets this variable to the directory where this file is located.
When CMake finishes processing commands from the file it restores the
previous value. Therefore the value of the variable inside a macro or
@@ -14,4 +14,4 @@ function is the directory of the file invoking the bottom-most entry
on the call stack, not the directory of the file containing the macro
or function definition.
-See also CMAKE_CURRENT_LIST_FILE.
+See also :variable:`CMAKE_CURRENT_LIST_FILE`.
diff --git a/Help/variable/CMAKE_CURRENT_LIST_FILE.rst b/Help/variable/CMAKE_CURRENT_LIST_FILE.rst
index 910d7b4..84b0eee 100644
--- a/Help/variable/CMAKE_CURRENT_LIST_FILE.rst
+++ b/Help/variable/CMAKE_CURRENT_LIST_FILE.rst
@@ -12,4 +12,4 @@ value. Therefore the value of the variable inside a macro or function
is the file invoking the bottom-most entry on the call stack, not the
file containing the macro or function definition.
-See also CMAKE_PARENT_LIST_FILE.
+See also :variable:`CMAKE_PARENT_LIST_FILE`.
diff --git a/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst b/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst
index f003227..5c59f95 100644
--- a/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst
+++ b/Help/variable/CMAKE_CXX_COMPILE_FEATURES.rst
@@ -4,8 +4,8 @@ CMAKE_CXX_COMPILE_FEATURES
List of features known to the C++ compiler
These features are known to be available for use with the C++ compiler. This
-list is a subset of the features listed in the :prop_gbl:`CMAKE_CXX_KNOWN_FEATURES`
-global property.
+list is a subset of the features listed in the
+:prop_gbl:`CMAKE_CXX_KNOWN_FEATURES` global property.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_CXX_EXTENSIONS.rst b/Help/variable/CMAKE_CXX_EXTENSIONS.rst
index b14d753..4a92425 100644
--- a/Help/variable/CMAKE_CXX_EXTENSIONS.rst
+++ b/Help/variable/CMAKE_CXX_EXTENSIONS.rst
@@ -1,7 +1,7 @@
CMAKE_CXX_EXTENSIONS
--------------------
-Default value for ``CXX_EXTENSIONS`` property of targets.
+Default value for :prop_tgt:`CXX_EXTENSIONS` property of targets.
This variable is used to initialize the :prop_tgt:`CXX_EXTENSIONS`
property on all targets. See that target property for additional
diff --git a/Help/variable/CMAKE_CXX_STANDARD.rst b/Help/variable/CMAKE_CXX_STANDARD.rst
index 2bc4525..8a8bdff 100644
--- a/Help/variable/CMAKE_CXX_STANDARD.rst
+++ b/Help/variable/CMAKE_CXX_STANDARD.rst
@@ -1,7 +1,7 @@
CMAKE_CXX_STANDARD
------------------
-Default value for ``CXX_STANDARD`` property of targets.
+Default value for :prop_tgt:`CXX_STANDARD` property of targets.
This variable is used to initialize the :prop_tgt:`CXX_STANDARD`
property on all targets. See that target property for additional
diff --git a/Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst
index 14ffcd1..4c71058 100644
--- a/Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst
+++ b/Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst
@@ -1,7 +1,7 @@
CMAKE_CXX_STANDARD_REQUIRED
---------------------------
-Default value for ``CXX_STANDARD_REQUIRED`` property of targets.
+Default value for :prop_tgt:`CXX_STANDARD_REQUIRED` property of targets.
This variable is used to initialize the :prop_tgt:`CXX_STANDARD_REQUIRED`
property on all targets. See that target property for additional
diff --git a/Help/variable/CMAKE_C_COMPILE_FEATURES.rst b/Help/variable/CMAKE_C_COMPILE_FEATURES.rst
index df66eae..8d1eca0 100644
--- a/Help/variable/CMAKE_C_COMPILE_FEATURES.rst
+++ b/Help/variable/CMAKE_C_COMPILE_FEATURES.rst
@@ -4,8 +4,8 @@ CMAKE_C_COMPILE_FEATURES
List of features known to the C compiler
These features are known to be available for use with the C compiler. This
-list is a subset of the features listed in the :prop_gbl:`CMAKE_C_KNOWN_FEATURES`
-global property.
+list is a subset of the features listed in the
+:prop_gbl:`CMAKE_C_KNOWN_FEATURES` global property.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_C_EXTENSIONS.rst b/Help/variable/CMAKE_C_EXTENSIONS.rst
index 25bec12..fa510d4 100644
--- a/Help/variable/CMAKE_C_EXTENSIONS.rst
+++ b/Help/variable/CMAKE_C_EXTENSIONS.rst
@@ -1,7 +1,7 @@
CMAKE_C_EXTENSIONS
------------------
-Default value for ``C_EXTENSIONS`` property of targets.
+Default value for :prop_tgt:`C_EXTENSIONS` property of targets.
This variable is used to initialize the :prop_tgt:`C_EXTENSIONS`
property on all targets. See that target property for additional
diff --git a/Help/variable/CMAKE_C_STANDARD.rst b/Help/variable/CMAKE_C_STANDARD.rst
index 2eb4e43..b55e00c 100644
--- a/Help/variable/CMAKE_C_STANDARD.rst
+++ b/Help/variable/CMAKE_C_STANDARD.rst
@@ -1,7 +1,7 @@
CMAKE_C_STANDARD
----------------
-Default value for ``C_STANDARD`` property of targets.
+Default value for :prop_tgt:`C_STANDARD` property of targets.
This variable is used to initialize the :prop_tgt:`C_STANDARD`
property on all targets. See that target property for additional
diff --git a/Help/variable/CMAKE_C_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_C_STANDARD_REQUIRED.rst
index 5e415da..7f70f6e 100644
--- a/Help/variable/CMAKE_C_STANDARD_REQUIRED.rst
+++ b/Help/variable/CMAKE_C_STANDARD_REQUIRED.rst
@@ -1,7 +1,7 @@
CMAKE_C_STANDARD_REQUIRED
-------------------------
-Default value for ``C_STANDARD_REQUIRED`` property of targets.
+Default value for :prop_tgt:`C_STANDARD_REQUIRED` property of targets.
This variable is used to initialize the :prop_tgt:`C_STANDARD_REQUIRED`
property on all targets. See that target property for additional
diff --git a/Help/variable/CMAKE_DEBUG_POSTFIX.rst b/Help/variable/CMAKE_DEBUG_POSTFIX.rst
index fde24b2..08577a5 100644
--- a/Help/variable/CMAKE_DEBUG_POSTFIX.rst
+++ b/Help/variable/CMAKE_DEBUG_POSTFIX.rst
@@ -1,7 +1,7 @@
CMAKE_DEBUG_POSTFIX
-------------------
-See variable CMAKE_<CONFIG>_POSTFIX.
+See variable :variable:`CMAKE_<CONFIG>_POSTFIX`.
This variable is a special case of the more-general
-CMAKE_<CONFIG>_POSTFIX variable for the DEBUG configuration.
+:variable:`CMAKE_<CONFIG>_POSTFIX` variable for the `DEBUG` configuration.
diff --git a/Help/variable/CMAKE_DEBUG_TARGET_PROPERTIES.rst b/Help/variable/CMAKE_DEBUG_TARGET_PROPERTIES.rst
index e200b86..513276e 100644
--- a/Help/variable/CMAKE_DEBUG_TARGET_PROPERTIES.rst
+++ b/Help/variable/CMAKE_DEBUG_TARGET_PROPERTIES.rst
@@ -9,6 +9,6 @@ only be used when evaluating the :prop_tgt:`INCLUDE_DIRECTORIES`,
:prop_tgt:`COMPILE_DEFINITIONS`, :prop_tgt:`COMPILE_OPTIONS`,
:prop_tgt:`AUTOUIC_OPTIONS`, :prop_tgt:`SOURCES`, :prop_tgt:`COMPILE_FEATURES`,
:prop_tgt:`POSITION_INDEPENDENT_CODE` target properties and any other property
-listed in :prop_tgt:`COMPATIBLE_INTERFACE_STRING` and other ``COMPATIBLE_INTERFACE_``
-properties. It outputs an origin for each entry in the target property.
-Default is unset.
+listed in :prop_tgt:`COMPATIBLE_INTERFACE_STRING` and other
+``COMPATIBLE_INTERFACE_`` properties. It outputs an origin for each entry in
+the target property. Default is unset.
diff --git a/Help/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.rst b/Help/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.rst
index bcb277c..ed60020 100644
--- a/Help/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.rst
+++ b/Help/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.rst
@@ -1,10 +1,11 @@
CMAKE_DISABLE_FIND_PACKAGE_<PackageName>
----------------------------------------
-Variable for disabling find_package() calls.
+Variable for disabling :command:`find_package` calls.
-Every non-REQUIRED find_package() call in a project can be disabled by
-setting the variable CMAKE_DISABLE_FIND_PACKAGE_<PackageName> to TRUE.
+Every non-``REQUIRED`` :command:`find_package` call in a project can be
+disabled by setting the variable
+``CMAKE_DISABLE_FIND_PACKAGE_<PackageName>`` to ``TRUE``.
This can be used to build a project without an optional package,
although that package is installed.
@@ -12,4 +13,4 @@ This switch should be used during the initial CMake run. Otherwise if
the package has already been found in a previous CMake run, the
variables which have been stored in the cache will still be there. In
that case it is recommended to remove the cache variables for this
-package from the cache using the cache editor or cmake -U
+package from the cache using the cache editor or :manual:`cmake(1)` ``-U``
diff --git a/Help/variable/CMAKE_DL_LIBS.rst b/Help/variable/CMAKE_DL_LIBS.rst
index cae4565..1fe7641 100644
--- a/Help/variable/CMAKE_DL_LIBS.rst
+++ b/Help/variable/CMAKE_DL_LIBS.rst
@@ -1,7 +1,7 @@
CMAKE_DL_LIBS
-------------
-Name of library containing dlopen and dlcose.
+Name of library containing ``dlopen`` and ``dlcose``.
-The name of the library that has dlopen and dlclose in it, usually
--ldl on most UNIX machines.
+The name of the library that has ``dlopen`` and ``dlclose`` in it, usually
+``-ldl`` on most UNIX machines.
diff --git a/Help/variable/CMAKE_EDIT_COMMAND.rst b/Help/variable/CMAKE_EDIT_COMMAND.rst
index 562aa0b..2f4ab1f 100644
--- a/Help/variable/CMAKE_EDIT_COMMAND.rst
+++ b/Help/variable/CMAKE_EDIT_COMMAND.rst
@@ -1,8 +1,8 @@
CMAKE_EDIT_COMMAND
------------------
-Full path to cmake-gui or ccmake. Defined only for Makefile generators
-when not using an "extra" generator for an IDE.
+Full path to :manual:`cmake-gui(1)` or :manual:`ccmake(1)`. Defined only for
+:ref:`Makefile Generators` when not using an "extra" generator for an IDE.
This is the full path to the CMake executable that can graphically
-edit the cache. For example, cmake-gui or ccmake.
+edit the cache. For example, :manual:`cmake-gui(1)` or :manual:`ccmake(1)`.
diff --git a/Help/variable/CMAKE_ERROR_DEPRECATED.rst b/Help/variable/CMAKE_ERROR_DEPRECATED.rst
index 68befc2..39dc4a8 100644
--- a/Help/variable/CMAKE_ERROR_DEPRECATED.rst
+++ b/Help/variable/CMAKE_ERROR_DEPRECATED.rst
@@ -3,9 +3,9 @@ CMAKE_ERROR_DEPRECATED
Whether to issue deprecation errors for macros and functions.
-If TRUE, this can be used by macros and functions to issue fatal
+If ``TRUE``, this can be used by macros and functions to issue fatal
errors when deprecated macros or functions are used. This variable is
-FALSE by default.
+``FALSE`` by default.
These errors can be enabled with the ``-Werror=deprecated`` option, or
disabled with the ``-Wno-error=deprecated`` option, when running
diff --git a/Help/variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst b/Help/variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst
index 651d68d..38e9b7b 100644
--- a/Help/variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst
+++ b/Help/variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst
@@ -1,9 +1,10 @@
CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
-------------------------------------------
-Ask cmake_install.cmake script to error out as soon as a file with absolute INSTALL DESTINATION is encountered.
+Ask ``cmake_install.cmake`` script to error out as soon as a file with
+absolute ``INSTALL DESTINATION`` is encountered.
The fatal error is emitted before the installation of the offending
file takes place. This variable is used by CMake-generated
-cmake_install.cmake scripts. If one sets this variable to ON while
+``cmake_install.cmake`` scripts. If one sets this variable to ``ON`` while
running the script, it may get fatal error messages from the script.
diff --git a/Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst b/Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst
index 45c313c..356590f 100644
--- a/Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst
+++ b/Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst
@@ -3,7 +3,7 @@ CMAKE_EXECUTABLE_SUFFIX
The suffix for executables on this platform.
-The suffix to use for the end of an executable filename if any, .exe
+The suffix to use for the end of an executable filename if any, ``.exe``
on Windows.
-CMAKE_EXECUTABLE_SUFFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_EXECUTABLE_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_EXE_LINKER_FLAGS_CONFIG.rst b/Help/variable/CMAKE_EXE_LINKER_FLAGS_CONFIG.rst
index dcaf300..0cd8113 100644
--- a/Help/variable/CMAKE_EXE_LINKER_FLAGS_CONFIG.rst
+++ b/Help/variable/CMAKE_EXE_LINKER_FLAGS_CONFIG.rst
@@ -3,5 +3,5 @@ CMAKE_EXE_LINKER_FLAGS_<CONFIG>
Flags to be used when linking an executable.
-Same as CMAKE_C_FLAGS_* but used by the linker when creating
+Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating
executables.
diff --git a/Help/variable/CMAKE_EXTRA_GENERATOR.rst b/Help/variable/CMAKE_EXTRA_GENERATOR.rst
index 71aec92..4d513e4 100644
--- a/Help/variable/CMAKE_EXTRA_GENERATOR.rst
+++ b/Help/variable/CMAKE_EXTRA_GENERATOR.rst
@@ -1,9 +1,10 @@
CMAKE_EXTRA_GENERATOR
---------------------
-The extra generator used to build the project.
+The extra generator used to build the project. See
+:manual:`cmake-generators(7)`.
When using the Eclipse, CodeBlocks or KDevelop generators, CMake
-generates Makefiles (CMAKE_GENERATOR) and additionally project files
-for the respective IDE. This IDE project file generator is stored in
-CMAKE_EXTRA_GENERATOR (e.g. "Eclipse CDT4").
+generates Makefiles (:variable:`CMAKE_GENERATOR`) and additionally project
+files for the respective IDE. This IDE project file generator is stored in
+``CMAKE_EXTRA_GENERATOR`` (e.g. ``Eclipse CDT4``).
diff --git a/Help/variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES.rst b/Help/variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES.rst
index 6187a7a..a130adb 100644
--- a/Help/variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES.rst
+++ b/Help/variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES.rst
@@ -4,6 +4,6 @@ CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
Additional suffixes for shared libraries.
Extensions for shared libraries other than that specified by
-CMAKE_SHARED_LIBRARY_SUFFIX, if any. CMake uses this to recognize
+:variable:`CMAKE_SHARED_LIBRARY_SUFFIX`, if any. CMake uses this to recognize
external shared library files during analysis of libraries linked by a
target.
diff --git a/Help/variable/CMAKE_FIND_LIBRARY_PREFIXES.rst b/Help/variable/CMAKE_FIND_LIBRARY_PREFIXES.rst
index 1a9e7ce..58354b2 100644
--- a/Help/variable/CMAKE_FIND_LIBRARY_PREFIXES.rst
+++ b/Help/variable/CMAKE_FIND_LIBRARY_PREFIXES.rst
@@ -4,6 +4,6 @@ CMAKE_FIND_LIBRARY_PREFIXES
Prefixes to prepend when looking for libraries.
This specifies what prefixes to add to library names when the
-find_library command looks for libraries. On UNIX systems this is
-typically lib, meaning that when trying to find the foo library it
-will look for libfoo.
+:command:`find_library` command looks for libraries. On UNIX systems this is
+typically ``lib``, meaning that when trying to find the ``foo`` library it
+will look for ``libfoo``.
diff --git a/Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst b/Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst
index c533909..4a64e33 100644
--- a/Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst
+++ b/Help/variable/CMAKE_FIND_LIBRARY_SUFFIXES.rst
@@ -4,6 +4,6 @@ CMAKE_FIND_LIBRARY_SUFFIXES
Suffixes to append when looking for libraries.
This specifies what suffixes to add to library names when the
-find_library command looks for libraries. On Windows systems this is
-typically .lib and .dll, meaning that when trying to find the foo
-library it will look for foo.dll etc.
+:command:`find_library` command looks for libraries. On Windows systems this
+is typically ``.lib`` and ``.dll``, meaning that when trying to find the
+``foo`` library it will look for ``foo.dll`` etc.
diff --git a/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst b/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst
index 70d920b..c49d264 100644
--- a/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst
+++ b/Help/variable/CMAKE_FIND_NO_INSTALL_PREFIX.rst
@@ -8,8 +8,8 @@ CMake adds the :variable:`CMAKE_INSTALL_PREFIX` and the
:variable:`CMAKE_SYSTEM_PREFIX_PATH` by default. This variable may be set
on the command line to control that behavior.
-Set :variable:`CMAKE_FIND_NO_INSTALL_PREFIX` to TRUE to tell find_package not
-to search in the :variable:`CMAKE_INSTALL_PREFIX` or
-:variable:`CMAKE_STAGING_PREFIX` by default. Note that the
+Set ``CMAKE_FIND_NO_INSTALL_PREFIX`` to ``TRUE`` to tell
+:command:`find_package` not to search in the :variable:`CMAKE_INSTALL_PREFIX`
+or :variable:`CMAKE_STAGING_PREFIX` by default. Note that the
prefix may still be searched for other reasons, such as being the same prefix
as the CMake installation, or for being a built-in system prefix.
diff --git a/Help/variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE.rst b/Help/variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE.rst
index 5d7599c..f1116bb 100644
--- a/Help/variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE.rst
+++ b/Help/variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE.rst
@@ -1,19 +1,19 @@
CMAKE_FIND_PACKAGE_WARN_NO_MODULE
---------------------------------
-Tell find_package to warn if called without an explicit mode.
+Tell :command:`find_package` to warn if called without an explicit mode.
-If find_package is called without an explicit mode option (MODULE,
-CONFIG or NO_MODULE) and no Find<pkg>.cmake module is in
-CMAKE_MODULE_PATH then CMake implicitly assumes that the caller
-intends to search for a package configuration file. If no package
+If :command:`find_package` is called without an explicit mode option
+(``MODULE``, ``CONFIG``, or ``NO_MODULE``) and no ``Find<pkg>.cmake`` module
+is in :variable:`CMAKE_MODULE_PATH` then CMake implicitly assumes that the
+caller intends to search for a package configuration file. If no package
configuration file is found then the wording of the failure message
must account for both the case that the package is really missing and
the case that the project has a bug and failed to provide the intended
Find module. If instead the caller specifies an explicit mode option
then the failure message can be more specific.
-Set CMAKE_FIND_PACKAGE_WARN_NO_MODULE to TRUE to tell find_package to
-warn when it implicitly assumes Config mode. This helps developers
-enforce use of an explicit mode in all calls to find_package within a
-project.
+Set ``CMAKE_FIND_PACKAGE_WARN_NO_MODULE`` to ``TRUE`` to tell
+:command:`find_package` to warn when it implicitly assumes Config mode. This
+helps developers enforce use of an explicit mode in all calls to
+:command:`find_package` within a project.
diff --git a/Help/variable/CMAKE_FIND_ROOT_PATH.rst b/Help/variable/CMAKE_FIND_ROOT_PATH.rst
index ccf5234..ba2cf31 100644
--- a/Help/variable/CMAKE_FIND_ROOT_PATH.rst
+++ b/Help/variable/CMAKE_FIND_ROOT_PATH.rst
@@ -4,5 +4,5 @@ CMAKE_FIND_ROOT_PATH
:ref:`;-list <CMake Language Lists>` of root paths to search on the filesystem.
This variable is most useful when cross-compiling. CMake uses the paths in
-this list as alternative roots to find filesystem items with :command:`find_package`,
-:command:`find_library` etc.
+this list as alternative roots to find filesystem items with
+:command:`find_package`, :command:`find_library` etc.
diff --git a/Help/variable/CMAKE_Fortran_FORMAT.rst b/Help/variable/CMAKE_Fortran_FORMAT.rst
index c0e971c..1406e59 100644
--- a/Help/variable/CMAKE_Fortran_FORMAT.rst
+++ b/Help/variable/CMAKE_Fortran_FORMAT.rst
@@ -1,7 +1,7 @@
CMAKE_Fortran_FORMAT
--------------------
-Set to FIXED or FREE to indicate the Fortran source layout.
+Set to ``FIXED`` or ``FREE`` to indicate the Fortran source layout.
-This variable is used to initialize the Fortran_FORMAT property on all
-the targets. See that target property for additional information.
+This variable is used to initialize the :prop_tgt:`Fortran_FORMAT` property on
+all the targets. See that target property for additional information.
diff --git a/Help/variable/CMAKE_Fortran_MODDIR_DEFAULT.rst b/Help/variable/CMAKE_Fortran_MODDIR_DEFAULT.rst
index a8dfcdf..5aeab07 100644
--- a/Help/variable/CMAKE_Fortran_MODDIR_DEFAULT.rst
+++ b/Help/variable/CMAKE_Fortran_MODDIR_DEFAULT.rst
@@ -3,6 +3,6 @@ CMAKE_Fortran_MODDIR_DEFAULT
Fortran default module output directory.
-Most Fortran compilers write .mod files to the current working
-directory. For those that do not, this is set to "." and used when
-the Fortran_MODULE_DIRECTORY target property is not set.
+Most Fortran compilers write ``.mod`` files to the current working
+directory. For those that do not, this is set to ``.`` and used when
+the :prop_tgt:`Fortran_MODULE_DIRECTORY` target property is not set.
diff --git a/Help/variable/CMAKE_Fortran_MODDIR_FLAG.rst b/Help/variable/CMAKE_Fortran_MODDIR_FLAG.rst
index 4b32df3..1da55ca 100644
--- a/Help/variable/CMAKE_Fortran_MODDIR_FLAG.rst
+++ b/Help/variable/CMAKE_Fortran_MODDIR_FLAG.rst
@@ -4,4 +4,4 @@ CMAKE_Fortran_MODDIR_FLAG
Fortran flag for module output directory.
This stores the flag needed to pass the value of the
-Fortran_MODULE_DIRECTORY target property to the compiler.
+:prop_tgt:`Fortran_MODULE_DIRECTORY` target property to the compiler.
diff --git a/Help/variable/CMAKE_Fortran_MODOUT_FLAG.rst b/Help/variable/CMAKE_Fortran_MODOUT_FLAG.rst
index a232213..2f83880 100644
--- a/Help/variable/CMAKE_Fortran_MODOUT_FLAG.rst
+++ b/Help/variable/CMAKE_Fortran_MODOUT_FLAG.rst
@@ -3,5 +3,5 @@ CMAKE_Fortran_MODOUT_FLAG
Fortran flag to enable module output.
-Most Fortran compilers write .mod files out by default. For others,
+Most Fortran compilers write ``.mod`` files out by default. For others,
this stores the flag needed to enable module output.
diff --git a/Help/variable/CMAKE_Fortran_MODULE_DIRECTORY.rst b/Help/variable/CMAKE_Fortran_MODULE_DIRECTORY.rst
index b1d49d8..3c7edc1 100644
--- a/Help/variable/CMAKE_Fortran_MODULE_DIRECTORY.rst
+++ b/Help/variable/CMAKE_Fortran_MODULE_DIRECTORY.rst
@@ -3,6 +3,6 @@ CMAKE_Fortran_MODULE_DIRECTORY
Fortran module output directory.
-This variable is used to initialize the Fortran_MODULE_DIRECTORY
+This variable is used to initialize the :prop_tgt:`Fortran_MODULE_DIRECTORY`
property on all the targets. See that target property for additional
information.
diff --git a/Help/variable/CMAKE_GENERATOR.rst b/Help/variable/CMAKE_GENERATOR.rst
index a4e70a5..3f6ebc1 100644
--- a/Help/variable/CMAKE_GENERATOR.rst
+++ b/Help/variable/CMAKE_GENERATOR.rst
@@ -1,7 +1,7 @@
CMAKE_GENERATOR
---------------
-The generator used to build the project.
+The generator used to build the project. See :manual:`cmake-generators(7)`.
The name of the generator that is being used to generate the build
-files. (e.g. "Unix Makefiles", "Visual Studio 6", etc.)
+files. (e.g. ``Unix Makefiles``, ``Visual Studio 6``, etc.)
diff --git a/Help/variable/CMAKE_GENERATOR_PLATFORM.rst b/Help/variable/CMAKE_GENERATOR_PLATFORM.rst
index 5559eb7..a5c284a 100644
--- a/Help/variable/CMAKE_GENERATOR_PLATFORM.rst
+++ b/Help/variable/CMAKE_GENERATOR_PLATFORM.rst
@@ -5,8 +5,8 @@ Generator-specific target platform name specified by user.
Some CMake generators support a target platform name to be given
to the native build system to choose a compiler toolchain.
-If the user specifies a platform name (e.g. via the cmake -A option)
-the value will be available in this variable.
+If the user specifies a platform name (e.g. via the :manual:`cmake(1)` ``-A``
+option) the value will be available in this variable.
The value of this variable should never be modified by project code.
A toolchain file specified by the :variable:`CMAKE_TOOLCHAIN_FILE`
diff --git a/Help/variable/CMAKE_GENERATOR_TOOLSET.rst b/Help/variable/CMAKE_GENERATOR_TOOLSET.rst
index 9ccc8b3..89abe54 100644
--- a/Help/variable/CMAKE_GENERATOR_TOOLSET.rst
+++ b/Help/variable/CMAKE_GENERATOR_TOOLSET.rst
@@ -5,8 +5,8 @@ Native build system toolset name specified by user.
Some CMake generators support a toolset name to be given to the native
build system to choose a compiler. If the user specifies a toolset
-name (e.g. via the cmake -T option) the value will be available in
-this variable.
+name (e.g. via the :manual:`cmake(1)` ``-T`` option) the value will be
+available in this variable.
The value of this variable should never be modified by project code.
A toolchain file specified by the :variable:`CMAKE_TOOLCHAIN_FILE`
diff --git a/Help/variable/CMAKE_GNUtoMS.rst b/Help/variable/CMAKE_GNUtoMS.rst
index e253f59..9c0f59e 100644
--- a/Help/variable/CMAKE_GNUtoMS.rst
+++ b/Help/variable/CMAKE_GNUtoMS.rst
@@ -1,8 +1,8 @@
CMAKE_GNUtoMS
-------------
-Convert GNU import libraries (.dll.a) to MS format (.lib).
+Convert GNU import libraries (``.dll.a``) to MS format (``.lib``).
-This variable is used to initialize the GNUtoMS property on targets
-when they are created. See that target property for additional
+This variable is used to initialize the :prop_tgt:`GNUtoMS` property on
+targets when they are created. See that target property for additional
information.
diff --git a/Help/variable/CMAKE_HOST_APPLE.rst b/Help/variable/CMAKE_HOST_APPLE.rst
index d4b8483..ac7b030 100644
--- a/Help/variable/CMAKE_HOST_APPLE.rst
+++ b/Help/variable/CMAKE_HOST_APPLE.rst
@@ -1,6 +1,6 @@
CMAKE_HOST_APPLE
----------------
-True for Apple OS X operating systems.
+``True`` for Apple OS X operating systems.
-Set to true when the host system is Apple OS X.
+Set to ``true`` when the host system is Apple OS X.
diff --git a/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst b/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
index a221de9..e5e6f67 100644
--- a/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
+++ b/Help/variable/CMAKE_HOST_SYSTEM_NAME.rst
@@ -4,5 +4,5 @@ CMAKE_HOST_SYSTEM_NAME
Name of the OS CMake is running on.
On systems that have the uname command, this variable is set to the
-output of uname -s. ``Linux``, ``Windows``, and ``Darwin`` for Mac OS X
+output of ``uname -s``. ``Linux``, ``Windows``, and ``Darwin`` for Mac OS X
are the values found on the big three operating systems.
diff --git a/Help/variable/CMAKE_HOST_SYSTEM_PROCESSOR.rst b/Help/variable/CMAKE_HOST_SYSTEM_PROCESSOR.rst
index 790565a..ba8a850 100644
--- a/Help/variable/CMAKE_HOST_SYSTEM_PROCESSOR.rst
+++ b/Help/variable/CMAKE_HOST_SYSTEM_PROCESSOR.rst
@@ -3,6 +3,6 @@ CMAKE_HOST_SYSTEM_PROCESSOR
The name of the CPU CMake is running on.
-On systems that support uname, this variable is set to the output of
-uname -p, on windows it is set to the value of the environment variable
+On systems that support ``uname``, this variable is set to the output of
+``uname -p``. On Windows it is set to the value of the environment variable
``PROCESSOR_ARCHITECTURE``.
diff --git a/Help/variable/CMAKE_HOST_SYSTEM_VERSION.rst b/Help/variable/CMAKE_HOST_SYSTEM_VERSION.rst
index e7e0052..ed23070 100644
--- a/Help/variable/CMAKE_HOST_SYSTEM_VERSION.rst
+++ b/Help/variable/CMAKE_HOST_SYSTEM_VERSION.rst
@@ -4,5 +4,5 @@ CMAKE_HOST_SYSTEM_VERSION
The OS version CMake is running on.
A numeric version string for the system. On systems that support
-uname, this variable is set to the output of uname -r. On other
+``uname``, this variable is set to the output of ``uname -r``. On other
systems this is set to major-minor version numbers.
diff --git a/Help/variable/CMAKE_HOST_UNIX.rst b/Help/variable/CMAKE_HOST_UNIX.rst
index bbefba7..817a957 100644
--- a/Help/variable/CMAKE_HOST_UNIX.rst
+++ b/Help/variable/CMAKE_HOST_UNIX.rst
@@ -1,7 +1,7 @@
CMAKE_HOST_UNIX
---------------
-True for UNIX and UNIX like operating systems.
+``True`` for UNIX and UNIX like operating systems.
-Set to true when the host system is UNIX or UNIX like (i.e. APPLE and
+Set to ``true`` when the host system is UNIX or UNIX like (i.e. APPLE and
CYGWIN).
diff --git a/Help/variable/CMAKE_HOST_WIN32.rst b/Help/variable/CMAKE_HOST_WIN32.rst
index 92ee456..0e4c891 100644
--- a/Help/variable/CMAKE_HOST_WIN32.rst
+++ b/Help/variable/CMAKE_HOST_WIN32.rst
@@ -1,6 +1,6 @@
CMAKE_HOST_WIN32
----------------
-True on windows systems, including win64.
+``True`` on Windows systems, including Win64.
-Set to true when the host system is Windows and on Cygwin.
+Set to ``true`` when the host system is Windows and on Cygwin.
diff --git a/Help/variable/CMAKE_IMPORT_LIBRARY_PREFIX.rst b/Help/variable/CMAKE_IMPORT_LIBRARY_PREFIX.rst
index 1d16a37..1561a1d 100644
--- a/Help/variable/CMAKE_IMPORT_LIBRARY_PREFIX.rst
+++ b/Help/variable/CMAKE_IMPORT_LIBRARY_PREFIX.rst
@@ -6,4 +6,4 @@ The prefix for import libraries that you link to.
The prefix to use for the name of an import library if used on this
platform.
-CMAKE_IMPORT_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_IMPORT_LIBRARY_PREFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_IMPORT_LIBRARY_SUFFIX.rst b/Help/variable/CMAKE_IMPORT_LIBRARY_SUFFIX.rst
index c16825e..11aeab7 100644
--- a/Help/variable/CMAKE_IMPORT_LIBRARY_SUFFIX.rst
+++ b/Help/variable/CMAKE_IMPORT_LIBRARY_SUFFIX.rst
@@ -6,4 +6,4 @@ The suffix for import libraries that you link to.
The suffix to use for the end of an import library filename if used on
this platform.
-CMAKE_IMPORT_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_IMPORT_LIBRARY_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst b/Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst
index 79f3952..6eea322 100644
--- a/Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst
+++ b/Help/variable/CMAKE_INCLUDE_CURRENT_DIR.rst
@@ -3,11 +3,11 @@ CMAKE_INCLUDE_CURRENT_DIR
Automatically add the current source- and build directories to the include path.
-If this variable is enabled, CMake automatically adds in each
-directory ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR}
-to the include path for this directory. These additional include
+If this variable is enabled, CMake automatically adds
+:variable:`CMAKE_CURRENT_SOURCE_DIR` and :variable:`CMAKE_CURRENT_BINARY_DIR`
+to the include path for each directory. These additional include
directories do not propagate down to subdirectories. This is useful
mainly for out-of-source builds, where files generated into the build
tree are included by files located in the source tree.
-By default CMAKE_INCLUDE_CURRENT_DIR is OFF.
+By default ``CMAKE_INCLUDE_CURRENT_DIR`` is ``OFF``.
diff --git a/Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst b/Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst
index 948db50..5fc95f0 100644
--- a/Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst
+++ b/Help/variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE.rst
@@ -1,10 +1,12 @@
CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE
--------------------------------------
-Automatically add the current source- and build directories to the INTERFACE_INCLUDE_DIRECTORIES.
+Automatically add the current source- and build directories to the
+:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property.
If this variable is enabled, CMake automatically adds for each shared
library target, static library target, module target and executable
-target, ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} to
-the INTERFACE_INCLUDE_DIRECTORIES.By default
-CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE is OFF.
+target, :variable:`CMAKE_CURRENT_SOURCE_DIR` and
+:variable:`CMAKE_CURRENT_BINARY_DIR` to
+the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property. By default
+``CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE`` is ``OFF``.
diff --git a/Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst b/Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst
index 3c1fbcf..e0f2a2e 100644
--- a/Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst
+++ b/Help/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.rst
@@ -1,8 +1,9 @@
CMAKE_INCLUDE_DIRECTORIES_BEFORE
--------------------------------
-Whether to append or prepend directories by default in :command:`include_directories`.
+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.
+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
index cbd04d7..37d0a3d 100644
--- a/Help/variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE.rst
+++ b/Help/variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE.rst
@@ -4,5 +4,5 @@ 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.
+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/Help/variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME.rst b/Help/variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME.rst
index 2ad0689..57160f1 100644
--- a/Help/variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME.rst
+++ b/Help/variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME.rst
@@ -1,9 +1,9 @@
CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
------------------------------------
-Default component used in install() commands.
+Default component used in :command:`install` commands.
-If an install() command is used without the COMPONENT argument, these
-files will be grouped into a default component. The name of this
+If an :command:`install` command is used without the ``COMPONENT`` argument,
+these files will be grouped into a default component. The name of this
default install component will be taken from this variable. It
-defaults to "Unspecified".
+defaults to ``Unspecified``.
diff --git a/Help/variable/CMAKE_INSTALL_NAME_DIR.rst b/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
index 540df6b..961d712 100644
--- a/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
+++ b/Help/variable/CMAKE_INSTALL_NAME_DIR.rst
@@ -3,6 +3,6 @@ CMAKE_INSTALL_NAME_DIR
Mac OS X directory name for installed targets.
-CMAKE_INSTALL_NAME_DIR is used to initialize the INSTALL_NAME_DIR
-property on all targets. See that target property for more
-information.
+``CMAKE_INSTALL_NAME_DIR`` is used to initialize the
+:prop_tgt:`INSTALL_NAME_DIR` property on all targets. See that target
+property for more information.
diff --git a/Help/variable/CMAKE_INSTALL_PREFIX.rst b/Help/variable/CMAKE_INSTALL_PREFIX.rst
index ee9b615..3f3347f 100644
--- a/Help/variable/CMAKE_INSTALL_PREFIX.rst
+++ b/Help/variable/CMAKE_INSTALL_PREFIX.rst
@@ -1,14 +1,14 @@
CMAKE_INSTALL_PREFIX
--------------------
-Install directory used by install.
+Install directory used by :command:`install`.
-If "make install" is invoked or INSTALL is built, this directory is
+If ``make install`` is invoked or ``INSTALL`` is built, this directory is
prepended onto all install directories. This variable defaults to
-/usr/local on UNIX and c:/Program Files on Windows.
+``/usr/local`` on UNIX and ``c:/Program Files`` on Windows.
-On UNIX one can use the DESTDIR mechanism in order to relocate the
-whole installation. DESTDIR means DESTination DIRectory. It is
+On UNIX one can use the ``DESTDIR`` mechanism in order to relocate the
+whole installation. ``DESTDIR`` means DESTination DIRectory. It is
commonly used by makefile users in order to install software at
non-default location. It is usually invoked like this:
@@ -17,16 +17,17 @@ non-default location. It is usually invoked like this:
make DESTDIR=/home/john install
which will install the concerned software using the installation
-prefix, e.g. "/usr/local" prepended with the DESTDIR value which
-finally gives "/home/john/usr/local".
+prefix, e.g. ``/usr/local`` prepended with the ``DESTDIR`` value which
+finally gives ``/home/john/usr/local``.
-WARNING: DESTDIR may not be used on Windows because installation
-prefix usually contains a drive letter like in "C:/Program Files"
+WARNING: ``DESTDIR`` may not be used on Windows because installation
+prefix usually contains a drive letter like in ``C:/Program Files``
which cannot be prepended with some other prefix.
-The installation prefix is also added to CMAKE_SYSTEM_PREFIX_PATH so
-that find_package, find_program, find_library, find_path, and
-find_file will search the prefix for other software.
+The installation prefix is also added to :variable:`CMAKE_SYSTEM_PREFIX_PATH`
+so that :command:`find_package`, :command:`find_program`,
+:command:`find_library`, :command:`find_path`, and :command:`find_file`
+will search the prefix for other software.
.. note::
diff --git a/Help/variable/CMAKE_INSTALL_RPATH.rst b/Help/variable/CMAKE_INSTALL_RPATH.rst
index 0992d57..813d1e0 100644
--- a/Help/variable/CMAKE_INSTALL_RPATH.rst
+++ b/Help/variable/CMAKE_INSTALL_RPATH.rst
@@ -5,4 +5,4 @@ The rpath to use for installed targets.
A semicolon-separated list specifying the rpath to use in installed
targets (for platforms that support it). This is used to initialize
-the target property INSTALL_RPATH for all targets.
+the target property :prop_tgt:`INSTALL_RPATH` for all targets.
diff --git a/Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst b/Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst
index 9277a3b..78148d5 100644
--- a/Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst
+++ b/Help/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH.rst
@@ -3,7 +3,7 @@ CMAKE_INSTALL_RPATH_USE_LINK_PATH
Add paths to linker search and installed rpath.
-CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true
+``CMAKE_INSTALL_RPATH_USE_LINK_PATH`` is a boolean that if set to ``true``
will append directories in the linker search path and outside the
-project to the INSTALL_RPATH. This is used to initialize the target
-property INSTALL_RPATH_USE_LINK_PATH for all targets.
+project to the :prop_tgt:`INSTALL_RPATH`. This is used to initialize the
+target property :prop_tgt:`INSTALL_RPATH_USE_LINK_PATH` for all targets.
diff --git a/Help/variable/CMAKE_LANG_ARCHIVE_APPEND.rst b/Help/variable/CMAKE_LANG_ARCHIVE_APPEND.rst
index 2c3abae..ab4ad71 100644
--- a/Help/variable/CMAKE_LANG_ARCHIVE_APPEND.rst
+++ b/Help/variable/CMAKE_LANG_ARCHIVE_APPEND.rst
@@ -4,6 +4,7 @@ CMAKE_<LANG>_ARCHIVE_APPEND
Rule variable to append to a static archive.
This is a rule variable that tells CMake how to append to a static
-archive. It is used in place of CMAKE_<LANG>_CREATE_STATIC_LIBRARY on
-some platforms in order to support large object counts. See also
-CMAKE_<LANG>_ARCHIVE_CREATE and CMAKE_<LANG>_ARCHIVE_FINISH.
+archive. It is used in place of :variable:`CMAKE_<LANG>_CREATE_STATIC_LIBRARY`
+on some platforms in order to support large object counts. See also
+:variable:`CMAKE_<LANG>_ARCHIVE_CREATE` and
+:variable:`CMAKE_<LANG>_ARCHIVE_FINISH`.
diff --git a/Help/variable/CMAKE_LANG_ARCHIVE_CREATE.rst b/Help/variable/CMAKE_LANG_ARCHIVE_CREATE.rst
index f93dd11..fc295af 100644
--- a/Help/variable/CMAKE_LANG_ARCHIVE_CREATE.rst
+++ b/Help/variable/CMAKE_LANG_ARCHIVE_CREATE.rst
@@ -4,6 +4,7 @@ CMAKE_<LANG>_ARCHIVE_CREATE
Rule variable to create a new static archive.
This is a rule variable that tells CMake how to create a static
-archive. It is used in place of CMAKE_<LANG>_CREATE_STATIC_LIBRARY on
-some platforms in order to support large object counts. See also
-CMAKE_<LANG>_ARCHIVE_APPEND and CMAKE_<LANG>_ARCHIVE_FINISH.
+archive. It is used in place of :variable:`CMAKE_<LANG>_CREATE_STATIC_LIBRARY`
+on some platforms in order to support large object counts. See also
+:variable:`CMAKE_<LANG>_ARCHIVE_APPEND` and
+:variable:`CMAKE_<LANG>_ARCHIVE_FINISH`.
diff --git a/Help/variable/CMAKE_LANG_ARCHIVE_FINISH.rst b/Help/variable/CMAKE_LANG_ARCHIVE_FINISH.rst
index fff4128..1bb5d65 100644
--- a/Help/variable/CMAKE_LANG_ARCHIVE_FINISH.rst
+++ b/Help/variable/CMAKE_LANG_ARCHIVE_FINISH.rst
@@ -4,6 +4,7 @@ CMAKE_<LANG>_ARCHIVE_FINISH
Rule variable to finish an existing static archive.
This is a rule variable that tells CMake how to finish a static
-archive. It is used in place of CMAKE_<LANG>_CREATE_STATIC_LIBRARY on
-some platforms in order to support large object counts. See also
-CMAKE_<LANG>_ARCHIVE_CREATE and CMAKE_<LANG>_ARCHIVE_APPEND.
+archive. It is used in place of :variable:`CMAKE_<LANG>_CREATE_STATIC_LIBRARY`
+on some platforms in order to support large object counts. See also
+:variable:`CMAKE_<LANG>_ARCHIVE_CREATE` and
+:variable:`CMAKE_<LANG>_ARCHIVE_APPEND`.
diff --git a/Help/variable/CMAKE_LANG_COMPILER.rst b/Help/variable/CMAKE_LANG_COMPILER.rst
index fffc347..89df495 100644
--- a/Help/variable/CMAKE_LANG_COMPILER.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_COMPILER
---------------------
-The full path to the compiler for LANG.
+The full path to the compiler for ``LANG``.
-This is the command that will be used as the <LANG> compiler. Once
+This is the command that will be used as the ``<LANG>`` compiler. Once
set, you can not change this variable.
diff --git a/Help/variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN.rst b/Help/variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN.rst
index 033998d..8bb7cc0 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN.rst
@@ -5,9 +5,9 @@ The external toolchain for cross-compiling, if supported.
Some compiler toolchains do not ship their own auxilliary utilities such as
archivers and linkers. The compiler driver may support a command-line argument
-to specify the location of such tools. CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN
-may be set to a path to a path to the external toolchain and will be passed
-to the compiler driver if supported.
+to specify the location of such tools.
+``CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN`` may be set to a path to a path to
+the external toolchain and will be passed to the compiler driver if supported.
This variable may only be set in a toolchain file specified by
the :variable:`CMAKE_TOOLCHAIN_FILE` variable.
diff --git a/Help/variable/CMAKE_LANG_COMPILER_LOADED.rst b/Help/variable/CMAKE_LANG_COMPILER_LOADED.rst
index 3b8e9aa..9308878 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_LOADED.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_LOADED.rst
@@ -3,5 +3,5 @@ CMAKE_<LANG>_COMPILER_LOADED
Defined to true if the language is enabled.
-When language <LANG> is enabled by project() or enable_language() this
-variable is defined to 1.
+When language ``<LANG>`` is enabled by :command:`project` or
+:command:`enable_language` this variable is defined to ``1``.
diff --git a/Help/variable/CMAKE_LANG_COMPILE_OBJECT.rst b/Help/variable/CMAKE_LANG_COMPILE_OBJECT.rst
index f43ed6d..ba59cad 100644
--- a/Help/variable/CMAKE_LANG_COMPILE_OBJECT.rst
+++ b/Help/variable/CMAKE_LANG_COMPILE_OBJECT.rst
@@ -4,4 +4,4 @@ CMAKE_<LANG>_COMPILE_OBJECT
Rule variable to compile a single object file.
This is a rule variable that tells CMake how to compile a single
-object file for the language <LANG>.
+object file for the language ``<LANG>``.
diff --git a/Help/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY.rst b/Help/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY.rst
index adf1624..be89f85 100644
--- a/Help/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY.rst
+++ b/Help/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY.rst
@@ -4,4 +4,4 @@ CMAKE_<LANG>_CREATE_SHARED_LIBRARY
Rule variable to create a shared library.
This is a rule variable that tells CMake how to create a shared
-library for the language <LANG>.
+library for the language ``<LANG>``.
diff --git a/Help/variable/CMAKE_LANG_CREATE_SHARED_MODULE.rst b/Help/variable/CMAKE_LANG_CREATE_SHARED_MODULE.rst
index 406b4da..ae5f69d 100644
--- a/Help/variable/CMAKE_LANG_CREATE_SHARED_MODULE.rst
+++ b/Help/variable/CMAKE_LANG_CREATE_SHARED_MODULE.rst
@@ -4,4 +4,4 @@ CMAKE_<LANG>_CREATE_SHARED_MODULE
Rule variable to create a shared module.
This is a rule variable that tells CMake how to create a shared
-library for the language <LANG>.
+library for the language ``<LANG>``.
diff --git a/Help/variable/CMAKE_LANG_CREATE_STATIC_LIBRARY.rst b/Help/variable/CMAKE_LANG_CREATE_STATIC_LIBRARY.rst
index 8114432..0cff200 100644
--- a/Help/variable/CMAKE_LANG_CREATE_STATIC_LIBRARY.rst
+++ b/Help/variable/CMAKE_LANG_CREATE_STATIC_LIBRARY.rst
@@ -4,4 +4,4 @@ CMAKE_<LANG>_CREATE_STATIC_LIBRARY
Rule variable to create a static library.
This is a rule variable that tells CMake how to create a static
-library for the language <LANG>.
+library for the language ``<LANG>``.
diff --git a/Help/variable/CMAKE_LANG_FLAGS.rst b/Help/variable/CMAKE_LANG_FLAGS.rst
index 6aa0a3e..c57d92c 100644
--- a/Help/variable/CMAKE_LANG_FLAGS.rst
+++ b/Help/variable/CMAKE_LANG_FLAGS.rst
@@ -3,4 +3,4 @@ CMAKE_<LANG>_FLAGS
Flags for all build types.
-<LANG> flags used regardless of the value of CMAKE_BUILD_TYPE.
+``<LANG>`` flags used regardless of the value of :variable:`CMAKE_BUILD_TYPE`.
diff --git a/Help/variable/CMAKE_LANG_FLAGS_DEBUG.rst b/Help/variable/CMAKE_LANG_FLAGS_DEBUG.rst
index a727641..a233d4a 100644
--- a/Help/variable/CMAKE_LANG_FLAGS_DEBUG.rst
+++ b/Help/variable/CMAKE_LANG_FLAGS_DEBUG.rst
@@ -1,6 +1,6 @@
CMAKE_<LANG>_FLAGS_DEBUG
------------------------
-Flags for Debug build type or configuration.
+Flags for ``Debug`` build type or configuration.
-<LANG> flags used when CMAKE_BUILD_TYPE is Debug.
+``<LANG>`` flags used when :variable:`CMAKE_BUILD_TYPE` is ``Debug``.
diff --git a/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL.rst b/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL.rst
index fbb8516..a9436c1 100644
--- a/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL.rst
+++ b/Help/variable/CMAKE_LANG_FLAGS_MINSIZEREL.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_FLAGS_MINSIZEREL
-----------------------------
-Flags for MinSizeRel build type or configuration.
+Flags for ``MinSizeRel`` build type or configuration.
-<LANG> flags used when CMAKE_BUILD_TYPE is MinSizeRel.Short for
-minimum size release.
+``<LANG>`` flags used when :variable:`CMAKE_BUILD_TYPE` is ``MinSizeRel``
+(short for minimum size release).
diff --git a/Help/variable/CMAKE_LANG_FLAGS_RELEASE.rst b/Help/variable/CMAKE_LANG_FLAGS_RELEASE.rst
index 4b2c926..ffc5d79 100644
--- a/Help/variable/CMAKE_LANG_FLAGS_RELEASE.rst
+++ b/Help/variable/CMAKE_LANG_FLAGS_RELEASE.rst
@@ -1,6 +1,6 @@
CMAKE_<LANG>_FLAGS_RELEASE
--------------------------
-Flags for Release build type or configuration.
+Flags for ``Release`` build type or configuration.
-<LANG> flags used when CMAKE_BUILD_TYPE is Release
+``<LANG>`` flags used when :variable:`CMAKE_BUILD_TYPE` is ``Release``.
diff --git a/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO.rst b/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO.rst
index 16bd4e9..962768e 100644
--- a/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO.rst
+++ b/Help/variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_FLAGS_RELWITHDEBINFO
---------------------------------
-Flags for RelWithDebInfo type or configuration.
+Flags for ``RelWithDebInfo`` type or configuration.
-<LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. Short for
-Release With Debug Information.
+``<LANG>`` flags used when :variable:`CMAKE_BUILD_TYPE` is ``RelWithDebInfo``
+(short for Release With Debug Information).
diff --git a/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG.rst b/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG.rst
index c5915c3..1f639a3 100644
--- a/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG.rst
+++ b/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_DEBUG.rst
@@ -1,6 +1,6 @@
CMAKE_<LANG>_GHS_KERNEL_FLAGS_DEBUG
-----------------------------------
-GHS kernel flags for Debug build type or configuration.
+GHS kernel flags for ``Debug`` build type or configuration.
-<LANG> flags used when CMAKE_BUILD_TYPE is Debug.
+``<LANG>`` flags used when :variable:`CMAKE_BUILD_TYPE` is ``Debug``.
diff --git a/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL.rst b/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL.rst
index f80e785..94e2115 100644
--- a/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL.rst
+++ b/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_MINSIZEREL.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_GHS_KERNEL_FLAGS_MINSIZEREL
----------------------------------------
-GHS kernel flags for MinSizeRel build type or configuration.
+GHS kernel flags for ``MinSizeRel`` build type or configuration.
-<LANG> flags used when CMAKE_BUILD_TYPE is MinSizeRel.Short for
-minimum size release.
+``<LANG>`` flags used when :variable:`CMAKE_BUILD_TYPE` is ``MinSizeRel``
+(short for minimum size release).
diff --git a/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE.rst b/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE.rst
index fe02bc3..74566ef 100644
--- a/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE.rst
+++ b/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELEASE.rst
@@ -1,6 +1,6 @@
CMAKE_<LANG>_GHS_KERNEL_FLAGS_RELEASE
-------------------------------------
-GHS kernel flags for Release build type or configuration.
+GHS kernel flags for ``Release`` build type or configuration.
-<LANG> flags used when CMAKE_BUILD_TYPE is Release
+``<LANG>`` flags used when :variable:`CMAKE_BUILD_TYPE` is ``Release``.
diff --git a/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELWITHDEBINFO.rst b/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELWITHDEBINFO.rst
index 220f7f9..d148193 100644
--- a/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELWITHDEBINFO.rst
+++ b/Help/variable/CMAKE_LANG_GHS_KERNEL_FLAGS_RELWITHDEBINFO.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_GHS_KERNEL_FLAGS_RELWITHDEBINFO
--------------------------------------------
-GHS kernel flags for RelWithDebInfo type or configuration.
+GHS kernel flags for ``RelWithDebInfo`` type or configuration.
-<LANG> flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. Short for
-Release With Debug Information.
+``<LANG>`` flags used when :variable:`CMAKE_BUILD_TYPE` is ``RelWithDebInfo``
+(short for Release With Debug Information).
diff --git a/Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst b/Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst
index c60e18c..cc80851 100644
--- a/Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst
+++ b/Help/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.rst
@@ -4,6 +4,6 @@ CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES
Directories implicitly searched by the compiler for header files.
CMake does not explicitly specify these directories on compiler
-command lines for language <LANG>. This prevents system include
+command lines for language ``<LANG>``. This prevents system include
directories from being treated as user include directories on some
compilers.
diff --git a/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst b/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst
index 568950c..a0bd830 100644
--- a/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst
+++ b/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES
--------------------------------------
-Implicit linker search path detected for language <LANG>.
+Implicit linker search path detected for language ``<LANG>``.
Compilers typically pass directories containing language runtime
libraries and default library search paths when they invoke a linker.
@@ -10,8 +10,8 @@ language. CMake automatically detects these directories for each
language and reports the results in this variable.
When a library in one of these directories is given by full path to
-target_link_libraries() CMake will generate the -l<name> form on link
-lines to ensure the linker searches its implicit directories for the
+:command:`target_link_libraries` CMake will generate the ``-l<name>`` form on
+link lines to ensure the linker searches its implicit directories for the
library. Note that some toolchains read implicit directories from an
-environment variable such as LIBRARY_PATH so keep its value consistent
+environment variable such as ``LIBRARY_PATH`` so keep its value consistent
when operating in a given build tree.
diff --git a/Help/variable/CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES.rst b/Help/variable/CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES.rst
index 05e6ddb..61ccc5a 100644
--- a/Help/variable/CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES.rst
+++ b/Help/variable/CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
------------------------------------------------
-Implicit linker framework search path detected for language <LANG>.
+Implicit linker framework search path detected for language ``<LANG>``.
These paths are implicit linker framework search directories for the
compiler's language. CMake automatically detects these directories
diff --git a/Help/variable/CMAKE_LANG_IMPLICIT_LINK_LIBRARIES.rst b/Help/variable/CMAKE_LANG_IMPLICIT_LINK_LIBRARIES.rst
index fddfed8..ec16477 100644
--- a/Help/variable/CMAKE_LANG_IMPLICIT_LINK_LIBRARIES.rst
+++ b/Help/variable/CMAKE_LANG_IMPLICIT_LINK_LIBRARIES.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
------------------------------------
-Implicit link libraries and flags detected for language <LANG>.
+Implicit link libraries and flags detected for language ``<LANG>``.
Compilers typically pass language runtime library names and other
flags when they invoke a linker. These flags are implicit link
diff --git a/Help/variable/CMAKE_LANG_LIBRARY_ARCHITECTURE.rst b/Help/variable/CMAKE_LANG_LIBRARY_ARCHITECTURE.rst
index 4f31494..7f888ee 100644
--- a/Help/variable/CMAKE_LANG_LIBRARY_ARCHITECTURE.rst
+++ b/Help/variable/CMAKE_LANG_LIBRARY_ARCHITECTURE.rst
@@ -1,8 +1,8 @@
CMAKE_<LANG>_LIBRARY_ARCHITECTURE
---------------------------------
-Target architecture library directory name detected for <lang>.
+Target architecture library directory name detected for ``<LANG>``.
-If the <lang> compiler passes to the linker an architecture-specific
-system library search directory such as <prefix>/lib/<arch> this
-variable contains the <arch> name if/as detected by CMake.
+If the ``<LANG>`` compiler passes to the linker an architecture-specific
+system library search directory such as ``<prefix>/lib/<arch>`` this
+variable contains the ``<arch>`` name if/as detected by CMake.
diff --git a/Help/variable/CMAKE_LANG_LINKER_PREFERENCE.rst b/Help/variable/CMAKE_LANG_LINKER_PREFERENCE.rst
index af7ee60..ff82f8b 100644
--- a/Help/variable/CMAKE_LANG_LINKER_PREFERENCE.rst
+++ b/Help/variable/CMAKE_LANG_LINKER_PREFERENCE.rst
@@ -5,7 +5,7 @@ Preference value for linker language selection.
The "linker language" for executable, shared library, and module
targets is the language whose compiler will invoke the linker. The
-LINKER_LANGUAGE target property sets the language explicitly.
+:prop_tgt:`LINKER_LANGUAGE` target property sets the language explicitly.
Otherwise, the linker language is that whose linker preference value
is highest among languages compiled and linked into the target. See
-also the CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES variable.
+also the :variable:`CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES` variable.
diff --git a/Help/variable/CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES.rst b/Help/variable/CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES.rst
index d513767..dbbeb0a 100644
--- a/Help/variable/CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES.rst
+++ b/Help/variable/CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES
-----------------------------------------
-True if CMAKE_<LANG>_LINKER_PREFERENCE propagates across targets.
+True if :variable:`CMAKE_<LANG>_LINKER_PREFERENCE` propagates across targets.
This is used when CMake selects a linker language for a target.
Languages compiled directly into the target are always considered. A
diff --git a/Help/variable/CMAKE_LANG_OUTPUT_EXTENSION.rst b/Help/variable/CMAKE_LANG_OUTPUT_EXTENSION.rst
index 22fac29..0fbc566 100644
--- a/Help/variable/CMAKE_LANG_OUTPUT_EXTENSION.rst
+++ b/Help/variable/CMAKE_LANG_OUTPUT_EXTENSION.rst
@@ -3,5 +3,5 @@ CMAKE_<LANG>_OUTPUT_EXTENSION
Extension for the output of a compile for a single file.
-This is the extension for an object file for the given <LANG>. For
-example .obj for C on Windows.
+This is the extension for an object file for the given ``<LANG>``. For
+example ``.obj`` for C on Windows.
diff --git a/Help/variable/CMAKE_LANG_SIMULATE_ID.rst b/Help/variable/CMAKE_LANG_SIMULATE_ID.rst
index 646c0db..15c87a1 100644
--- a/Help/variable/CMAKE_LANG_SIMULATE_ID.rst
+++ b/Help/variable/CMAKE_LANG_SIMULATE_ID.rst
@@ -5,5 +5,5 @@ Identification string of "simulated" compiler.
Some compilers simulate other compilers to serve as drop-in
replacements. When CMake detects such a compiler it sets this
-variable to what would have been the CMAKE_<LANG>_COMPILER_ID for the
-simulated compiler.
+variable to what would have been the :variable:`CMAKE_<LANG>_COMPILER_ID` for
+the simulated compiler.
diff --git a/Help/variable/CMAKE_LANG_SIMULATE_VERSION.rst b/Help/variable/CMAKE_LANG_SIMULATE_VERSION.rst
index 982053d..d6325e0 100644
--- a/Help/variable/CMAKE_LANG_SIMULATE_VERSION.rst
+++ b/Help/variable/CMAKE_LANG_SIMULATE_VERSION.rst
@@ -5,5 +5,5 @@ Version string of "simulated" compiler.
Some compilers simulate other compilers to serve as drop-in
replacements. When CMake detects such a compiler it sets this
-variable to what would have been the CMAKE_<LANG>_COMPILER_VERSION for
-the simulated compiler.
+variable to what would have been the :variable:`CMAKE_<LANG>_COMPILER_VERSION`
+for the simulated compiler.
diff --git a/Help/variable/CMAKE_LANG_SIZEOF_DATA_PTR.rst b/Help/variable/CMAKE_LANG_SIZEOF_DATA_PTR.rst
index c85b5e0..7465923 100644
--- a/Help/variable/CMAKE_LANG_SIZEOF_DATA_PTR.rst
+++ b/Help/variable/CMAKE_LANG_SIZEOF_DATA_PTR.rst
@@ -1,7 +1,7 @@
CMAKE_<LANG>_SIZEOF_DATA_PTR
----------------------------
-Size of pointer-to-data types for language <LANG>.
+Size of pointer-to-data types for language ``<LANG>``.
This holds the size (in bytes) of pointer-to-data types in the target
-platform ABI. It is defined for languages C and CXX (C++).
+platform ABI. It is defined for languages ``C`` and ``CXX`` (C++).
diff --git a/Help/variable/CMAKE_LIBRARY_ARCHITECTURE.rst b/Help/variable/CMAKE_LIBRARY_ARCHITECTURE.rst
index c9a15f3..8a7dcbd 100644
--- a/Help/variable/CMAKE_LIBRARY_ARCHITECTURE.rst
+++ b/Help/variable/CMAKE_LIBRARY_ARCHITECTURE.rst
@@ -3,5 +3,5 @@ CMAKE_LIBRARY_ARCHITECTURE
Target architecture library directory name, if detected.
-This is the value of CMAKE_<lang>_LIBRARY_ARCHITECTURE as detected for
-one of the enabled languages.
+This is the value of :variable:`CMAKE_<LANG>_LIBRARY_ARCHITECTURE` as detected
+for one of the enabled languages.
diff --git a/Help/variable/CMAKE_LIBRARY_ARCHITECTURE_REGEX.rst b/Help/variable/CMAKE_LIBRARY_ARCHITECTURE_REGEX.rst
index 6c41269..1eb2ac2 100644
--- a/Help/variable/CMAKE_LIBRARY_ARCHITECTURE_REGEX.rst
+++ b/Help/variable/CMAKE_LIBRARY_ARCHITECTURE_REGEX.rst
@@ -3,5 +3,5 @@ CMAKE_LIBRARY_ARCHITECTURE_REGEX
Regex matching possible target architecture library directory names.
-This is used to detect CMAKE_<lang>_LIBRARY_ARCHITECTURE from the
-implicit linker search path by matching the <arch> name.
+This is used to detect :variable:`CMAKE_<LANG>_LIBRARY_ARCHITECTURE` from the
+implicit linker search path by matching the ``<arch>`` name.
diff --git a/Help/variable/CMAKE_LIBRARY_PATH_FLAG.rst b/Help/variable/CMAKE_LIBRARY_PATH_FLAG.rst
index ede39e9..ebe5fda 100644
--- a/Help/variable/CMAKE_LIBRARY_PATH_FLAG.rst
+++ b/Help/variable/CMAKE_LIBRARY_PATH_FLAG.rst
@@ -4,4 +4,4 @@ CMAKE_LIBRARY_PATH_FLAG
The flag to be used to add a library search path to a compiler.
The flag will be used to specify a library directory to the compiler.
-On most compilers this is "-L".
+On most compilers this is ``-L``.
diff --git a/Help/variable/CMAKE_LINK_DEF_FILE_FLAG.rst b/Help/variable/CMAKE_LINK_DEF_FILE_FLAG.rst
index 382447c..fa09f9f 100644
--- a/Help/variable/CMAKE_LINK_DEF_FILE_FLAG.rst
+++ b/Help/variable/CMAKE_LINK_DEF_FILE_FLAG.rst
@@ -1,7 +1,7 @@
CMAKE_LINK_DEF_FILE_FLAG
------------------------
-Linker flag to be used to specify a .def file for dll creation.
+Linker flag to be used to specify a ``.def`` file for dll creation.
-The flag will be used to add a .def file when creating a dll on
+The flag will be used to add a ``.def`` file when creating a dll on
Windows; this is only defined on Windows.
diff --git a/Help/variable/CMAKE_LINK_DEPENDS_NO_SHARED.rst b/Help/variable/CMAKE_LINK_DEPENDS_NO_SHARED.rst
index 6ae7df6..cec7906 100644
--- a/Help/variable/CMAKE_LINK_DEPENDS_NO_SHARED.rst
+++ b/Help/variable/CMAKE_LINK_DEPENDS_NO_SHARED.rst
@@ -3,6 +3,6 @@ CMAKE_LINK_DEPENDS_NO_SHARED
Whether to skip link dependencies on shared library files.
-This variable initializes the LINK_DEPENDS_NO_SHARED property on
+This variable initializes the :prop_tgt:`LINK_DEPENDS_NO_SHARED` property on
targets when they are created. See that target property for
additional information.
diff --git a/Help/variable/CMAKE_LINK_INTERFACE_LIBRARIES.rst b/Help/variable/CMAKE_LINK_INTERFACE_LIBRARIES.rst
index efe6fd7..33865da 100644
--- a/Help/variable/CMAKE_LINK_INTERFACE_LIBRARIES.rst
+++ b/Help/variable/CMAKE_LINK_INTERFACE_LIBRARIES.rst
@@ -1,8 +1,8 @@
CMAKE_LINK_INTERFACE_LIBRARIES
------------------------------
-Default value for LINK_INTERFACE_LIBRARIES of targets.
+Default value for :prop_tgt:`LINK_INTERFACE_LIBRARIES` of targets.
-This variable is used to initialize the LINK_INTERFACE_LIBRARIES
+This variable is used to initialize the :prop_tgt:`LINK_INTERFACE_LIBRARIES`
property on all the targets. See that target property for additional
information.
diff --git a/Help/variable/CMAKE_LINK_LIBRARY_FLAG.rst b/Help/variable/CMAKE_LINK_LIBRARY_FLAG.rst
index c3e02d7..b5197e4 100644
--- a/Help/variable/CMAKE_LINK_LIBRARY_FLAG.rst
+++ b/Help/variable/CMAKE_LINK_LIBRARY_FLAG.rst
@@ -4,4 +4,4 @@ CMAKE_LINK_LIBRARY_FLAG
Flag to be used to link a library into an executable.
The flag will be used to specify a library to link to an executable.
-On most compilers this is "-l".
+On most compilers this is ``-l``.
diff --git a/Help/variable/CMAKE_LINK_LIBRARY_SUFFIX.rst b/Help/variable/CMAKE_LINK_LIBRARY_SUFFIX.rst
index 390298d..0ddafe8 100644
--- a/Help/variable/CMAKE_LINK_LIBRARY_SUFFIX.rst
+++ b/Help/variable/CMAKE_LINK_LIBRARY_SUFFIX.rst
@@ -3,4 +3,4 @@ CMAKE_LINK_LIBRARY_SUFFIX
The suffix for libraries that you link to.
-The suffix to use for the end of a library filename, .lib on Windows.
+The suffix to use for the end of a library filename, ``.lib`` on Windows.
diff --git a/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst b/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
index 673f5d8..54cdaaa 100644
--- a/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
+++ b/Help/variable/CMAKE_LINK_SEARCH_END_STATIC.rst
@@ -3,14 +3,14 @@ CMAKE_LINK_SEARCH_END_STATIC
End a link line such that static system libraries are used.
-Some linkers support switches such as -Bstatic and -Bdynamic to
-determine whether to use static or shared libraries for -lXXX options.
+Some linkers support switches such as ``-Bstatic`` and ``-Bdynamic`` to
+determine whether to use static or shared libraries for ``-lXXX`` options.
CMake uses these options to set the link type for libraries whose full
paths are not known or (in some cases) are in implicit link
directories for the platform. By default CMake adds an option at the
end of the library list (if necessary) to set the linker search type
back to its starting type. This property switches the final linker
-search type to -Bstatic regardless of how it started.
+search type to ``-Bstatic`` regardless of how it started.
This variable is used to initialize the target property
:prop_tgt:`LINK_SEARCH_END_STATIC` for all targets. If set, it's
diff --git a/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst b/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst
index 223702c..0d52a31 100644
--- a/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst
+++ b/Help/variable/CMAKE_LINK_SEARCH_START_STATIC.rst
@@ -3,14 +3,14 @@ CMAKE_LINK_SEARCH_START_STATIC
Assume the linker looks for static libraries by default.
-Some linkers support switches such as -Bstatic and -Bdynamic to
-determine whether to use static or shared libraries for -lXXX options.
+Some linkers support switches such as ``-Bstatic`` and ``-Bdynamic`` to
+determine whether to use static or shared libraries for ``-lXXX`` options.
CMake uses these options to set the link type for libraries whose full
paths are not known or (in some cases) are in implicit link
directories for the platform. By default the linker search type is
-assumed to be -Bdynamic at the beginning of the library list. This
-property switches the assumption to -Bstatic. It is intended for use
-when linking an executable statically (e.g. with the GNU -static
+assumed to be ``-Bdynamic`` at the beginning of the library list. This
+property switches the assumption to ``-Bstatic``. It is intended for use
+when linking an executable statically (e.g. with the GNU ``-static``
option).
This variable is used to initialize the target property
diff --git a/Help/variable/CMAKE_MACOSX_BUNDLE.rst b/Help/variable/CMAKE_MACOSX_BUNDLE.rst
index e4768f3..0badaf0 100644
--- a/Help/variable/CMAKE_MACOSX_BUNDLE.rst
+++ b/Help/variable/CMAKE_MACOSX_BUNDLE.rst
@@ -1,7 +1,7 @@
CMAKE_MACOSX_BUNDLE
-------------------
-Default value for MACOSX_BUNDLE of targets.
+Default value for :prop_tgt:`MACOSX_BUNDLE` of targets.
-This variable is used to initialize the MACOSX_BUNDLE property on all
-the targets. See that target property for additional information.
+This variable is used to initialize the :prop_tgt:`MACOSX_BUNDLE` property on
+all the targets. See that target property for additional information.
diff --git a/Help/variable/CMAKE_MAKE_PROGRAM.rst b/Help/variable/CMAKE_MAKE_PROGRAM.rst
index 85b098b..edf2732 100644
--- a/Help/variable/CMAKE_MAKE_PROGRAM.rst
+++ b/Help/variable/CMAKE_MAKE_PROGRAM.rst
@@ -8,18 +8,18 @@ name if it is expected to be in the ``PATH``.
The tool selected depends on the :variable:`CMAKE_GENERATOR` used
to configure the project:
-* The Makefile generators set this to ``make``, ``gmake``, or
- a generator-specific tool (e.g. ``nmake`` for "NMake Makefiles").
+* The :ref:`Makefile Generators` set this to ``make``, ``gmake``, or
+ a generator-specific tool (e.g. ``nmake`` for :generator:`NMake Makefiles`).
These generators store ``CMAKE_MAKE_PROGRAM`` in the CMake cache
so that it may be edited by the user.
-* The Ninja generator sets this to ``ninja``.
+* The :generator:`Ninja` generator sets this to ``ninja``.
This generator stores ``CMAKE_MAKE_PROGRAM`` in the CMake cache
so that it may be edited by the user.
-* The Xcode generator sets this to ``xcodebuild`` (or possibly an
+* The :generator:`Xcode` generator sets this to ``xcodebuild`` (or possibly an
otherwise undocumented ``cmakexbuild`` wrapper implementing some
workarounds).
@@ -33,7 +33,7 @@ to configure the project:
a user or project explicitly adds ``CMAKE_MAKE_PROGRAM`` to
the CMake cache then CMake will use the specified value.
-* The Visual Studio generators set this to the full path to
+* The :ref:`Visual Studio Generators` set this to the full path to
``MSBuild.exe`` (VS >= 10), ``devenv.com`` (VS 7,8,9),
``VCExpress.exe`` (VS Express 8,9), or ``msdev.exe`` (VS 6).
(See also variables
diff --git a/Help/variable/CMAKE_MAP_IMPORTED_CONFIG_CONFIG.rst b/Help/variable/CMAKE_MAP_IMPORTED_CONFIG_CONFIG.rst
index 41ccde1..ed29afe 100644
--- a/Help/variable/CMAKE_MAP_IMPORTED_CONFIG_CONFIG.rst
+++ b/Help/variable/CMAKE_MAP_IMPORTED_CONFIG_CONFIG.rst
@@ -1,8 +1,8 @@
CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>
----------------------------------
-Default value for MAP_IMPORTED_CONFIG_<CONFIG> of targets.
+Default value for :prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` of targets.
-This variable is used to initialize the MAP_IMPORTED_CONFIG_<CONFIG>
-property on all the targets. See that target property for additional
-information.
+This variable is used to initialize the
+:prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` property on all the targets. See
+that target property for additional information.
diff --git a/Help/variable/CMAKE_MFC_FLAG.rst b/Help/variable/CMAKE_MFC_FLAG.rst
index 221d26e..f60e7a5 100644
--- a/Help/variable/CMAKE_MFC_FLAG.rst
+++ b/Help/variable/CMAKE_MFC_FLAG.rst
@@ -3,10 +3,10 @@ CMAKE_MFC_FLAG
Tell cmake to use MFC for an executable or dll.
-This can be set in a CMakeLists.txt file and will enable MFC in the
-application. It should be set to 1 for the static MFC library, and 2
+This can be set in a ``CMakeLists.txt`` file and will enable MFC in the
+application. It should be set to ``1`` for the static MFC library, and ``2``
for the shared MFC library. This is used in Visual Studio 6 and 7
-project files. The CMakeSetup dialog used MFC and the CMakeLists.txt
+project files. The CMakeSetup dialog used MFC and the ``CMakeLists.txt``
looks like this:
::
diff --git a/Help/variable/CMAKE_MINIMUM_REQUIRED_VERSION.rst b/Help/variable/CMAKE_MINIMUM_REQUIRED_VERSION.rst
index 351de44..5a51634 100644
--- a/Help/variable/CMAKE_MINIMUM_REQUIRED_VERSION.rst
+++ b/Help/variable/CMAKE_MINIMUM_REQUIRED_VERSION.rst
@@ -1,7 +1,7 @@
CMAKE_MINIMUM_REQUIRED_VERSION
------------------------------
-Version specified to cmake_minimum_required command
+Version specified to :command:`cmake_minimum_required` command
-Variable containing the VERSION component specified in the
-cmake_minimum_required command.
+Variable containing the ``VERSION`` component specified in the
+:command:`cmake_minimum_required` command.
diff --git a/Help/variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG.rst b/Help/variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG.rst
index 87a1901..393263e 100644
--- a/Help/variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG.rst
+++ b/Help/variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG.rst
@@ -3,4 +3,4 @@ CMAKE_MODULE_LINKER_FLAGS_<CONFIG>
Flags to be used when linking a module.
-Same as CMAKE_C_FLAGS_* but used by the linker when creating modules.
+Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating modules.
diff --git a/Help/variable/CMAKE_NOT_USING_CONFIG_FLAGS.rst b/Help/variable/CMAKE_NOT_USING_CONFIG_FLAGS.rst
index cbe0350..98960c5 100644
--- a/Help/variable/CMAKE_NOT_USING_CONFIG_FLAGS.rst
+++ b/Help/variable/CMAKE_NOT_USING_CONFIG_FLAGS.rst
@@ -1,7 +1,7 @@
CMAKE_NOT_USING_CONFIG_FLAGS
----------------------------
-Skip _BUILD_TYPE flags if true.
+Skip ``_BUILD_TYPE`` flags if true.
This is an internal flag used by the generators in CMake to tell CMake
-to skip the _BUILD_TYPE flags.
+to skip the ``_BUILD_TYPE`` flags.
diff --git a/Help/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.rst b/Help/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.rst
index c1919af..61e04b4 100644
--- a/Help/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.rst
+++ b/Help/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.rst
@@ -1,8 +1,8 @@
CMAKE_NO_SYSTEM_FROM_IMPORTED
-----------------------------
-Default value for NO_SYSTEM_FROM_IMPORTED of targets.
+Default value for :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` of targets.
-This variable is used to initialize the NO_SYSTEM_FROM_IMPORTED
+This variable is used to initialize the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED`
property on all the targets. See that target property for additional
information.
diff --git a/Help/variable/CMAKE_PARENT_LIST_FILE.rst b/Help/variable/CMAKE_PARENT_LIST_FILE.rst
index 5566a72..cfd8608 100644
--- a/Help/variable/CMAKE_PARENT_LIST_FILE.rst
+++ b/Help/variable/CMAKE_PARENT_LIST_FILE.rst
@@ -3,7 +3,7 @@ CMAKE_PARENT_LIST_FILE
Full path to the CMake file that included the current one.
-While processing a CMake file loaded by include() or find_package()
-this variable contains the full path to the file including it. The
-top of the include stack is always the CMakeLists.txt for the current
-directory. See also CMAKE_CURRENT_LIST_FILE.
+While processing a CMake file loaded by :command:`include` or
+:command:`find_package` this variable contains the full path to the file
+including it. The top of the include stack is always the ``CMakeLists.txt``
+for the current directory. See also :variable:`CMAKE_CURRENT_LIST_FILE`.
diff --git a/Help/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.rst b/Help/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.rst
index e401aa5..43582be 100644
--- a/Help/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.rst
+++ b/Help/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.rst
@@ -1,16 +1,17 @@
CMAKE_POLICY_DEFAULT_CMP<NNNN>
------------------------------
-Default for CMake Policy CMP<NNNN> when it is otherwise left unset.
+Default for CMake Policy ``CMP<NNNN>`` when it is otherwise left unset.
-Commands cmake_minimum_required(VERSION) and cmake_policy(VERSION) by
-default leave policies introduced after the given version unset. Set
-CMAKE_POLICY_DEFAULT_CMP<NNNN> to OLD or NEW to specify the default
-for policy CMP<NNNN>, where <NNNN> is the policy number.
+Commands :command:`cmake_minimum_required(VERSION)` and
+:command:`cmake_policy(VERSION)` by default leave policies introduced after
+the given version unset. Set ``CMAKE_POLICY_DEFAULT_CMP<NNNN>`` to ``OLD``
+or ``NEW`` to specify the default for policy ``CMP<NNNN>``, where ``<NNNN>``
+is the policy number.
This variable should not be set by a project in CMake code; use
-cmake_policy(SET) instead. Users running CMake may set this variable
-in the cache (e.g. -DCMAKE_POLICY_DEFAULT_CMP<NNNN>=<OLD|NEW>) to set
-a policy not otherwise set by the project. Set to OLD to quiet a
-policy warning while using old behavior or to NEW to try building the
+:command:`cmake_policy(SET)` instead. Users running CMake may set this
+variable in the cache (e.g. ``-DCMAKE_POLICY_DEFAULT_CMP<NNNN>=<OLD|NEW>``)
+to set a policy not otherwise set by the project. Set to ``OLD`` to quiet a
+policy warning while using old behavior or to ``NEW`` to try building the
project with new behavior.
diff --git a/Help/variable/CMAKE_PROJECT_NAME.rst b/Help/variable/CMAKE_PROJECT_NAME.rst
index 4734705..431e9f3 100644
--- a/Help/variable/CMAKE_PROJECT_NAME.rst
+++ b/Help/variable/CMAKE_PROJECT_NAME.rst
@@ -4,4 +4,4 @@ CMAKE_PROJECT_NAME
The name of the current project.
This specifies name of the current project from the closest inherited
-PROJECT command.
+:command:`project` command.
diff --git a/Help/variable/CMAKE_ROOT.rst b/Help/variable/CMAKE_ROOT.rst
index f963a7f..1d0a8af 100644
--- a/Help/variable/CMAKE_ROOT.rst
+++ b/Help/variable/CMAKE_ROOT.rst
@@ -3,6 +3,6 @@ CMAKE_ROOT
Install directory for running cmake.
-This is the install root for the running CMake and the Modules
+This is the install root for the running CMake and the ``Modules``
directory can be found here. This is commonly used in this format:
-${CMAKE_ROOT}/Modules
+``${CMAKE_ROOT}/Modules``
diff --git a/Help/variable/CMAKE_SCRIPT_MODE_FILE.rst b/Help/variable/CMAKE_SCRIPT_MODE_FILE.rst
index ad73cc0..981af60 100644
--- a/Help/variable/CMAKE_SCRIPT_MODE_FILE.rst
+++ b/Help/variable/CMAKE_SCRIPT_MODE_FILE.rst
@@ -1,8 +1,9 @@
CMAKE_SCRIPT_MODE_FILE
----------------------
-Full path to the -P script file currently being processed.
+Full path to the :manual:`cmake(1)` ``-P`` script file currently being
+processed.
-When run in -P script mode, CMake sets this variable to the full path
-of the script file. When run to configure a CMakeLists.txt file, this
-variable is not set.
+When run in :manual:`cmake(1)` ``-P`` script mode, CMake sets this variable to
+the full path of the script file. When run to configure a ``CMakeLists.txt``
+file, this variable is not set.
diff --git a/Help/variable/CMAKE_SHARED_LIBRARY_PREFIX.rst b/Help/variable/CMAKE_SHARED_LIBRARY_PREFIX.rst
index a863e2a..8afabaf 100644
--- a/Help/variable/CMAKE_SHARED_LIBRARY_PREFIX.rst
+++ b/Help/variable/CMAKE_SHARED_LIBRARY_PREFIX.rst
@@ -3,6 +3,6 @@ CMAKE_SHARED_LIBRARY_PREFIX
The prefix for shared libraries that you link to.
-The prefix to use for the name of a shared library, lib on UNIX.
+The prefix to use for the name of a shared library, ``lib`` on UNIX.
-CMAKE_SHARED_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_SHARED_LIBRARY_PREFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_SHARED_LIBRARY_SUFFIX.rst b/Help/variable/CMAKE_SHARED_LIBRARY_SUFFIX.rst
index c296ecd..1f96a32 100644
--- a/Help/variable/CMAKE_SHARED_LIBRARY_SUFFIX.rst
+++ b/Help/variable/CMAKE_SHARED_LIBRARY_SUFFIX.rst
@@ -3,7 +3,7 @@ CMAKE_SHARED_LIBRARY_SUFFIX
The suffix for shared libraries that you link to.
-The suffix to use for the end of a shared library filename, .dll on
+The suffix to use for the end of a shared library filename, ``.dll`` on
Windows.
-CMAKE_SHARED_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_SHARED_LIBRARY_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_SHARED_LINKER_FLAGS_CONFIG.rst b/Help/variable/CMAKE_SHARED_LINKER_FLAGS_CONFIG.rst
index fedc626..4bf87a0 100644
--- a/Help/variable/CMAKE_SHARED_LINKER_FLAGS_CONFIG.rst
+++ b/Help/variable/CMAKE_SHARED_LINKER_FLAGS_CONFIG.rst
@@ -3,5 +3,5 @@ CMAKE_SHARED_LINKER_FLAGS_<CONFIG>
Flags to be used when linking a shared library.
-Same as CMAKE_C_FLAGS_* but used by the linker when creating shared
+Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating shared
libraries.
diff --git a/Help/variable/CMAKE_SHARED_MODULE_PREFIX.rst b/Help/variable/CMAKE_SHARED_MODULE_PREFIX.rst
index a5a2428..d6eef98 100644
--- a/Help/variable/CMAKE_SHARED_MODULE_PREFIX.rst
+++ b/Help/variable/CMAKE_SHARED_MODULE_PREFIX.rst
@@ -5,4 +5,4 @@ The prefix for loadable modules that you link to.
The prefix to use for the name of a loadable module on this platform.
-CMAKE_SHARED_MODULE_PREFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_SHARED_MODULE_PREFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_SHARED_MODULE_SUFFIX.rst b/Help/variable/CMAKE_SHARED_MODULE_SUFFIX.rst
index 32a3c34..81515c3 100644
--- a/Help/variable/CMAKE_SHARED_MODULE_SUFFIX.rst
+++ b/Help/variable/CMAKE_SHARED_MODULE_SUFFIX.rst
@@ -6,4 +6,4 @@ The suffix for shared libraries that you link to.
The suffix to use for the end of a loadable module filename on this
platform
-CMAKE_SHARED_MODULE_SUFFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_SHARED_MODULE_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_SIZEOF_VOID_P.rst b/Help/variable/CMAKE_SIZEOF_VOID_P.rst
index 98dbed6..f5464d1 100644
--- a/Help/variable/CMAKE_SIZEOF_VOID_P.rst
+++ b/Help/variable/CMAKE_SIZEOF_VOID_P.rst
@@ -1,8 +1,8 @@
CMAKE_SIZEOF_VOID_P
-------------------
-Size of a void pointer.
+Size of a ``void`` pointer.
This is set to the size of a pointer on the target machine, and is determined
-by a try compile. If a 64 bit size is found, then the library search
-path is modified to look for 64 bit libraries first.
+by a try compile. If a 64-bit size is found, then the library search
+path is modified to look for 64-bit libraries first.
diff --git a/Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst b/Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst
index 33ee8a8..80a68c9 100644
--- a/Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst
+++ b/Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst
@@ -1,11 +1,11 @@
CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
---------------------------------
-Don't make the install target depend on the all target.
+Don't make the ``install`` target depend on the ``all`` target.
-By default, the "install" target depends on the "all" target. This
-has the effect, that when "make install" is invoked or INSTALL is
-built, first the "all" target is built, then the installation starts.
-If CMAKE_SKIP_INSTALL_ALL_DEPENDENCY is set to TRUE, this dependency
-is not created, so the installation process will start immediately,
+By default, the ``install`` target depends on the ``all`` target. This
+has the effect, that when ``make install`` is invoked or ``INSTALL`` is
+built, first the ``all`` target is built, then the installation starts.
+If :variable:`CMAKE_SKIP_INSTALL_ALL_DEPENDENCY` is set to ``TRUE``, this
+dependency is not created, so the installation process will start immediately,
independent from whether the project has been completely built or not.
diff --git a/Help/variable/CMAKE_SKIP_INSTALL_RPATH.rst b/Help/variable/CMAKE_SKIP_INSTALL_RPATH.rst
index f16b212..cc0ac21 100644
--- a/Help/variable/CMAKE_SKIP_INSTALL_RPATH.rst
+++ b/Help/variable/CMAKE_SKIP_INSTALL_RPATH.rst
@@ -11,4 +11,4 @@ always installed without RPATH, even if RPATH is enabled when
building. This can be useful for example to allow running tests from
the build directory with RPATH enabled before the installation step.
To omit RPATH in both the build and install steps, use
-CMAKE_SKIP_RPATH instead.
+:variable:`CMAKE_SKIP_RPATH` instead.
diff --git a/Help/variable/CMAKE_SKIP_INSTALL_RULES.rst b/Help/variable/CMAKE_SKIP_INSTALL_RULES.rst
index 5eda254..44966f3 100644
--- a/Help/variable/CMAKE_SKIP_INSTALL_RULES.rst
+++ b/Help/variable/CMAKE_SKIP_INSTALL_RULES.rst
@@ -3,5 +3,6 @@ CMAKE_SKIP_INSTALL_RULES
Whether to disable generation of installation rules.
-If TRUE, cmake will neither generate installaton rules nor
-will it generate cmake_install.cmake files. This variable is FALSE by default.
+If ``TRUE``, cmake will neither generate installaton rules nor
+will it generate ``cmake_install.cmake`` files. This variable is ``FALSE`` by
+default.
diff --git a/Help/variable/CMAKE_SKIP_RPATH.rst b/Help/variable/CMAKE_SKIP_RPATH.rst
index c93f67f..d7ce8e4 100644
--- a/Help/variable/CMAKE_SKIP_RPATH.rst
+++ b/Help/variable/CMAKE_SKIP_RPATH.rst
@@ -3,8 +3,8 @@ CMAKE_SKIP_RPATH
If true, do not add run time path information.
-If this is set to TRUE, then the rpath information is not added to
+If this is set to ``TRUE``, then the rpath information is not added to
compiled executables. The default is to add rpath information if the
platform supports it. This allows for easy running from the build
tree. To omit RPATH in the install step, but not the build step, use
-CMAKE_SKIP_INSTALL_RPATH instead.
+:variable:`CMAKE_SKIP_INSTALL_RPATH` instead.
diff --git a/Help/variable/CMAKE_SOURCE_DIR.rst b/Help/variable/CMAKE_SOURCE_DIR.rst
index 088fa83..3df0226 100644
--- a/Help/variable/CMAKE_SOURCE_DIR.rst
+++ b/Help/variable/CMAKE_SOURCE_DIR.rst
@@ -5,4 +5,4 @@ The path to the top level of the source tree.
This is the full path to the top level of the current CMake source
tree. For an in-source build, this would be the same as
-CMAKE_BINARY_DIR.
+:variable:`CMAKE_BINARY_DIR`.
diff --git a/Help/variable/CMAKE_STAGING_PREFIX.rst b/Help/variable/CMAKE_STAGING_PREFIX.rst
index c4de7da..1310e94 100644
--- a/Help/variable/CMAKE_STAGING_PREFIX.rst
+++ b/Help/variable/CMAKE_STAGING_PREFIX.rst
@@ -5,9 +5,10 @@ This variable may be set to a path to install to when cross-compiling. This can
be useful if the path in :variable:`CMAKE_SYSROOT` is read-only, or otherwise
should remain pristine.
-The CMAKE_STAGING_PREFIX location is also used as a search prefix by the ``find_*``
-commands. This can be controlled by setting the :variable:`CMAKE_FIND_NO_INSTALL_PREFIX`
-variable.
+The ``CMAKE_STAGING_PREFIX`` location is also used as a search prefix by the
+``find_*`` commands. This can be controlled by setting the
+:variable:`CMAKE_FIND_NO_INSTALL_PREFIX` variable.
-If any RPATH/RUNPATH entries passed to the linker contain the CMAKE_STAGING_PREFIX,
-the matching path fragments are replaced with the :variable:`CMAKE_INSTALL_PREFIX`.
+If any RPATH/RUNPATH entries passed to the linker contain the
+``CMAKE_STAGING_PREFIX``, the matching path fragments are replaced with the
+:variable:`CMAKE_INSTALL_PREFIX`.
diff --git a/Help/variable/CMAKE_STATIC_LIBRARY_PREFIX.rst b/Help/variable/CMAKE_STATIC_LIBRARY_PREFIX.rst
index 0a3095d..714b5cc 100644
--- a/Help/variable/CMAKE_STATIC_LIBRARY_PREFIX.rst
+++ b/Help/variable/CMAKE_STATIC_LIBRARY_PREFIX.rst
@@ -3,6 +3,6 @@ CMAKE_STATIC_LIBRARY_PREFIX
The prefix for static libraries that you link to.
-The prefix to use for the name of a static library, lib on UNIX.
+The prefix to use for the name of a static library, ``lib`` on UNIX.
-CMAKE_STATIC_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_STATIC_LIBRARY_PREFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_STATIC_LIBRARY_SUFFIX.rst b/Help/variable/CMAKE_STATIC_LIBRARY_SUFFIX.rst
index 4d07671..28dc09d 100644
--- a/Help/variable/CMAKE_STATIC_LIBRARY_SUFFIX.rst
+++ b/Help/variable/CMAKE_STATIC_LIBRARY_SUFFIX.rst
@@ -3,7 +3,7 @@ CMAKE_STATIC_LIBRARY_SUFFIX
The suffix for static libraries that you link to.
-The suffix to use for the end of a static library filename, .lib on
+The suffix to use for the end of a static library filename, ``.lib`` on
Windows.
-CMAKE_STATIC_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>.
+``CMAKE_STATIC_LIBRARY_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.
diff --git a/Help/variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG.rst b/Help/variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG.rst
index 6cde24d..b9f8003 100644
--- a/Help/variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG.rst
+++ b/Help/variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG.rst
@@ -3,5 +3,5 @@ CMAKE_STATIC_LINKER_FLAGS_<CONFIG>
Flags to be used when linking a static library.
-Same as CMAKE_C_FLAGS_* but used by the linker when creating static
+Same as ``CMAKE_C_FLAGS_*`` but used by the linker when creating static
libraries.
diff --git a/Help/variable/CMAKE_SYSTEM.rst b/Help/variable/CMAKE_SYSTEM.rst
index 23f5980..c7d0d8a 100644
--- a/Help/variable/CMAKE_SYSTEM.rst
+++ b/Help/variable/CMAKE_SYSTEM.rst
@@ -1,7 +1,7 @@
CMAKE_SYSTEM
------------
-Composit Name of OS CMake is compiling for.
+Composite name of operating system CMake is compiling for.
This variable is the composite of :variable:`CMAKE_SYSTEM_NAME` and
:variable:`CMAKE_SYSTEM_VERSION`, e.g.
diff --git a/Help/variable/CMAKE_SYSTEM_NAME.rst b/Help/variable/CMAKE_SYSTEM_NAME.rst
index 189dc18..0466da4 100644
--- a/Help/variable/CMAKE_SYSTEM_NAME.rst
+++ b/Help/variable/CMAKE_SYSTEM_NAME.rst
@@ -1,8 +1,8 @@
CMAKE_SYSTEM_NAME
-----------------
-Name of the OS CMake is building for.
+Name of the operating system CMake is building for.
-This is the name of the OS on which CMake is targeting. This variable
-is the same as :variable:`CMAKE_HOST_SYSTEM_NAME` if you build for the
+This is the name of the operating system on which CMake is targeting. This
+variable is the same as :variable:`CMAKE_HOST_SYSTEM_NAME` if you build for the
host system instead of the target system when cross compiling.
diff --git a/Help/variable/CMAKE_SYSTEM_PROCESSOR.rst b/Help/variable/CMAKE_SYSTEM_PROCESSOR.rst
index 2f5313b..09280de 100644
--- a/Help/variable/CMAKE_SYSTEM_PROCESSOR.rst
+++ b/Help/variable/CMAKE_SYSTEM_PROCESSOR.rst
@@ -7,4 +7,4 @@ This variable is the same as :variable:`CMAKE_HOST_SYSTEM_PROCESSOR` if
you build for the host system instead of the target system when
cross compiling.
-* The Green Hills MULTI generator sets this to ``ARM`` by default
+* The :generator:`Green Hills MULTI` generator sets this to ``ARM`` by default.
diff --git a/Help/variable/CMAKE_SYSTEM_VERSION.rst b/Help/variable/CMAKE_SYSTEM_VERSION.rst
index 33510bb..3b3cdc5 100644
--- a/Help/variable/CMAKE_SYSTEM_VERSION.rst
+++ b/Help/variable/CMAKE_SYSTEM_VERSION.rst
@@ -1,7 +1,7 @@
CMAKE_SYSTEM_VERSION
--------------------
-The OS version CMake is building for.
+The operating system version CMake is building for.
This variable is the same as :variable:`CMAKE_HOST_SYSTEM_VERSION` if
you build for the host system instead of the target system when
diff --git a/Help/variable/CMAKE_TOOLCHAIN_FILE.rst b/Help/variable/CMAKE_TOOLCHAIN_FILE.rst
index e1a65e1..168ee74 100644
--- a/Help/variable/CMAKE_TOOLCHAIN_FILE.rst
+++ b/Help/variable/CMAKE_TOOLCHAIN_FILE.rst
@@ -4,6 +4,6 @@ CMAKE_TOOLCHAIN_FILE
Path to toolchain file supplied to :manual:`cmake(1)`.
This variable is specified on the command line when cross-compiling with CMake.
-It is the path to a file which is read early in the CMake run and which specifies
-locations for compilers and toolchain utilities, and other target platform and
-compiler related information.
+It is the path to a file which is read early in the CMake run and which
+specifies locations for compilers and toolchain utilities, and other target
+platform and compiler related information.
diff --git a/Help/variable/CMAKE_TRY_COMPILE_CONFIGURATION.rst b/Help/variable/CMAKE_TRY_COMPILE_CONFIGURATION.rst
index a92feab..d731f02 100644
--- a/Help/variable/CMAKE_TRY_COMPILE_CONFIGURATION.rst
+++ b/Help/variable/CMAKE_TRY_COMPILE_CONFIGURATION.rst
@@ -1,9 +1,10 @@
CMAKE_TRY_COMPILE_CONFIGURATION
-------------------------------
-Build configuration used for try_compile and try_run projects.
+Build configuration used for :command:`try_compile` and :command:`try_run`
+projects.
-Projects built by try_compile and try_run are built synchronously
-during the CMake configuration step. Therefore a specific build
+Projects built by :command:`try_compile` and :command:`try_run` are built
+synchronously during the CMake configuration step. Therefore a specific build
configuration must be chosen even if the generated build system
supports multiple configurations.
diff --git a/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst b/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst
index 5a4c86b..9af0d97 100644
--- a/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst
+++ b/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE.rst
@@ -4,20 +4,20 @@ CMAKE_USER_MAKE_RULES_OVERRIDE
Specify a CMake file that overrides platform information.
CMake loads the specified file while enabling support for each
-language from either the project() or enable_language() commands. It
-is loaded after CMake's builtin compiler and platform information
+language from either the :command:`project` or :command:`enable_language`
+commands. It is loaded after CMake's builtin compiler and platform information
modules have been loaded but before the information is used. The file
may set platform information variables to override CMake's defaults.
This feature is intended for use only in overriding information
variables that must be set before CMake builds its first test project
to check that the compiler for a language works. It should not be
-used to load a file in cases that a normal include() will work. Use
+used to load a file in cases that a normal :command:`include` will work. Use
it only as a last resort for behavior that cannot be achieved any
-other way. For example, one may set CMAKE_C_FLAGS_INIT to change the
-default value used to initialize CMAKE_C_FLAGS before it is cached.
-The override file should NOT be used to set anything that could be set
-after languages are enabled, such as variables like
-CMAKE_RUNTIME_OUTPUT_DIRECTORY that affect the placement of binaries.
-Information set in the file will be used for try_compile and try_run
-builds too.
+other way. For example, one may set ``CMAKE_C_FLAGS_INIT`` to change the
+default value used to initialize :variable:`CMAKE_C_FLAGS <CMAKE_<LANG>_FLAGS>`
+before it is cached. The override file should NOT be used to set anything
+that could be set after languages are enabled, such as variables like
+:variable:`CMAKE_RUNTIME_OUTPUT_DIRECTORY` that affect the placement of
+binaries. Information set in the file will be used for :command:`try_compile`
+and :command:`try_run` builds too.
diff --git a/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE_LANG.rst b/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE_LANG.rst
index e6d2c68..e7139ac 100644
--- a/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE_LANG.rst
+++ b/Help/variable/CMAKE_USER_MAKE_RULES_OVERRIDE_LANG.rst
@@ -1,7 +1,8 @@
CMAKE_USER_MAKE_RULES_OVERRIDE_<LANG>
-------------------------------------
-Specify a CMake file that overrides platform information for <LANG>.
+Specify a CMake file that overrides platform information for ``<LANG>``.
-This is a language-specific version of CMAKE_USER_MAKE_RULES_OVERRIDE
-loaded only when enabling language <LANG>.
+This is a language-specific version of
+:variable:`CMAKE_USER_MAKE_RULES_OVERRIDE` loaded only when enabling language
+``<LANG>``.
diff --git a/Help/variable/CMAKE_VERBOSE_MAKEFILE.rst b/Help/variable/CMAKE_VERBOSE_MAKEFILE.rst
index 2420a25..232a2fd 100644
--- a/Help/variable/CMAKE_VERBOSE_MAKEFILE.rst
+++ b/Help/variable/CMAKE_VERBOSE_MAKEFILE.rst
@@ -3,7 +3,7 @@ CMAKE_VERBOSE_MAKEFILE
Enable verbose output from Makefile builds.
-This variable is a cache entry initialized (to FALSE) by
+This variable is a cache entry initialized (to ``FALSE``) by
the :command:`project` command. Users may enable the option
in their local build tree to get more verbose output from
Makefile builds and show each command line as it is launched.
diff --git a/Help/variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD.rst b/Help/variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD.rst
index 68f1ff6..f54472a 100644
--- a/Help/variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD.rst
+++ b/Help/variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD.rst
@@ -1,8 +1,8 @@
CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
-----------------------------------------
-Include INSTALL target to default build.
+Include ``INSTALL`` target to default build.
-In Visual Studio solution, by default the INSTALL target will not be part of
-the default build. Setting this variable will enable the INSTALL target to be
-part of the default build.
+In Visual Studio solution, by default the ``INSTALL`` target will not be part
+of the default build. Setting this variable will enable the ``INSTALL`` target
+to be part of the default build.
diff --git a/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst b/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst
index 7e9d317..0be10e5 100644
--- a/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst
+++ b/Help/variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst
@@ -1,7 +1,7 @@
CMAKE_VS_INTEL_Fortran_PROJECT_VERSION
--------------------------------------
-When generating for Visual Studio 7 or greater with the Intel Fortran
-plugin installed, this specifies the .vfproj project file format
+When generating for :generator:`Visual Studio 7` or greater with the Intel
+Fortran plugin installed, this specifies the ``.vfproj`` project file format
version. This is intended for internal use by CMake and should not be
used by project code.
diff --git a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst
index 08c6061..144a41d 100644
--- a/Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst
+++ b/Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst
@@ -5,6 +5,6 @@ Visual Studio Platform Toolset name.
VS 10 and above use MSBuild under the hood and support multiple
compiler toolchains. CMake may specify a toolset explicitly, such as
-"v110" for VS 11 or "Windows7.1SDK" for 64-bit support in VS 10
+``v110`` for VS 11 or ``Windows7.1SDK`` for 64-bit support in VS 10
Express. CMake provides the name of the chosen toolset in this
variable.
diff --git a/Help/variable/CMAKE_WARN_DEPRECATED.rst b/Help/variable/CMAKE_WARN_DEPRECATED.rst
index 2a13895..7b8533c 100644
--- a/Help/variable/CMAKE_WARN_DEPRECATED.rst
+++ b/Help/variable/CMAKE_WARN_DEPRECATED.rst
@@ -3,8 +3,8 @@ CMAKE_WARN_DEPRECATED
Whether to issue deprecation warnings for macros and functions.
-If TRUE, this can be used by macros and functions to issue deprecation
-warnings. This variable is FALSE by default.
+If ``TRUE``, this can be used by macros and functions to issue deprecation
+warnings. This variable is ``FALSE`` by default.
These warnings can be enabled with the ``-Wdeprecated`` option, or
disabled with the ``-Wno-deprecated`` option, when running
diff --git a/Help/variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst b/Help/variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst
index f6a188d..81c1158 100644
--- a/Help/variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst
+++ b/Help/variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst
@@ -1,8 +1,9 @@
CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
------------------------------------------
-Ask cmake_install.cmake script to warn each time a file with absolute INSTALL DESTINATION is encountered.
+Ask ``cmake_install.cmake`` script to warn each time a file with absolute
+``INSTALL DESTINATION`` is encountered.
-This variable is used by CMake-generated cmake_install.cmake scripts.
-If one sets this variable to ON while running the script, it may get
+This variable is used by CMake-generated ``cmake_install.cmake`` scripts.
+If one sets this variable to ``ON`` while running the script, it may get
warning messages from the script.
diff --git a/Help/variable/CMAKE_WIN32_EXECUTABLE.rst b/Help/variable/CMAKE_WIN32_EXECUTABLE.rst
index 3e1e0dd..b96abba 100644
--- a/Help/variable/CMAKE_WIN32_EXECUTABLE.rst
+++ b/Help/variable/CMAKE_WIN32_EXECUTABLE.rst
@@ -1,7 +1,7 @@
CMAKE_WIN32_EXECUTABLE
----------------------
-Default value for WIN32_EXECUTABLE of targets.
+Default value for :prop_tgt:`WIN32_EXECUTABLE` of targets.
-This variable is used to initialize the WIN32_EXECUTABLE property on
-all the targets. See that target property for additional information.
+This variable is used to initialize the :prop_tgt:`WIN32_EXECUTABLE` property
+on all the targets. See that target property for additional information.
diff --git a/Help/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute.rst b/Help/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute.rst
index 096f64e..122b9f6 100644
--- a/Help/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute.rst
+++ b/Help/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute.rst
@@ -3,8 +3,8 @@ CMAKE_XCODE_ATTRIBUTE_<an-attribute>
Set Xcode target attributes directly.
-Tell the Xcode generator to set '<an-attribute>' to a given value in
-the generated Xcode project. Ignored on other generators.
+Tell the :generator:`Xcode` generator to set '<an-attribute>' to a given value
+in the generated Xcode project. Ignored on other generators.
See the :prop_tgt:`XCODE_ATTRIBUTE_<an-attribute>` target property
to set attributes on a specific target.
diff --git a/Help/variable/CMAKE_XCODE_PLATFORM_TOOLSET.rst b/Help/variable/CMAKE_XCODE_PLATFORM_TOOLSET.rst
index f0a4841..210da52 100644
--- a/Help/variable/CMAKE_XCODE_PLATFORM_TOOLSET.rst
+++ b/Help/variable/CMAKE_XCODE_PLATFORM_TOOLSET.rst
@@ -3,7 +3,7 @@ CMAKE_XCODE_PLATFORM_TOOLSET
Xcode compiler selection.
-Xcode supports selection of a compiler from one of the installed
+:generator:`Xcode` supports selection of a compiler from one of the installed
toolsets. CMake provides the name of the chosen toolset in this
-variable, if any is explicitly selected (e.g. via the cmake -T
-option).
+variable, if any is explicitly selected (e.g. via the :manual:`cmake(1)`
+``-T`` option).
diff --git a/Help/variable/CPACK_ABSOLUTE_DESTINATION_FILES.rst b/Help/variable/CPACK_ABSOLUTE_DESTINATION_FILES.rst
index d836629..928fe45 100644
--- a/Help/variable/CPACK_ABSOLUTE_DESTINATION_FILES.rst
+++ b/Help/variable/CPACK_ABSOLUTE_DESTINATION_FILES.rst
@@ -1,10 +1,10 @@
CPACK_ABSOLUTE_DESTINATION_FILES
--------------------------------
-List of files which have been installed using an ABSOLUTE DESTINATION path.
+List of files which have been installed using an ``ABSOLUTE DESTINATION`` path.
This variable is a Read-Only variable which is set internally by CPack
during installation and before packaging using
-CMAKE_ABSOLUTE_DESTINATION_FILES defined in cmake_install.cmake
+:variable:`CMAKE_ABSOLUTE_DESTINATION_FILES` defined in ``cmake_install.cmake``
scripts. The value can be used within CPack project configuration
-file and/or CPack<GEN>.cmake file of <GEN> generator.
+file and/or ``CPack<GEN>.cmake`` file of ``<GEN>`` generator.
diff --git a/Help/variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY.rst b/Help/variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY.rst
index e938978..6cf75e4 100644
--- a/Help/variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY.rst
+++ b/Help/variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY.rst
@@ -3,6 +3,6 @@ CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
Boolean toggle to include/exclude top level directory (component case).
-Similar usage as CPACK_INCLUDE_TOPLEVEL_DIRECTORY but for the
-component case. See CPACK_INCLUDE_TOPLEVEL_DIRECTORY documentation
-for the detail.
+Similar usage as :variable:`CPACK_INCLUDE_TOPLEVEL_DIRECTORY` but for the
+component case. See :variable:`CPACK_INCLUDE_TOPLEVEL_DIRECTORY`
+documentation for the detail.
diff --git a/Help/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst b/Help/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst
index 4d96385..5dad6bd 100644
--- a/Help/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst
+++ b/Help/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst
@@ -1,10 +1,11 @@
CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
-------------------------------------------
-Ask CPack to error out as soon as a file with absolute INSTALL DESTINATION is encountered.
+Ask CPack to error out as soon as a file with absolute ``INSTALL DESTINATION``
+is encountered.
The fatal error is emitted before the installation of the offending
-file takes place. Some CPack generators, like NSIS,enforce this
+file takes place. Some CPack generators, like NSIS, enforce this
internally. This variable triggers the definition
-ofCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runsVariables
-common to all CPack generators
+of :variable:`CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION` when CPack
+runs.
diff --git a/Help/variable/CPACK_INCLUDE_TOPLEVEL_DIRECTORY.rst b/Help/variable/CPACK_INCLUDE_TOPLEVEL_DIRECTORY.rst
index 4f96bff..b8e9105 100644
--- a/Help/variable/CPACK_INCLUDE_TOPLEVEL_DIRECTORY.rst
+++ b/Help/variable/CPACK_INCLUDE_TOPLEVEL_DIRECTORY.rst
@@ -4,16 +4,17 @@ CPACK_INCLUDE_TOPLEVEL_DIRECTORY
Boolean toggle to include/exclude top level directory.
When preparing a package CPack installs the item under the so-called
-top level directory. The purpose of is to include (set to 1 or ON or
-TRUE) the top level directory in the package or not (set to 0 or OFF
-or FALSE).
+top level directory. The purpose of is to include (set to ``1`` or ``ON`` or
+``TRUE``) the top level directory in the package or not (set to ``0`` or
+``OFF`` or ``FALSE``).
Each CPack generator has a built-in default value for this variable.
E.g. Archive generators (ZIP, TGZ, ...) includes the top level
whereas RPM or DEB don't. The user may override the default value by
setting this variable.
-There is a similar variable CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
-which may be used to override the behavior for the component packaging
+There is a similar variable
+:variable:`CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY` which may be used
+to override the behavior for the component packaging
case which may have different default value for historical (now
backward compatibility) reason.
diff --git a/Help/variable/CPACK_INSTALL_SCRIPT.rst b/Help/variable/CPACK_INSTALL_SCRIPT.rst
index 59b8cd7..12a48a4 100644
--- a/Help/variable/CPACK_INSTALL_SCRIPT.rst
+++ b/Help/variable/CPACK_INSTALL_SCRIPT.rst
@@ -5,4 +5,4 @@ Extra CMake script provided by the user.
If set this CMake script will be executed by CPack during its local
[CPack-private] installation which is done right before packaging the
-files. The script is not called by e.g.: make install.
+files. The script is not called by e.g.: ``make install``.
diff --git a/Help/variable/CPACK_PACKAGING_INSTALL_PREFIX.rst b/Help/variable/CPACK_PACKAGING_INSTALL_PREFIX.rst
index f9cfa1b..f423e2e 100644
--- a/Help/variable/CPACK_PACKAGING_INSTALL_PREFIX.rst
+++ b/Help/variable/CPACK_PACKAGING_INSTALL_PREFIX.rst
@@ -3,11 +3,13 @@ CPACK_PACKAGING_INSTALL_PREFIX
The prefix used in the built package.
-Each CPack generator has a default value (like /usr). This default
-value may be overwritten from the CMakeLists.txt or the cpack command
-line by setting an alternative value.
+Each CPack generator has a default value (like ``/usr``). This default
+value may be overwritten from the ``CMakeLists.txt`` or the :manual:`cpack(1)`
+command line by setting an alternative value. Example:
-e.g. set(CPACK_PACKAGING_INSTALL_PREFIX "/opt")
+::
-This is not the same purpose as CMAKE_INSTALL_PREFIX which is used
+ set(CPACK_PACKAGING_INSTALL_PREFIX "/opt")
+
+This is not the same purpose as :variable:`CMAKE_INSTALL_PREFIX` which is used
when installing from the build tree without building a package.
diff --git a/Help/variable/CPACK_SET_DESTDIR.rst b/Help/variable/CPACK_SET_DESTDIR.rst
index 69d82e6..27fd355 100644
--- a/Help/variable/CPACK_SET_DESTDIR.rst
+++ b/Help/variable/CPACK_SET_DESTDIR.rst
@@ -1,30 +1,31 @@
CPACK_SET_DESTDIR
-----------------
-Boolean toggle to make CPack use DESTDIR mechanism when packaging.
+Boolean toggle to make CPack use ``DESTDIR`` mechanism when packaging.
-DESTDIR means DESTination DIRectory. It is commonly used by makefile
+``DESTDIR`` means DESTination DIRectory. It is commonly used by makefile
users in order to install software at non-default location. It is a
basic relocation mechanism that should not be used on Windows (see
-CMAKE_INSTALL_PREFIX documentation). It is usually invoked like this:
+:variable:`CMAKE_INSTALL_PREFIX` documentation). It is usually invoked like
+this:
::
make DESTDIR=/home/john install
which will install the concerned software using the installation
-prefix, e.g. "/usr/local" prepended with the DESTDIR value which
-finally gives "/home/john/usr/local". When preparing a package, CPack
+prefix, e.g. ``/usr/local`` prepended with the ``DESTDIR`` value which
+finally gives ``/home/john/usr/local``. When preparing a package, CPack
first installs the items to be packaged in a local (to the build tree)
-directory by using the same DESTDIR mechanism. Nevertheless, if
-CPACK_SET_DESTDIR is set then CPack will set DESTDIR before doing the
+directory by using the same ``DESTDIR`` mechanism. Nevertheless, if
+``CPACK_SET_DESTDIR`` is set then CPack will set ``DESTDIR`` before doing the
local install. The most noticeable difference is that without
-CPACK_SET_DESTDIR, CPack uses CPACK_PACKAGING_INSTALL_PREFIX as a
-prefix whereas with CPACK_SET_DESTDIR set, CPack will use
-CMAKE_INSTALL_PREFIX as a prefix.
+``CPACK_SET_DESTDIR``, CPack uses :variable:`CPACK_PACKAGING_INSTALL_PREFIX`
+as a prefix whereas with ``CPACK_SET_DESTDIR`` set, CPack will use
+:variable:`CMAKE_INSTALL_PREFIX` as a prefix.
-Manually setting CPACK_SET_DESTDIR may help (or simply be necessary)
-if some install rules uses absolute DESTINATION (see CMake INSTALL
-command). However, starting with CPack/CMake 2.8.3 RPM and DEB
-installers tries to handle DESTDIR automatically so that it is seldom
-necessary for the user to set it.
+Manually setting ``CPACK_SET_DESTDIR`` may help (or simply be necessary)
+if some install rules uses absolute ``DESTINATION`` (see CMake
+:command:`install` command). However, starting with CPack/CMake 2.8.3 RPM
+and DEB installers tries to handle ``DESTDIR`` automatically so that it is
+seldom necessary for the user to set it.
diff --git a/Help/variable/CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst b/Help/variable/CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst
index 8d6f54f..3fc5cca 100644
--- a/Help/variable/CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst
+++ b/Help/variable/CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION.rst
@@ -1,8 +1,9 @@
CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
------------------------------------------
-Ask CPack to warn each time a file with absolute INSTALL DESTINATION is encountered.
+Ask CPack to warn each time a file with absolute ``INSTALL DESTINATION`` is
+encountered.
This variable triggers the definition of
-CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs
-cmake_install.cmake scripts.
+:variable:`CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION` when CPack runs
+``cmake_install.cmake`` scripts.
diff --git a/Help/variable/CTEST_COVERAGE_COMMAND.rst b/Help/variable/CTEST_COVERAGE_COMMAND.rst
index a669dd7..0491d42 100644
--- a/Help/variable/CTEST_COVERAGE_COMMAND.rst
+++ b/Help/variable/CTEST_COVERAGE_COMMAND.rst
@@ -12,12 +12,12 @@ Java project can generate a series of XML files.
The Cobertura Coverage parser expects to read the coverage data from a
single XML file which contains the coverage data for all modules.
-Cobertura has a program with the ability to merge given cobertura.ser files
+Cobertura has a program with the ability to merge given ``cobertura.ser`` files
and then another program to generate a combined XML file from the previous
merged file. For command line testing, this can be done by hand prior to
CTest looking for the coverage files. For script builds,
set the ``CTEST_COVERAGE_COMMAND`` variable to point to a file which will
-perform these same steps, such as a .sh or .bat file.
+perform these same steps, such as a ``.sh`` or ``.bat`` file.
.. code-block:: cmake
@@ -35,17 +35,17 @@ the :command:`configure_file` command and might contain the following code:
cobertura-report --datafile coberturamerge.ser --destination . \
--format xml $SourceDirs
-The script uses ``find`` to capture the paths to all of the cobertura.ser files
-found below the project's source directory. It keeps the list of files and
-supplies it as an argument to the ``cobertura-merge`` program. The ``--datafile``
-argument signifies where the result of the merge will be kept.
+The script uses ``find`` to capture the paths to all of the ``cobertura.ser``
+files found below the project's source directory. It keeps the list of files
+and supplies it as an argument to the ``cobertura-merge`` program. The
+``--datafile`` argument signifies where the result of the merge will be kept.
The combined ``coberturamerge.ser`` file is then used to generate the XML report
-using the ``cobertura-report`` program. The call to the cobertura-report program
-requires some named arguments.
+using the ``cobertura-report`` program. The call to the cobertura-report
+program requires some named arguments.
``--datafila``
- path to the merged .ser file
+ path to the merged ``.ser`` file
``--destination``
path to put the output files(s)
@@ -54,7 +54,7 @@ requires some named arguments.
file format to write output in: xml or html
The rest of the supplied arguments consist of the full paths to the
-/src/main/java directories of each module within the souce tree. These
+``/src/main/java`` directories of each module within the souce tree. These
directories are needed and should not be forgotten.
.. _`Cobertura`: http://cobertura.github.io/cobertura/
diff --git a/Help/variable/CTEST_MEMORYCHECK_TYPE.rst b/Help/variable/CTEST_MEMORYCHECK_TYPE.rst
index f1087c0..b963293 100644
--- a/Help/variable/CTEST_MEMORYCHECK_TYPE.rst
+++ b/Help/variable/CTEST_MEMORYCHECK_TYPE.rst
@@ -3,5 +3,6 @@ CTEST_MEMORYCHECK_TYPE
Specify the CTest ``MemoryCheckType`` setting
in a :manual:`ctest(1)` dashboard client script.
-Valid values are Valgrind, Purify, BoundsChecker, and ThreadSanitizer,
-AddressSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer.
+Valid values are ``Valgrind``, ``Purify``, ``BoundsChecker``, and
+``ThreadSanitizer``, ``AddressSanitizer``, ``MemorySanitizer``, and
+``UndefinedBehaviorSanitizer``.
diff --git a/Help/variable/CYGWIN.rst b/Help/variable/CYGWIN.rst
index c168878..0039e07 100644
--- a/Help/variable/CYGWIN.rst
+++ b/Help/variable/CYGWIN.rst
@@ -1,6 +1,6 @@
CYGWIN
------
-True for Cygwin.
+``True`` for Cygwin.
-Set to true when using Cygwin.
+Set to ``true`` when using Cygwin.
diff --git a/Help/variable/ENV.rst b/Help/variable/ENV.rst
index 977afc3..368152a 100644
--- a/Help/variable/ENV.rst
+++ b/Help/variable/ENV.rst
@@ -3,5 +3,5 @@ ENV
Access environment variables.
-Use the syntax $ENV{VAR} to read environment variable VAR. See also
-the set() command to set ENV{VAR}.
+Use the syntax ``$ENV{VAR}`` to read environment variable ``VAR``. See also
+the :command:`set` command to set ``ENV{VAR}``.
diff --git a/Help/variable/EXECUTABLE_OUTPUT_PATH.rst b/Help/variable/EXECUTABLE_OUTPUT_PATH.rst
index 7079230..26d3e92 100644
--- a/Help/variable/EXECUTABLE_OUTPUT_PATH.rst
+++ b/Help/variable/EXECUTABLE_OUTPUT_PATH.rst
@@ -3,6 +3,6 @@ EXECUTABLE_OUTPUT_PATH
Old executable location variable.
-The target property RUNTIME_OUTPUT_DIRECTORY supercedes this variable
-for a target if it is set. Executable targets are otherwise placed in
+The target property :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` supercedes this
+variable for a target if it is set. Executable targets are otherwise placed in
this directory.
diff --git a/Help/variable/LIBRARY_OUTPUT_PATH.rst b/Help/variable/LIBRARY_OUTPUT_PATH.rst
index 1c1f8ae..ba02911 100644
--- a/Help/variable/LIBRARY_OUTPUT_PATH.rst
+++ b/Help/variable/LIBRARY_OUTPUT_PATH.rst
@@ -3,7 +3,7 @@ LIBRARY_OUTPUT_PATH
Old library location variable.
-The target properties ARCHIVE_OUTPUT_DIRECTORY,
-LIBRARY_OUTPUT_DIRECTORY, and RUNTIME_OUTPUT_DIRECTORY supercede this
-variable for a target if they are set. Library targets are otherwise
-placed in this directory.
+The target properties :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`,
+:prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`, and :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY`
+supercede this variable for a target if they are set. Library targets are
+otherwise placed in this directory.
diff --git a/Help/variable/MINGW.rst b/Help/variable/MINGW.rst
index 521d417..6d29be4 100644
--- a/Help/variable/MINGW.rst
+++ b/Help/variable/MINGW.rst
@@ -1,6 +1,6 @@
MINGW
-----
-True when using MinGW
+``True`` when using MinGW
-Set to true when the compiler is some version of MinGW.
+Set to ``true`` when the compiler is some version of MinGW.
diff --git a/Help/variable/MSVC.rst b/Help/variable/MSVC.rst
index e9f931b..913ed08 100644
--- a/Help/variable/MSVC.rst
+++ b/Help/variable/MSVC.rst
@@ -1,6 +1,6 @@
MSVC
----
-True when using Microsoft Visual C
+``True`` when using Microsoft Visual C++.
-Set to true when the compiler is some version of Microsoft Visual C.
+Set to ``true`` when the compiler is some version of Microsoft Visual C++.
diff --git a/Help/variable/MSVC10.rst b/Help/variable/MSVC10.rst
index 894c5aa..33692ad 100644
--- a/Help/variable/MSVC10.rst
+++ b/Help/variable/MSVC10.rst
@@ -1,6 +1,6 @@
MSVC10
------
-True when using Microsoft Visual C 10.0
+``True`` when using Microsoft Visual C++ 10.0
-Set to true when the compiler is version 10.0 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 10.0 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC11.rst b/Help/variable/MSVC11.rst
index fe25297..3ab606d 100644
--- a/Help/variable/MSVC11.rst
+++ b/Help/variable/MSVC11.rst
@@ -1,6 +1,6 @@
MSVC11
------
-True when using Microsoft Visual C 11.0
+``True`` when using Microsoft Visual C++ 11.0
-Set to true when the compiler is version 11.0 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 11.0 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC12.rst b/Help/variable/MSVC12.rst
index 216d3d3..15fa64b 100644
--- a/Help/variable/MSVC12.rst
+++ b/Help/variable/MSVC12.rst
@@ -1,6 +1,6 @@
MSVC12
------
-True when using Microsoft Visual C 12.0
+``True`` when using Microsoft Visual C++ 12.0.
-Set to true when the compiler is version 12.0 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 12.0 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC14.rst b/Help/variable/MSVC14.rst
index 33c782b..0b9125d 100644
--- a/Help/variable/MSVC14.rst
+++ b/Help/variable/MSVC14.rst
@@ -1,6 +1,6 @@
MSVC14
------
-True when using Microsoft Visual C 14.0
+``True`` when using Microsoft Visual C++ 14.0.
-Set to true when the compiler is version 14.0 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 14.0 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC60.rst b/Help/variable/MSVC60.rst
index 572e9f4..14f09cf 100644
--- a/Help/variable/MSVC60.rst
+++ b/Help/variable/MSVC60.rst
@@ -1,6 +1,6 @@
MSVC60
------
-True when using Microsoft Visual C 6.0
+``True`` when using Microsoft Visual C++ 6.0.
-Set to true when the compiler is version 6.0 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 6.0 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC70.rst b/Help/variable/MSVC70.rst
index b1b7a881..76fa96f 100644
--- a/Help/variable/MSVC70.rst
+++ b/Help/variable/MSVC70.rst
@@ -1,6 +1,6 @@
MSVC70
------
-True when using Microsoft Visual C 7.0
+``True`` when using Microsoft Visual C++ 7.0.
-Set to true when the compiler is version 7.0 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 7.0 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC71.rst b/Help/variable/MSVC71.rst
index af309a6..d69d4fc 100644
--- a/Help/variable/MSVC71.rst
+++ b/Help/variable/MSVC71.rst
@@ -1,6 +1,6 @@
MSVC71
------
-True when using Microsoft Visual C 7.1
+``True`` when using Microsoft Visual C++ 7.1.
-Set to true when the compiler is version 7.1 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 7.1 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC80.rst b/Help/variable/MSVC80.rst
index 306c67f..b17777c 100644
--- a/Help/variable/MSVC80.rst
+++ b/Help/variable/MSVC80.rst
@@ -1,6 +1,6 @@
MSVC80
------
-True when using Microsoft Visual C 8.0
+``True`` when using Microsoft Visual C++ 8.0.
-Set to true when the compiler is version 8.0 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 8.0 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC90.rst b/Help/variable/MSVC90.rst
index 3cfcc67..7162d6c 100644
--- a/Help/variable/MSVC90.rst
+++ b/Help/variable/MSVC90.rst
@@ -1,6 +1,6 @@
MSVC90
------
-True when using Microsoft Visual C 9.0
+``True`` when using Microsoft Visual C++ 9.0.
-Set to true when the compiler is version 9.0 of Microsoft Visual C.
+Set to ``true`` when the compiler is version 9.0 of Microsoft Visual C++.
diff --git a/Help/variable/MSVC_IDE.rst b/Help/variable/MSVC_IDE.rst
index 055f876..027d1bc 100644
--- a/Help/variable/MSVC_IDE.rst
+++ b/Help/variable/MSVC_IDE.rst
@@ -1,7 +1,7 @@
MSVC_IDE
--------
-True when using the Microsoft Visual C IDE
+``True`` when using the Microsoft Visual C++ IDE.
-Set to true when the target platform is the Microsoft Visual C IDE, as
+Set to ``true`` when the target platform is the Microsoft Visual C++ IDE, as
opposed to the command line compiler.
diff --git a/Help/variable/UNIX.rst b/Help/variable/UNIX.rst
index 82e3454..0877b7c 100644
--- a/Help/variable/UNIX.rst
+++ b/Help/variable/UNIX.rst
@@ -1,7 +1,7 @@
UNIX
----
-True for UNIX and UNIX like operating systems.
+``True`` for UNIX and UNIX like operating systems.
-Set to true when the target system is UNIX or UNIX like (i.e. APPLE
-and CYGWIN).
+Set to ``true`` when the target system is UNIX or UNIX like (i.e.
+:variable:`APPLE` and :variable:`CYGWIN`).
diff --git a/Help/variable/WIN32.rst b/Help/variable/WIN32.rst
index 8cf7bf3..2189069 100644
--- a/Help/variable/WIN32.rst
+++ b/Help/variable/WIN32.rst
@@ -1,6 +1,6 @@
WIN32
-----
-True on windows systems, including win64.
+``True`` on Windows systems, including Win64.
-Set to true when the target system is Windows.
+Set to ``true`` when the target system is Windows.
diff --git a/Help/variable/XCODE_VERSION.rst b/Help/variable/XCODE_VERSION.rst
index b6f0403..b85d41e 100644
--- a/Help/variable/XCODE_VERSION.rst
+++ b/Help/variable/XCODE_VERSION.rst
@@ -1,7 +1,7 @@
XCODE_VERSION
-------------
-Version of Xcode (Xcode generator only).
+Version of Xcode (:generator:`Xcode` generator only).
Under the Xcode generator, this is the version of Xcode as specified
-in "Xcode.app/Contents/version.plist" (such as "3.1.2").
+in ``Xcode.app/Contents/version.plist`` (such as ``3.1.2``).
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 492c3ea..9bd1d67 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -96,6 +96,7 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
# Try to identify the compiler.
set(CMAKE_C_COMPILER_ID)
+ set(CMAKE_C_PLATFORM_ID)
file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_C_COMPILER_ID_PLATFORM_CONTENT)
@@ -117,12 +118,12 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)
# Set old compiler and platform id variables.
- if(CMAKE_C_COMPILER_ID MATCHES "GNU")
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(CMAKE_COMPILER_IS_GNUCC 1)
endif()
- if("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
+ if(CMAKE_C_PLATFORM_ID MATCHES "MinGW")
set(CMAKE_COMPILER_IS_MINGW 1)
- elseif("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin")
+ elseif(CMAKE_C_PLATFORM_ID MATCHES "Cygwin")
set(CMAKE_COMPILER_IS_CYGWIN 1)
endif()
endif()
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 2032015..f25a2db 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -91,6 +91,7 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
# Try to identify the compiler.
set(CMAKE_CXX_COMPILER_ID)
+ set(CMAKE_CXX_PLATFORM_ID)
file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT)
@@ -112,12 +113,12 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp)
# Set old compiler and platform id variables.
- if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_COMPILER_IS_GNUCXX 1)
endif()
- if("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
+ if(CMAKE_CXX_PLATFORM_ID MATCHES "MinGW")
set(CMAKE_COMPILER_IS_MINGW 1)
- elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
+ elseif(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin")
set(CMAKE_COMPILER_IS_CYGWIN 1)
endif()
endif()
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 064e650..3bfb876 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -101,6 +101,8 @@ if (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
+ elseif ("${CMAKE_C_COMPILER_ID}" MATCHES MSVC)
+ set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "$ENV{INCLUDE}" CACHE INTERNAL "C compiler system include directories")
endif ()
endif ()
@@ -110,6 +112,8 @@ if (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines)
set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
+ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES MSVC)
+ set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "$ENV{INCLUDE}" CACHE INTERNAL "CXX compiler system include directories")
endif ()
endif ()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index f4b0783..1fc582f 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -1584,9 +1584,8 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
# we work around that issue by compiling the intermediate link object as a
# pre-link custom command in that situation.
set(do_obj_build_rule TRUE)
- if (MSVC_VERSION GREATER 1599)
- # VS 2010 and 2012 have this problem. If future versions fix this issue,
- # it should still work, it just won't be as nice as the other method.
+ if (MSVC_VERSION GREATER 1599 AND MSVC_VERSION LESS 1800)
+ # VS 2010 and 2012 have this problem.
set(do_obj_build_rule FALSE)
endif()
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake
index 581301b..88932ad 100644
--- a/Modules/Platform/HP-UX.cmake
+++ b/Modules/Platform/HP-UX.cmake
@@ -1,9 +1,11 @@
set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib)
-set(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
+if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "ia64")
+ set(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a")
+ set(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".so")
+endif()
set(CMAKE_DL_LIBS "dld")
-set(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a")
-set(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".so")
# The HP linker needs to find transitive shared library dependencies
# in the -L path. Therefore the runtime path must be added to the
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 54bbbbb..cfbeab3 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 3)
-set(CMake_VERSION_PATCH 20150820)
+set(CMake_VERSION_PATCH 20150824)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 2dab169..b06fb5c 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -56,9 +56,9 @@ void cmDefinitions::Raise(const std::string& key,
}
bool cmDefinitions::HasKey(const std::string& key,
- StackConstIter begin, StackConstIter end)
+ StackIter begin, StackIter end)
{
- for (StackConstIter it = begin; it != end; ++it)
+ for (StackIter it = begin; it != end; ++it)
{
MapType::const_iterator i = it->Map.find(key);
if (i != it->Map.end())
@@ -94,12 +94,12 @@ std::vector<std::string> cmDefinitions::UnusedKeys() const
}
//----------------------------------------------------------------------------
-cmDefinitions cmDefinitions::MakeClosure(StackConstIter begin,
- StackConstIter end)
+cmDefinitions cmDefinitions::MakeClosure(StackIter begin,
+ StackIter end)
{
cmDefinitions closure;
std::set<std::string> undefined;
- for (StackConstIter it = begin; it != end; ++it)
+ for (StackIter it = begin; it != end; ++it)
{
// Consider local definitions.
for(MapType::const_iterator mi = it->Map.begin();
@@ -125,12 +125,12 @@ cmDefinitions cmDefinitions::MakeClosure(StackConstIter begin,
//----------------------------------------------------------------------------
std::vector<std::string>
-cmDefinitions::ClosureKeys(StackConstIter begin, StackConstIter end)
+cmDefinitions::ClosureKeys(StackIter begin, StackIter end)
{
std::set<std::string> bound;
std::vector<std::string> defined;
- for (StackConstIter it = begin; it != end; ++it)
+ for (StackIter it = begin; it != end; ++it)
{
defined.reserve(defined.size() + it->Map.size());
for(MapType::const_iterator mi = it->Map.begin();
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 5fdcaab..411867c 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -13,6 +13,9 @@
#define cmDefinitions_h
#include "cmStandardIncludes.h"
+
+#include "cmLinkedTree.h"
+
#if defined(CMAKE_BUILD_WITH_CMAKE)
#ifdef CMake_HAVE_CXX11_UNORDERED_MAP
#include <unordered_map>
@@ -32,26 +35,26 @@
*/
class cmDefinitions
{
- typedef std::list<cmDefinitions>::reverse_iterator StackIter;
- typedef std::list<cmDefinitions>::const_reverse_iterator StackConstIter;
+ typedef cmLinkedTree<cmDefinitions>::iterator StackIter;
public:
static const char* Get(const std::string& key,
StackIter begin, StackIter end);
- static void Raise(const std::string& key, StackIter begin, StackIter end);
+ static void Raise(const std::string& key,
+ StackIter begin, StackIter end);
static bool HasKey(const std::string& key,
- StackConstIter begin, StackConstIter end);
+ StackIter begin, StackIter end);
/** Set (or unset if null) a value associated with a key. */
void Set(const std::string& key, const char* value);
std::vector<std::string> UnusedKeys() const;
- static std::vector<std::string> ClosureKeys(StackConstIter begin,
- StackConstIter end);
+ static std::vector<std::string> ClosureKeys(StackIter begin,
+ StackIter end);
- static cmDefinitions MakeClosure(StackConstIter begin, StackConstIter end);
+ static cmDefinitions MakeClosure(StackIter begin, StackIter end);
private:
// String with existence boolean.
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index d55be11..7ffab0c 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -72,8 +72,8 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
// Set an _IMPORT_PREFIX variable for import location properties
// to reference if they are relative to the install prefix.
- std::string installPrefix =
- this->IEGen->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
+ std::string installPrefix = this->IEGen->GetLocalGenerator()
+ ->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX");
std::string const& expDest = this->IEGen->GetDestination();
if(cmSystemTools::FileIsFullPath(expDest))
{
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 299c112..dd58e7b 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -270,48 +270,71 @@ const char *cmGeneratorTarget::GetProperty(const std::string& prop) const
std::string cmGeneratorTarget::GetOutputName(const std::string& config,
bool implib) const
{
- std::vector<std::string> props;
- std::string type = this->Target->GetOutputTargetType(implib);
- std::string configUpper = cmSystemTools::UpperCase(config);
- if(!type.empty() && !configUpper.empty())
- {
- // <ARCHIVE|LIBRARY|RUNTIME>_OUTPUT_NAME_<CONFIG>
- props.push_back(type + "_OUTPUT_NAME_" + configUpper);
- }
- if(!type.empty())
- {
- // <ARCHIVE|LIBRARY|RUNTIME>_OUTPUT_NAME
- props.push_back(type + "_OUTPUT_NAME");
- }
- if(!configUpper.empty())
+ // Lookup/compute/cache the output name for this configuration.
+ OutputNameKey key(config, implib);
+ cmGeneratorTarget::OutputNameMapType::iterator i =
+ this->OutputNameMap.find(key);
+ if(i == this->OutputNameMap.end())
{
- // OUTPUT_NAME_<CONFIG>
- props.push_back("OUTPUT_NAME_" + configUpper);
- // <CONFIG>_OUTPUT_NAME
- props.push_back(configUpper + "_OUTPUT_NAME");
- }
- // OUTPUT_NAME
- props.push_back("OUTPUT_NAME");
+ // Add empty name in map to detect potential recursion.
+ OutputNameMapType::value_type entry(key, "");
+ i = this->OutputNameMap.insert(entry).first;
- std::string outName;
- for(std::vector<std::string>::const_iterator i = props.begin();
- i != props.end(); ++i)
- {
- if (const char* outNameProp = this->Target->GetProperty(*i))
+ // Compute output name.
+ std::vector<std::string> props;
+ std::string type = this->Target->GetOutputTargetType(implib);
+ std::string configUpper = cmSystemTools::UpperCase(config);
+ if(!type.empty() && !configUpper.empty())
{
- outName = outNameProp;
- break;
+ // <ARCHIVE|LIBRARY|RUNTIME>_OUTPUT_NAME_<CONFIG>
+ props.push_back(type + "_OUTPUT_NAME_" + configUpper);
}
- }
+ if(!type.empty())
+ {
+ // <ARCHIVE|LIBRARY|RUNTIME>_OUTPUT_NAME
+ props.push_back(type + "_OUTPUT_NAME");
+ }
+ if(!configUpper.empty())
+ {
+ // OUTPUT_NAME_<CONFIG>
+ props.push_back("OUTPUT_NAME_" + configUpper);
+ // <CONFIG>_OUTPUT_NAME
+ props.push_back(configUpper + "_OUTPUT_NAME");
+ }
+ // OUTPUT_NAME
+ props.push_back("OUTPUT_NAME");
- if (outName.empty())
+ std::string outName;
+ for(std::vector<std::string>::const_iterator it = props.begin();
+ it != props.end(); ++it)
+ {
+ if (const char* outNameProp = this->Target->GetProperty(*it))
+ {
+ outName = outNameProp;
+ break;
+ }
+ }
+
+ if(outName.empty())
+ {
+ outName = this->GetName();
+ }
+
+ // Now evaluate genex and update the previously-prepared map entry.
+ cmGeneratorExpression ge;
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(outName);
+ i->second = cge->Evaluate(this->Makefile, config);
+ }
+ else if(i->second.empty())
{
- outName = this->GetName();
+ // An empty map entry indicates we have been called recursively
+ // from the above block.
+ this->Makefile->GetCMakeInstance()->IssueMessage(
+ cmake::FATAL_ERROR,
+ "Target '" + this->GetName() + "' OUTPUT_NAME depends on itself.",
+ this->Target->GetBacktrace());
}
-
- cmGeneratorExpression ge;
- cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(outName);
- return cge->Evaluate(this->Makefile, config);
+ return i->second;
}
//----------------------------------------------------------------------------
@@ -761,8 +784,7 @@ bool cmGeneratorTarget::HasSOName(const std::string& config) const
{
// soname is supported only for shared libraries and modules,
// and then only when the platform supports an soname flag.
- return ((this->GetType() == cmTarget::SHARED_LIBRARY ||
- this->GetType() == cmTarget::MODULE_LIBRARY) &&
+ return ((this->GetType() == cmTarget::SHARED_LIBRARY) &&
!this->GetPropertyAsBool("NO_SONAME") &&
this->Makefile->GetSONameFlag(this->GetLinkerLanguage(config)));
}
@@ -951,9 +973,13 @@ cmGeneratorTarget::GetAppBundleDirectory(const std::string& config,
bool contentOnly) const
{
std::string fpath = this->GetFullName(config, false);
- fpath += ".app/Contents";
- if(!contentOnly)
- fpath += "/MacOS";
+ fpath += ".app";
+ if(!this->Makefile->PlatformIsAppleIos())
+ {
+ fpath += "/Contents";
+ if(!contentOnly)
+ fpath += "/MacOS";
+ }
return fpath;
}
@@ -985,9 +1011,12 @@ std::string cmGeneratorTarget::GetCFBundleDirectory(const std::string& config,
}
}
fpath += ext;
- fpath += "/Contents";
- if(!contentOnly)
- fpath += "/MacOS";
+ if(!this->Makefile->PlatformIsAppleIos())
+ {
+ fpath += "/Contents";
+ if(!contentOnly)
+ fpath += "/MacOS";
+ }
return fpath;
}
@@ -999,7 +1028,7 @@ cmGeneratorTarget::GetFrameworkDirectory(const std::string& config,
std::string fpath;
fpath += this->GetOutputName(config, false);
fpath += ".framework";
- if(!rootDir)
+ if(!rootDir && !this->Makefile->PlatformIsAppleIos())
{
fpath += "/Versions/";
fpath += this->Target->GetFrameworkVersion();
@@ -2146,9 +2175,12 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
if(this->Target->IsFrameworkOnApple())
{
realName = prefix;
- realName += "Versions/";
- realName += this->Target->GetFrameworkVersion();
- realName += "/";
+ if(!this->Makefile->PlatformIsAppleIos())
+ {
+ realName += "Versions/";
+ realName += this->Target->GetFrameworkVersion();
+ realName += "/";
+ }
realName += base;
soName = realName;
}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 68e7a8a..15b3335 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -375,6 +375,10 @@ private:
};
mutable std::map<std::string, LinkImplClosure> LinkImplClosureMap;
+ typedef std::pair<std::string, bool> OutputNameKey;
+ typedef std::map<OutputNameKey, std::string> OutputNameMapType;
+ mutable OutputNameMapType OutputNameMap;
+
public:
std::vector<cmTarget const*> const&
GetLinkImplementationClosure(const std::string& config) const;
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx
index 13a9afb..0f56c8e 100644
--- a/Source/cmGetFilenameComponentCommand.cxx
+++ b/Source/cmGetFilenameComponentCommand.cxx
@@ -93,11 +93,23 @@ bool cmGetFilenameComponentCommand
else if (args[2] == "ABSOLUTE" ||
args[2] == "REALPATH")
{
+ // If the path given is relative, evaluate it relative to the
+ // current source directory unless the user passes a different
+ // base directory.
+ std::string baseDir = this->Makefile->GetCurrentSourceDirectory();
+ for(unsigned int i=3; i < args.size(); ++i)
+ {
+ if(args[i] == "BASE_DIR")
+ {
+ ++i;
+ if(i < args.size())
+ {
+ baseDir = args[i];
+ }
+ }
+ }
// Collapse the path to its simplest form.
- // If the path given is relative evaluate it relative to the
- // current source directory.
- result = cmSystemTools::CollapseFullPath(
- filename, this->Makefile->GetCurrentSourceDirectory());
+ result = cmSystemTools::CollapseFullPath(filename, baseDir);
if(args[2] == "REALPATH")
{
// Resolve symlinks if possible
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index cda26cd..503c455 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1340,7 +1340,7 @@ void cmGlobalGenerator::Generate()
// Create a map from local generator to the complete set of targets
// it builds by default.
- this->FillLocalGeneratorToTargetMap();
+ this->InitializeProgressMarks();
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
@@ -1610,7 +1610,6 @@ void cmGlobalGenerator::ClearGeneratorMembers()
this->TargetDependencies.clear();
this->TotalTargets.clear();
this->ImportedTargets.clear();
- this->LocalGeneratorToTargetMap.clear();
this->ProjectMap.clear();
this->RuleHashes.clear();
this->DirectoryContentMap.clear();
@@ -2118,50 +2117,6 @@ void cmGlobalGenerator::FillProjectMap()
}
}
-
-// Build a map that contains a the set of targets used by each local
-// generator directory level.
-void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
-{
- this->LocalGeneratorToTargetMap.clear();
- // Loop over all targets in all local generators.
- for(std::vector<cmLocalGenerator*>::const_iterator
- lgi = this->LocalGenerators.begin();
- lgi != this->LocalGenerators.end(); ++lgi)
- {
- cmLocalGenerator* lg = *lgi;
- cmMakefile* mf = lg->GetMakefile();
- cmTargets const& targets = mf->GetTargets();
- for(cmTargets::const_iterator t = targets.begin(); t != targets.end(); ++t)
- {
- cmTarget const& target = t->second;
-
- cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
-
- // Consider the directory containing the target and all its
- // parents until something excludes the target.
- for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, gt);
- clg = clg->GetParent())
- {
- // This local generator includes the target.
- std::set<cmGeneratorTarget const*>& targetSet =
- this->LocalGeneratorToTargetMap[clg];
- targetSet.insert(gt);
-
- // Add dependencies of the included target. An excluded
- // target may still be included if it is a dependency of a
- // non-excluded target.
- TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(gt);
- for(TargetDependSet::const_iterator ti = tgtdeps.begin();
- ti != tgtdeps.end(); ++ti)
- {
- targetSet.insert(*ti);
- }
- }
- }
- }
-}
-
cmMakefile*
cmGlobalGenerator::FindMakefile(const std::string& start_dir) const
{
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index a13bede..fe710f1 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -398,7 +398,7 @@ protected:
void CheckLocalGenerators();
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const;
- void FillLocalGeneratorToTargetMap();
+ virtual void InitializeProgressMarks() {}
void CreateDefaultGlobalTargets(cmTargets* targets);
cmTarget CreateGlobalTarget(const std::string& name, const char* message,
const cmCustomCommandLines* commandLines,
@@ -413,8 +413,6 @@ protected:
cmMakefile* CurrentMakefile;
// map from project name to vector of local generators in that project
std::map<std::string, std::vector<cmLocalGenerator*> > ProjectMap;
- std::map<cmLocalGenerator*, std::set<cmGeneratorTarget const*> >
- LocalGeneratorToTargetMap;
// Set of named installation components requested by the project.
std::set<std::string> InstallComponents;
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 76d059ee..b240924 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -917,6 +917,49 @@ cmGlobalUnixMakefileGenerator3
}
}
+// Build a map that contains a the set of targets used by each local
+// generator directory level.
+void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks()
+{
+ this->DirectoryTargetsMap.clear();
+ // Loop over all targets in all local generators.
+ for(std::vector<cmLocalGenerator*>::const_iterator
+ lgi = this->LocalGenerators.begin();
+ lgi != this->LocalGenerators.end(); ++lgi)
+ {
+ cmLocalGenerator* lg = *lgi;
+ cmMakefile* mf = lg->GetMakefile();
+ cmTargets const& targets = mf->GetTargets();
+ for(cmTargets::const_iterator t = targets.begin(); t != targets.end(); ++t)
+ {
+ cmTarget const& target = t->second;
+
+ cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
+
+ // Consider the directory containing the target and all its
+ // parents until something excludes the target.
+ for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, gt);
+ clg = clg->GetParent())
+ {
+ // This local generator includes the target.
+ std::set<cmGeneratorTarget const*>& targetSet =
+ this->DirectoryTargetsMap[clg->GetStateSnapshot()];
+ targetSet.insert(gt);
+
+ // Add dependencies of the included target. An excluded
+ // target may still be included if it is a dependency of a
+ // non-excluded target.
+ TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(gt);
+ for(TargetDependSet::const_iterator ti = tgtdeps.begin();
+ ti != tgtdeps.end(); ++ti)
+ {
+ targetSet.insert(*ti);
+ }
+ }
+ }
+ }
+}
+
//----------------------------------------------------------------------------
size_t
cmGlobalUnixMakefileGenerator3
@@ -949,7 +992,7 @@ cmGlobalUnixMakefileGenerator3
size_t count = 0;
std::set<cmGeneratorTarget const*> emitted;
std::set<cmGeneratorTarget const*> const& targets
- = this->LocalGeneratorToTargetMap[lg];
+ = this->DirectoryTargetsMap[lg->GetStateSnapshot()];
for(std::set<cmGeneratorTarget const*>::const_iterator t = targets.begin();
t != targets.end(); ++t)
{
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index fc53fa8..c738c16 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -206,6 +206,11 @@ protected:
private:
virtual const char* GetBuildIgnoreErrorsFlag() const { return "-i"; }
virtual std::string GetEditCacheCommand() const;
+
+ std::map<cmState::Snapshot,
+ std::set<cmGeneratorTarget const*>,
+ cmState::Snapshot::StrictWeakOrder> DirectoryTargetsMap;
+ virtual void InitializeProgressMarks();
};
#endif
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index f548f5d..333c2ff 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -42,7 +42,7 @@ static cmInstallFilesGenerator* CreateInstallFilesGenerator(
{
cmInstallGenerator::MessageLevel message =
cmInstallGenerator::SelectMessageLevel(mf);
- return new cmInstallFilesGenerator(mf,
+ return new cmInstallFilesGenerator(
absFiles, args.GetDestination().c_str(),
programs, args.GetPermissions().c_str(),
args.GetConfigurations(), args.GetComponent().c_str(),
@@ -1406,7 +1406,7 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
ica.GetDestination().c_str(),
ica.GetPermissions().c_str(), ica.GetConfigurations(),
ica.GetComponent().c_str(), message, fname.c_str(),
- name_space.GetCString(), exportOld.IsEnabled(), this->Makefile);
+ name_space.GetCString(), exportOld.IsEnabled());
this->Makefile->AddInstallGenerator(exportGenerator);
return true;
diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx
index 7f6aa4d..97b9405 100644
--- a/Source/cmInstallExportGenerator.cxx
+++ b/Source/cmInstallExportGenerator.cxx
@@ -34,15 +34,14 @@ cmInstallExportGenerator::cmInstallExportGenerator(
const char* component,
MessageLevel message,
const char* filename, const char* name_space,
- bool exportOld,
- cmMakefile* mf)
+ bool exportOld)
:cmInstallGenerator(destination, configurations, component, message)
,ExportSet(exportSet)
,FilePermissions(file_permissions)
,FileName(filename)
,Namespace(name_space)
,ExportOld(exportOld)
- ,Makefile(mf)
+ ,LocalGenerator(0)
{
this->EFGen = new cmExportInstallFileGenerator(this);
exportSet->AddInstallation(this);
@@ -54,12 +53,18 @@ cmInstallExportGenerator::~cmInstallExportGenerator()
delete this->EFGen;
}
+void cmInstallExportGenerator::Compute(cmLocalGenerator* lg)
+{
+ this->LocalGenerator = lg;
+}
+
//----------------------------------------------------------------------------
void cmInstallExportGenerator::ComputeTempDir()
{
// Choose a temporary directory in which to generate the import
// files to be installed.
- this->TempDir = this->Makefile->GetCurrentBinaryDirectory();
+ this->TempDir =
+ this->LocalGenerator->GetMakefile()->GetCurrentBinaryDirectory();
this->TempDir += cmake::GetCMakeFilesDirectory();
this->TempDir += "/Export";
if(this->Destination.empty())
diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h
index 3e078f2..885ed05 100644
--- a/Source/cmInstallExportGenerator.h
+++ b/Source/cmInstallExportGenerator.h
@@ -32,12 +32,14 @@ public:
const char* component,
MessageLevel message,
const char* filename, const char* name_space,
- bool exportOld, cmMakefile* mf);
+ bool exportOld);
~cmInstallExportGenerator();
cmExportSet* GetExportSet() {return this->ExportSet;}
- cmMakefile* GetMakefile() const { return this->Makefile; }
+ void Compute(cmLocalGenerator* lg);
+
+ cmLocalGenerator* GetLocalGenerator() const { return this->LocalGenerator; }
const std::string& GetNamespace() const { return this->Namespace; }
@@ -57,7 +59,7 @@ protected:
std::string FileName;
std::string Namespace;
bool ExportOld;
- cmMakefile* Makefile;
+ cmLocalGenerator* LocalGenerator;
std::string TempDir;
std::string MainImportFile;
diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx
index 508c373..68557bd 100644
--- a/Source/cmInstallFilesCommand.cxx
+++ b/Source/cmInstallFilesCommand.cxx
@@ -128,7 +128,7 @@ void cmInstallFilesCommand::CreateInstallGenerator() const
cmInstallGenerator::MessageLevel message =
cmInstallGenerator::SelectMessageLevel(this->Makefile);
this->Makefile->AddInstallGenerator(
- new cmInstallFilesGenerator(this->Makefile, this->Files,
+ new cmInstallFilesGenerator(this->Files,
destination.c_str(), false,
no_permissions, no_configurations,
no_component.c_str(), message, no_rename));
diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx
index ff2c6e5..c18b174 100644
--- a/Source/cmInstallFilesGenerator.cxx
+++ b/Source/cmInstallFilesGenerator.cxx
@@ -14,11 +14,11 @@
#include "cmGeneratorExpression.h"
#include "cmMakefile.h"
#include "cmSystemTools.h"
+#include "cmLocalGenerator.h"
//----------------------------------------------------------------------------
cmInstallFilesGenerator
-::cmInstallFilesGenerator(cmMakefile* mf,
- std::vector<std::string> const& files,
+::cmInstallFilesGenerator(std::vector<std::string> const& files,
const char* dest, bool programs,
const char* file_permissions,
std::vector<std::string> const& configurations,
@@ -27,7 +27,7 @@ cmInstallFilesGenerator
const char* rename,
bool optional):
cmInstallGenerator(dest, configurations, component, message),
- Makefile(mf),
+ LocalGenerator(0),
Files(files),
FilePermissions(file_permissions),
Rename(rename),
@@ -51,6 +51,11 @@ cmInstallFilesGenerator
{
}
+void cmInstallFilesGenerator::Compute(cmLocalGenerator* lg)
+{
+ this->LocalGenerator = lg;
+}
+
//----------------------------------------------------------------------------
void cmInstallFilesGenerator::AddFilesInstallRule(
std::ostream& os, Indent const& indent,
@@ -94,8 +99,8 @@ void cmInstallFilesGenerator::GenerateScriptForConfig(std::ostream& os,
i != this->Files.end(); ++i)
{
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*i);
- cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, config),
- files);
+ cmSystemTools::ExpandListArgument(cge->Evaluate(
+ this->LocalGenerator->GetMakefile(), config), files);
}
this->AddFilesInstallRule(os, indent, files);
}
diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h
index bf482d6..00b3a79 100644
--- a/Source/cmInstallFilesGenerator.h
+++ b/Source/cmInstallFilesGenerator.h
@@ -14,16 +14,13 @@
#include "cmInstallGenerator.h"
-class cmMakefile;
-
/** \class cmInstallFilesGenerator
* \brief Generate file installation rules.
*/
class cmInstallFilesGenerator: public cmInstallGenerator
{
public:
- cmInstallFilesGenerator(cmMakefile* mf,
- std::vector<std::string> const& files,
+ cmInstallFilesGenerator(std::vector<std::string> const& files,
const char* dest, bool programs,
const char* file_permissions,
std::vector<std::string> const& configurations,
@@ -33,6 +30,8 @@ public:
bool optional = false);
virtual ~cmInstallFilesGenerator();
+ void Compute(cmLocalGenerator* lg);
+
protected:
virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
virtual void GenerateScriptForConfig(std::ostream& os,
@@ -41,7 +40,7 @@ protected:
void AddFilesInstallRule(std::ostream& os, Indent const& indent,
std::vector<std::string> const& files);
- cmMakefile* Makefile;
+ cmLocalGenerator* LocalGenerator;
std::vector<std::string> Files;
std::string FilePermissions;
std::string Rename;
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx
index be8096c..e6fbe88 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -91,7 +91,7 @@ void cmInstallProgramsCommand::FinalPass()
cmInstallGenerator::MessageLevel message =
cmInstallGenerator::SelectMessageLevel(this->Makefile);
this->Makefile->AddInstallGenerator(
- new cmInstallFilesGenerator(this->Makefile, this->Files,
+ new cmInstallFilesGenerator(this->Files,
destination.c_str(), true,
no_permissions, no_configurations,
no_component.c_str(), message, no_rename));
diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h
index 3bcb940..721a246 100644
--- a/Source/cmLinkedTree.h
+++ b/Source/cmLinkedTree.h
@@ -128,6 +128,13 @@ public:
}
return this->Position <= this->Tree->Data.size();
}
+
+ bool StrictWeakOrdered(iterator other) const
+ {
+ assert(this->Tree);
+ assert(this->Tree == other.Tree);
+ return this->Position < other.Position;
+ }
};
iterator Root() const
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a831d88..edb644d 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -196,6 +196,7 @@ void cmLocalGenerator::GenerateTestFiles()
for(std::vector<cmTestGenerator*>::const_iterator gi = testers.begin();
gi != testers.end(); ++gi)
{
+ (*gi)->Compute(this);
(*gi)->Generate(fout, config, configurationTypes);
}
if (!this->Children.empty())
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index ca72939..3588853 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -57,7 +57,7 @@ void cmLocalVisualStudioGenerator::ComputeObjectFilenames(
cmSourceFile const* sf = si->first;
std::string objectNameLower = cmSystemTools::LowerCase(
cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath()));
- objectNameLower += ".obj";
+ objectNameLower += this->GlobalGenerator->GetLanguageOutputExtension(*sf);
counts[objectNameLower] += 1;
}
@@ -70,7 +70,7 @@ void cmLocalVisualStudioGenerator::ComputeObjectFilenames(
cmSourceFile const* sf = si->first;
std::string objectName =
cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath());
- objectName += ".obj";
+ objectName += this->GlobalGenerator->GetLanguageOutputExtension(*sf);
if(counts[cmSystemTools::LowerCase(objectName)] > 1)
{
const_cast<cmGeneratorTarget*>(gt)->AddExplicitObjectName(sf);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 85bc493..7ad37e6 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -31,7 +31,6 @@
#endif
#include "cmInstallGenerator.h"
#include "cmTestGenerator.h"
-#include "cmDefinitions.h"
#include "cmAlgorithms.h"
#include "cmake.h"
#include <stdlib.h> // required for atoi
@@ -47,92 +46,7 @@
class cmMakefile::Internals
{
public:
- std::list<cmDefinitions> VarStack;
bool IsSourceFileTryCompile;
-
- void PushDefinitions()
- {
- this->VarStack.push_back(cmDefinitions());
- }
-
- void InitializeDefinitions(cmMakefile* parent)
- {
- this->VarStack.back() =
- cmDefinitions::MakeClosure(parent->Internal->VarStack.rbegin(),
- parent->Internal->VarStack.rend());
- }
-
- const char* GetDefinition(std::string const& name)
- {
- return cmDefinitions::Get(name, this->VarStack.rbegin(),
- this->VarStack.rend());
- }
-
- bool IsInitialized(std::string const& name)
- {
- return cmDefinitions::HasKey(name, this->VarStack.rbegin(),
- this->VarStack.rend());
- }
-
- void SetDefinition(std::string const& name, std::string const& value)
- {
- this->VarStack.back().Set(name, value.c_str());
- }
-
- void RemoveDefinition(std::string const& name)
- {
- this->VarStack.back().Set(name, 0);
- }
-
- std::vector<std::string> UnusedKeys() const
- {
- return this->VarStack.back().UnusedKeys();
- }
-
- std::vector<std::string> ClosureKeys() const
- {
- return cmDefinitions::ClosureKeys(this->VarStack.rbegin(),
- this->VarStack.rend());
- }
-
- void PopDefinitions()
- {
- this->VarStack.pop_back();
- }
-
- bool RaiseScope(std::string const& var, const char* varDef, cmMakefile* mf)
- {
- std::list<cmDefinitions>::reverse_iterator it = this->VarStack.rbegin();
- assert(it != this->VarStack.rend());
- ++it;
- if(it == this->VarStack.rend())
- {
- cmLocalGenerator* plg = mf->LocalGenerator->GetParent();
- if(!plg)
- {
- return false;
- }
- // Update the definition in the parent directory top scope. This
- // directory's scope was initialized by the closure of the parent
- // scope, so we do not need to localize the definition first.
- cmMakefile* parent = plg->GetMakefile();
- if (varDef)
- {
- parent->AddDefinition(var, varDef);
- }
- else
- {
- parent->RemoveDefinition(var);
- }
- return true;
- }
- // First localize the definition in the current scope.
- cmDefinitions::Raise(var, this->VarStack.rbegin(), this->VarStack.rend());
-
- // Now update the definition in the parent scope.
- it->Set(var, varDef);
- return true;
- }
};
// default is not to be building executables
@@ -141,7 +55,6 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
LocalGenerator(localGenerator),
StateSnapshot(localGenerator->GetStateSnapshot())
{
- this->Internal->PushDefinitions();
this->Internal->IsSourceFileTryCompile = false;
// Initialize these first since AddDefaultDefinitions calls AddDefinition
@@ -1567,9 +1480,6 @@ void cmMakefile::AddLinkLibrary(const std::string& lib)
void cmMakefile::InitializeFromParent(cmMakefile* parent)
{
- // Initialize definitions with the closure of the parent scope.
- this->Internal->InitializeDefinitions(parent);
-
this->StateSnapshot.InitializeFromParent();
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
@@ -1634,8 +1544,6 @@ void cmMakefile::PushFunctionScope(std::string const& fileName,
fileName);
assert(this->StateSnapshot.IsValid());
- this->Internal->PushDefinitions();
-
this->PushLoopBlockBarrier();
#if defined(CMAKE_BUILD_WITH_CMAKE)
@@ -1662,8 +1570,6 @@ void cmMakefile::PopFunctionScope(bool reportError)
this->PopLoopBlockBarrier();
this->CheckForUnusedVariables();
-
- this->Internal->PopDefinitions();
}
void cmMakefile::PushMacroScope(std::string const& fileName,
@@ -1967,7 +1873,7 @@ void cmMakefile::AddDefinition(const std::string& name, const char* value)
{
this->LogUnused("changing definition", name);
}
- this->Internal->SetDefinition(name, value);
+ this->StateSnapshot.SetDefinition(name, value);
#ifdef CMAKE_BUILD_WITH_CMAKE
cmVariableWatch* vv = this->GetVariableWatch();
@@ -2030,7 +1936,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value,
this->GetState()->AddCacheEntry(name, haveVal ? val.c_str() : 0,
doc, type);
// if there was a definition then remove it
- this->Internal->RemoveDefinition(name);
+ this->StateSnapshot.RemoveDefinition(name);
}
@@ -2040,7 +1946,9 @@ void cmMakefile::AddDefinition(const std::string& name, bool value)
{
this->LogUnused("changing definition", name);
}
- this->Internal->SetDefinition(name, value ? "ON" : "OFF");
+
+ this->StateSnapshot.SetDefinition(name, value ? "ON" : "OFF");
+
#ifdef CMAKE_BUILD_WITH_CMAKE
cmVariableWatch* vv = this->GetVariableWatch();
if ( vv )
@@ -2057,7 +1965,7 @@ void cmMakefile::CheckForUnusedVariables() const
{
return;
}
- const std::vector<std::string>& unused = this->Internal->UnusedKeys();
+ const std::vector<std::string>& unused = this->StateSnapshot.UnusedKeys();
std::vector<std::string>::const_iterator it = unused.begin();
for (; it != unused.end(); ++it)
{
@@ -2067,12 +1975,12 @@ void cmMakefile::CheckForUnusedVariables() const
void cmMakefile::MarkVariableAsUsed(const std::string& var)
{
- this->Internal->GetDefinition(var);
+ this->StateSnapshot.GetDefinition(var);
}
bool cmMakefile::VariableInitialized(const std::string& var) const
{
- return this->Internal->IsInitialized(var);
+ return this->StateSnapshot.IsInitialized(var);
}
void cmMakefile::LogUnused(const char* reason,
@@ -2120,7 +2028,7 @@ void cmMakefile::RemoveDefinition(const std::string& name)
{
this->LogUnused("unsetting", name);
}
- this->Internal->RemoveDefinition(name);
+ this->StateSnapshot.RemoveDefinition(name);
#ifdef CMAKE_BUILD_WITH_CMAKE
cmVariableWatch* vv = this->GetVariableWatch();
if ( vv )
@@ -2529,6 +2437,18 @@ bool cmMakefile::PlatformIs64Bit() const
return false;
}
+bool cmMakefile::PlatformIsAppleIos() const
+{
+ std::string sdkRoot;
+ sdkRoot = this->GetSafeDefinition("CMAKE_OSX_SYSROOT");
+ sdkRoot = cmSystemTools::LowerCase(sdkRoot);
+
+ return sdkRoot.find("iphoneos") == 0 ||
+ sdkRoot.find("/iphoneos") != std::string::npos ||
+ sdkRoot.find("iphonesimulator") == 0 ||
+ sdkRoot.find("/iphonesimulator") != std::string::npos;
+}
+
const char* cmMakefile::GetSONameFlag(const std::string& language) const
{
std::string name = "CMAKE_SHARED_LIBRARY_SONAME";
@@ -2586,7 +2506,7 @@ const char* cmMakefile::GetRequiredDefinition(const std::string& name) const
bool cmMakefile::IsDefinitionSet(const std::string& name) const
{
- const char* def = this->Internal->GetDefinition(name);
+ const char* def = this->StateSnapshot.GetDefinition(name);
if(!def)
{
def = this->GetState()->GetInitializedCacheValue(name);
@@ -2607,7 +2527,7 @@ bool cmMakefile::IsDefinitionSet(const std::string& name) const
const char* cmMakefile::GetDefinition(const std::string& name) const
{
- const char* def = this->Internal->GetDefinition(name);
+ const char* def = this->StateSnapshot.GetDefinition(name);
if(!def)
{
def = this->GetState()->GetInitializedCacheValue(name);
@@ -2643,7 +2563,7 @@ const char* cmMakefile::GetSafeDefinition(const std::string& def) const
std::vector<std::string> cmMakefile::GetDefinitions() const
{
- std::vector<std::string> res = this->Internal->ClosureKeys();
+ std::vector<std::string> res = this->StateSnapshot.ClosureKeys();
std::vector<std::string> cacheKeys = this->GetState()->GetCacheEntryKeys();
res.insert(res.end(), cacheKeys.begin(), cacheKeys.end());
std::sort(res.begin(), res.end());
@@ -4422,8 +4342,17 @@ std::string cmMakefile::FormatListFileStack() const
void cmMakefile::PushScope()
{
- this->Internal->PushDefinitions();
-
+ std::string commandName;
+ long line = 0;
+ if (!this->ContextStack.empty())
+ {
+ commandName = this->ContextStack.back()->Name;
+ line = this->ContextStack.back()->Line;
+ }
+ this->StateSnapshot = this->GetState()->CreateVariableScopeSnapshot(
+ this->StateSnapshot,
+ commandName,
+ line);
this->PushLoopBlockBarrier();
#if defined(CMAKE_BUILD_WITH_CMAKE)
@@ -4441,7 +4370,9 @@ void cmMakefile::PopScope()
this->CheckForUnusedVariables();
- this->Internal->PopDefinitions();
+ this->StateSnapshot =
+ this->GetState()->Pop(this->StateSnapshot);
+ assert(this->StateSnapshot.IsValid());
}
void cmMakefile::RaiseScope(const std::string& var, const char *varDef)
@@ -4451,7 +4382,7 @@ void cmMakefile::RaiseScope(const std::string& var, const char *varDef)
return;
}
- if (!this->Internal->RaiseScope(var, varDef, this))
+ if (!this->StateSnapshot.RaiseScope(var, varDef))
{
std::ostringstream m;
m << "Cannot set \"" << var << "\": current scope has no parent.";
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 1c4da00..9f455cc 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -490,6 +490,9 @@ public:
/** Return whether the target platform is 64-bit. */
bool PlatformIs64Bit() const;
+ /** Return whether the target platform is Apple iOS. */
+ bool PlatformIsAppleIos() const;
+
/** Retrieve soname flag for the specified language if supported */
const char* GetSONameFlag(const std::string& language) const;
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index f425861..336ff78 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -15,11 +15,13 @@
#include "cmCacheManager.h"
#include "cmCommand.h"
#include "cmAlgorithms.h"
+#include "cmDefinitions.h"
#include <assert.h>
struct cmState::SnapshotDataType
{
+ cmState::PositionType ScopeParent;
cmState::PositionType DirectoryParent;
cmLinkedTree<cmState::PolicyStackEntry>::iterator Policies;
cmLinkedTree<cmState::PolicyStackEntry>::iterator PolicyRoot;
@@ -28,6 +30,9 @@ struct cmState::SnapshotDataType
cmLinkedTree<std::string>::iterator ExecutionListFile;
cmLinkedTree<cmState::BuildsystemDirectoryStateType>::iterator
BuildSystemDirectory;
+ cmLinkedTree<cmDefinitions>::iterator Vars;
+ cmLinkedTree<cmDefinitions>::iterator Root;
+ cmLinkedTree<cmDefinitions>::iterator Parent;
std::string EntryPointCommand;
long EntryPointLine;
std::vector<std::string>::size_type IncludeDirectoryPosition;
@@ -274,6 +279,10 @@ cmState::Snapshot cmState::Reset()
pos->PolicyScope = this->PolicyStack.Root();
assert(pos->Policies.IsValid());
assert(pos->PolicyRoot.IsValid());
+ this->VarTree.Clear();
+ pos->Vars = this->VarTree.Extend(this->VarTree.Root());
+ pos->Parent = this->VarTree.Root();
+ pos->Root = this->VarTree.Root();
this->DefineProperty
("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY,
@@ -736,7 +745,8 @@ cmState::Snapshot cmState::CreateBaseSnapshot()
{
PositionType pos = this->SnapshotData.Extend(this->SnapshotData.Root());
pos->DirectoryParent = this->SnapshotData.Root();
- pos->SnapshotType = BuildsystemDirectoryType;
+ pos->ScopeParent = this->SnapshotData.Root();
+ pos->SnapshotType = BaseType;
pos->BuildSystemDirectory =
this->BuildsystemDirectory.Extend(this->BuildsystemDirectory.Root());
pos->ExecutionListFile =
@@ -750,6 +760,10 @@ cmState::Snapshot cmState::CreateBaseSnapshot()
pos->PolicyScope = this->PolicyStack.Root();
assert(pos->Policies.IsValid());
assert(pos->PolicyRoot.IsValid());
+ pos->Vars = this->VarTree.Extend(this->VarTree.Root());
+ assert(pos->Vars.IsValid());
+ pos->Parent = this->VarTree.Root();
+ pos->Root = this->VarTree.Root();
return cmState::Snapshot(this, pos);
}
@@ -763,6 +777,7 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand;
pos->DirectoryParent = originSnapshot.Position;
+ pos->ScopeParent = originSnapshot.Position;
pos->SnapshotType = BuildsystemDirectoryType;
pos->BuildSystemDirectory =
this->BuildsystemDirectory.Extend(
@@ -776,6 +791,12 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
pos->PolicyScope = originSnapshot.Position->Policies;
assert(pos->Policies.IsValid());
assert(pos->PolicyRoot.IsValid());
+
+ cmLinkedTree<cmDefinitions>::iterator origin =
+ originSnapshot.Position->Vars;
+ pos->Parent = origin;
+ pos->Root = origin;
+ pos->Vars = this->VarTree.Extend(origin);
return cmState::Snapshot(this, pos);
}
@@ -787,6 +808,7 @@ cmState::CreateFunctionCallSnapshot(cmState::Snapshot originSnapshot,
{
PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
*originSnapshot.Position);
+ pos->ScopeParent = originSnapshot.Position;
pos->EntryPointLine = entryPointLine;
pos->EntryPointCommand = entryPointCommand;
pos->SnapshotType = FunctionCallType;
@@ -794,6 +816,11 @@ cmState::CreateFunctionCallSnapshot(cmState::Snapshot originSnapshot,
originSnapshot.Position->ExecutionListFile, fileName);
pos->BuildSystemDirectory->DirectoryEnd = pos;
pos->PolicyScope = originSnapshot.Position->Policies;
+ assert(originSnapshot.Position->Vars.IsValid());
+ cmLinkedTree<cmDefinitions>::iterator origin =
+ originSnapshot.Position->Vars;
+ pos->Parent = origin;
+ pos->Vars = this->VarTree.Extend(origin);
return cmState::Snapshot(this, pos);
}
@@ -811,6 +838,7 @@ cmState::CreateMacroCallSnapshot(cmState::Snapshot originSnapshot,
pos->SnapshotType = MacroCallType;
pos->ExecutionListFile = this->ExecutionListFiles.Extend(
originSnapshot.Position->ExecutionListFile, fileName);
+ assert(originSnapshot.Position->Vars.IsValid());
pos->BuildSystemDirectory->DirectoryEnd = pos;
pos->PolicyScope = originSnapshot.Position->Policies;
return cmState::Snapshot(this, pos);
@@ -829,12 +857,34 @@ cmState::CreateCallStackSnapshot(cmState::Snapshot originSnapshot,
pos->SnapshotType = CallStackType;
pos->ExecutionListFile = this->ExecutionListFiles.Extend(
originSnapshot.Position->ExecutionListFile, fileName);
+ assert(originSnapshot.Position->Vars.IsValid());
pos->BuildSystemDirectory->DirectoryEnd = pos;
pos->PolicyScope = originSnapshot.Position->Policies;
return cmState::Snapshot(this, pos);
}
cmState::Snapshot
+cmState::CreateVariableScopeSnapshot(cmState::Snapshot originSnapshot,
+ std::string const& entryPointCommand,
+ long entryPointLine)
+{
+ PositionType pos = this->SnapshotData.Extend(originSnapshot.Position,
+ *originSnapshot.Position);
+ pos->ScopeParent = originSnapshot.Position;
+ pos->EntryPointLine = entryPointLine;
+ pos->EntryPointCommand = entryPointCommand;
+ pos->SnapshotType = VariableScopeType;
+ assert(originSnapshot.Position->Vars.IsValid());
+
+ cmLinkedTree<cmDefinitions>::iterator origin =
+ originSnapshot.Position->Vars;
+ pos->Parent = origin;
+ pos->Vars = this->VarTree.Extend(origin);
+ assert(pos->Vars.IsValid());
+ return cmState::Snapshot(this, pos);
+}
+
+cmState::Snapshot
cmState::CreateInlineListFileSnapshot(cmState::Snapshot originSnapshot,
const std::string& entryPointCommand,
long entryPointLine,
@@ -1019,7 +1069,8 @@ cmState::Snapshot cmState::Snapshot::GetCallStackParent() const
{
++parentPos;
}
- if (parentPos->SnapshotType == cmState::BuildsystemDirectoryType)
+ if (parentPos->SnapshotType == cmState::BuildsystemDirectoryType
+ || parentPos->SnapshotType == cmState::BaseType)
{
return snapshot;
}
@@ -1121,6 +1172,72 @@ bool cmState::Snapshot::HasDefinedPolicyCMP0011()
return !this->Position->Policies->IsEmpty();
}
+const char* cmState::Snapshot::GetDefinition(std::string const& name) const
+{
+ assert(this->Position->Vars.IsValid());
+ return cmDefinitions::Get(name, this->Position->Vars,
+ this->Position->Root);
+}
+
+bool cmState::Snapshot::IsInitialized(std::string const& name) const
+{
+ return cmDefinitions::HasKey(name, this->Position->Vars,
+ this->Position->Root);
+}
+
+void cmState::Snapshot::SetDefinition(std::string const& name,
+ std::string const& value)
+{
+ this->Position->Vars->Set(name, value.c_str());
+}
+
+void cmState::Snapshot::RemoveDefinition(std::string const& name)
+{
+ this->Position->Vars->Set(name, 0);
+}
+
+std::vector<std::string> cmState::Snapshot::UnusedKeys() const
+{
+ return this->Position->Vars->UnusedKeys();
+}
+
+std::vector<std::string> cmState::Snapshot::ClosureKeys() const
+{
+ return cmDefinitions::ClosureKeys(this->Position->Vars,
+ this->Position->Root);
+}
+
+bool cmState::Snapshot::RaiseScope(std::string const& var, const char* varDef)
+{
+ if(this->Position->ScopeParent == this->Position->DirectoryParent)
+ {
+ Snapshot parentDir = this->GetBuildsystemDirectoryParent();
+ if(!parentDir.IsValid())
+ {
+ return false;
+ }
+ // Update the definition in the parent directory top scope. This
+ // directory's scope was initialized by the closure of the parent
+ // scope, so we do not need to localize the definition first.
+ if (varDef)
+ {
+ parentDir.SetDefinition(var, varDef);
+ }
+ else
+ {
+ parentDir.RemoveDefinition(var);
+ }
+ return true;
+ }
+ // First localize the definition in the current scope.
+ cmDefinitions::Raise(var, this->Position->Vars,
+ this->Position->Root);
+
+ // Now update the definition in the parent scope.
+ this->Position->Parent->Set(var, varDef);
+ return true;
+}
+
static const std::string cmPropertySentinal = std::string();
template<typename T, typename U, typename V>
@@ -1157,6 +1274,11 @@ void InitializeContentFromParent(T& parentContent,
void cmState::Snapshot::InitializeFromParent()
{
PositionType parent = this->Position->DirectoryParent;
+ assert(this->Position->Vars.IsValid());
+ assert(parent->Vars.IsValid());
+
+ *this->Position->Vars =
+ cmDefinitions::MakeClosure(parent->Vars, parent->Root);
InitializeContentFromParent(parent->BuildSystemDirectory->IncludeDirectories,
this->Position->BuildSystemDirectory->IncludeDirectories,
@@ -1296,22 +1418,21 @@ void cmState::Directory::PrependIncludeDirectoriesEntry(
this->DirectoryState->IncludeDirectories.begin()
+ this->Snapshot_.Position->IncludeDirectoryPosition;
- std::vector<std::string>::const_reverse_iterator rend =
+ std::vector<std::string>::reverse_iterator rend =
this->DirectoryState->IncludeDirectories.rend();
std::vector<std::string>::reverse_iterator rbegin =
cmMakeReverseIterator(entryEnd);
- std::vector<std::string>::const_reverse_iterator crbegin = rbegin;
- crbegin = std::find(crbegin, rend, cmPropertySentinal);
+ rbegin = std::find(rbegin, rend, cmPropertySentinal);
- std::vector<std::string>::const_iterator entryIt = crbegin.base();
- std::vector<std::string>::const_iterator entryBegin =
+ std::vector<std::string>::iterator entryIt = rbegin.base();
+ std::vector<std::string>::iterator entryBegin =
this->DirectoryState->IncludeDirectories.begin();
std::vector<cmListFileBacktrace>::iterator btIt =
this->DirectoryState->IncludeDirectoryBacktraces.begin()
+ std::distance(entryBegin, entryIt);
- this->DirectoryState->IncludeDirectories.insert(rbegin.base(), vec);
+ this->DirectoryState->IncludeDirectories.insert(entryIt, vec);
this->DirectoryState->IncludeDirectoryBacktraces.insert(btIt, lfbt);
this->Snapshot_.Position->IncludeDirectoryPosition =
@@ -1411,3 +1532,9 @@ void cmState::Directory::ClearCompileOptions()
this->DirectoryState->CompileOptionsBacktraces,
this->Snapshot_.Position->CompileOptionsPosition);
}
+
+bool cmState::Snapshot::StrictWeakOrder::operator()(
+ const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) const
+{
+ return lhs.Position.StrictWeakOrdered(rhs.Position);
+}
diff --git a/Source/cmState.h b/Source/cmState.h
index 07aa2a5..86945f6 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -21,6 +21,8 @@
class cmake;
class cmCommand;
+class cmDefinitions;
+class cmListFileBacktrace;
class cmState
{
@@ -35,12 +37,14 @@ public:
enum SnapshotType
{
+ BaseType,
BuildsystemDirectoryType,
FunctionCallType,
MacroCallType,
CallStackType,
InlineListFileType,
- PolicyScopeType
+ PolicyScopeType,
+ VariableScopeType
};
class Directory;
@@ -50,6 +54,14 @@ public:
Snapshot(cmState* state = 0);
Snapshot(cmState* state, PositionType position);
+ const char* GetDefinition(std::string const& name) const;
+ bool IsInitialized(std::string const& name) const;
+ void SetDefinition(std::string const& name, std::string const& value);
+ void RemoveDefinition(std::string const& name);
+ std::vector<std::string> UnusedKeys() const;
+ std::vector<std::string> ClosureKeys() const;
+ bool RaiseScope(std::string const& var, const char* varDef);
+
void SetListFile(std::string const& listfile);
std::string GetExecutionListFile() const;
@@ -74,9 +86,16 @@ public:
Directory GetDirectory() const;
+ struct StrictWeakOrder
+ {
+ bool operator()(const cmState::Snapshot& lhs,
+ const cmState::Snapshot& rhs) const;
+ };
+
private:
friend class cmState;
friend class Directory;
+ friend struct StrictWeakOrder;
cmState* State;
cmState::PositionType Position;
};
@@ -154,6 +173,9 @@ public:
std::string const& entryPointCommand,
long entryPointLine,
std::string const& fileName);
+ Snapshot CreateVariableScopeSnapshot(Snapshot originSnapshot,
+ std::string const& entryPointCommand,
+ long entryPointLine);
Snapshot CreateInlineListFileSnapshot(Snapshot originSnapshot,
const std::string& entryPointCommand,
long entryPointLine,
@@ -268,6 +290,7 @@ private:
cmLinkedTree<PolicyStackEntry> PolicyStack;
cmLinkedTree<SnapshotDataType> SnapshotData;
+ cmLinkedTree<cmDefinitions> VarTree;
std::vector<std::string> SourceDirectoryComponents;
std::vector<std::string> BinaryDirectoryComponents;
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx
index 1815ade..9d85f5a 100644
--- a/Source/cmTestGenerator.cxx
+++ b/Source/cmTestGenerator.cxx
@@ -14,6 +14,7 @@
#include "cmGeneratorExpression.h"
#include "cmOutputConverter.h"
#include "cmMakefile.h"
+#include "cmLocalGenerator.h"
#include "cmSystemTools.h"
#include "cmTarget.h"
#include "cmTest.h"
@@ -27,6 +28,7 @@ cmTestGenerator
{
this->ActionsPerConfig = !test->GetOldStyle();
this->TestGenerated = false;
+ this->LG = 0;
}
//----------------------------------------------------------------------------
@@ -35,6 +37,11 @@ cmTestGenerator
{
}
+void cmTestGenerator::Compute(cmLocalGenerator* lg)
+{
+ this->LG = lg;
+}
+
//----------------------------------------------------------------------------
void cmTestGenerator::GenerateScriptConfigs(std::ostream& os,
Indent const& indent)
@@ -81,8 +88,8 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
// Check whether the command executable is a target whose name is to
// be translated.
std::string exe = command[0];
- cmMakefile* mf = this->Test->GetMakefile();
- cmGeneratorTarget* target = mf->FindGeneratorTargetToUse(exe);
+ cmGeneratorTarget* target =
+ this->LG->GetMakefile()->FindGeneratorTargetToUse(exe);
if(target && target->GetType() == cmTarget::EXECUTABLE)
{
// Use the target file on disk.
@@ -110,7 +117,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
else
{
// Use the command name given.
- exe = ge.Parse(exe.c_str())->Evaluate(mf, config);
+ exe = ge.Parse(exe.c_str())->Evaluate(this->LG->GetMakefile(), config);
cmSystemTools::ConvertToUnixSlashes(exe);
}
@@ -120,7 +127,8 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
ci != command.end(); ++ci)
{
os << " " << cmOutputConverter::EscapeForCMake(
- ge.Parse(*ci)->Evaluate(mf, config));
+ ge.Parse(*ci)->Evaluate(
+ this->LG->GetMakefile(), config));
}
// Finish the test command.
@@ -137,7 +145,8 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
{
os << " " << i->first
<< " " << cmOutputConverter::EscapeForCMake(
- ge.Parse(i->second.GetValue())->Evaluate(mf, config));
+ ge.Parse(i->second.GetValue())->Evaluate(this->LG->GetMakefile(),
+ config));
}
os << ")" << std::endl;
}
diff --git a/Source/cmTestGenerator.h b/Source/cmTestGenerator.h
index 5446553..de8ab78 100644
--- a/Source/cmTestGenerator.h
+++ b/Source/cmTestGenerator.h
@@ -15,6 +15,7 @@
#include "cmScriptGenerator.h"
class cmTest;
+class cmLocalGenerator;
/** \class cmTestGenerator
* \brief Support class for generating install scripts.
@@ -28,6 +29,8 @@ public:
configurations = std::vector<std::string>());
virtual ~cmTestGenerator();
+ void Compute(cmLocalGenerator* lg);
+
protected:
virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent);
virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
@@ -38,6 +41,7 @@ protected:
virtual bool NeedsScriptNoConfig() const;
void GenerateOldStyle(std::ostream& os, Indent const& indent);
+ cmLocalGenerator* LG;
cmTest* Test;
bool TestGenerated;
};
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 62b3f83..1f5c4d4 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -133,7 +133,6 @@ cmake::cmake()
this->ClearBuildSystem = false;
this->FileComparison = new cmFileTimeComparison;
- this->Policies = new cmPolicies();
this->State = new cmState(this);
this->CurrentSnapshot = this->State->CreateBaseSnapshot();
@@ -171,7 +170,6 @@ cmake::cmake()
cmake::~cmake()
{
delete this->CacheManager;
- delete this->Policies;
delete this->State;
if (this->GlobalGenerator)
{
diff --git a/Source/cmake.h b/Source/cmake.h
index 31f55ac..8ac8897 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -27,7 +27,6 @@ class cmVariableWatch;
class cmFileTimeComparison;
class cmExternalMakefileProjectGenerator;
class cmDocumentationSection;
-class cmPolicies;
class cmTarget;
class cmGeneratedFileStream;
@@ -340,7 +339,6 @@ protected:
void AddExtraGenerator(const std::string& name,
CreateExtraGeneratorFunctionType newFunction);
- cmPolicies *Policies;
cmGlobalGenerator *GlobalGenerator;
cmCacheManager *CacheManager;
std::map<std::string, WarningLevel> WarningLevels;
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 7fdfaa8..2b9e844 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -127,6 +127,9 @@ target_link_libraries(testLibCycleA testLibCycleB)
target_link_libraries(testLibCycleB testLibCycleA)
set_property(TARGET testLibCycleA PROPERTY LINK_INTERFACE_MULTIPLICITY 3)
+add_library(testLibNoSONAME SHARED testLibNoSONAME.c)
+set_property(TARGET testLibNoSONAME PROPERTY NO_SONAME 1)
+
# Test exporting dependent libraries into different exports
add_library(testLibRequired testLibRequired.c)
add_library(testLibDepends testLibDepends.c)
@@ -467,6 +470,7 @@ install(
testExe2lib testLib4lib testLib4libdbg testLib4libopt
testLib6 testLib7
testLibCycleA testLibCycleB
+ testLibNoSONAME
cmp0022NEW cmp0022OLD
systemlib
EXPORT exp
@@ -527,6 +531,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3
export(TARGETS testExe2 testLib4 testLib5 testLib6 testLib7 testExe3 testExe4 testExe2lib
testLib4lib testLib4libdbg testLib4libopt
testLibCycleA testLibCycleB
+ testLibNoSONAME
testLibPerConfigDest
NAMESPACE bld_
APPEND FILE ExportBuildTree.cmake
diff --git a/Tests/ExportImport/Export/testLibNoSONAME.c b/Tests/ExportImport/Export/testLibNoSONAME.c
new file mode 100644
index 0000000..2193e1f
--- /dev/null
+++ b/Tests/ExportImport/Export/testLibNoSONAME.c
@@ -0,0 +1,7 @@
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define testLibNoSONAME_EXPORT __declspec(dllexport)
+#else
+# define testLibNoSONAME_EXPORT
+#endif
+
+testLibNoSONAME_EXPORT int testLibNoSONAME(void) { return 0; }
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 0f56495..5ce9628 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -90,6 +90,50 @@ add_custom_target(check_testLib1_genex ALL
-P ${CMAKE_CURRENT_SOURCE_DIR}/check_testLib1_genex.cmake
)
+if(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG AND
+ "${CMAKE_C_CREATE_SHARED_MODULE}" MATCHES "SONAME_FLAG")
+ foreach(ns exp bld)
+ get_property(configs TARGET ${ns}_testLib5 PROPERTY IMPORTED_CONFIGURATIONS)
+ foreach(c ${configs})
+ string(TOUPPER "${c}" CONFIG)
+ get_property(soname TARGET ${ns}_testLib5 PROPERTY IMPORTED_NO_SONAME_${CONFIG})
+ if(soname)
+ message(SEND_ERROR "${ns}_testLib5 has IMPORTED_NO_SONAME_${CONFIG} but should:\n ${soname}")
+ else()
+ message(STATUS "${ns}_testLib5 does not have IMPORTED_NO_SONAME_${CONFIG} as expected")
+ endif()
+ endforeach()
+
+ get_property(configs TARGET ${ns}_testLibNoSONAME PROPERTY IMPORTED_CONFIGURATIONS)
+ foreach(c ${configs})
+ string(TOUPPER "${c}" CONFIG)
+ get_property(soname TARGET ${ns}_testLibNoSONAME PROPERTY IMPORTED_NO_SONAME_${CONFIG})
+ if(soname)
+ message(STATUS "${ns}_testLibNoSONAME has IMPORTED_NO_SONAME_${CONFIG} as expected")
+ else()
+ message(SEND_ERROR "${ns}_testLibNoSONAME does not have IMPORTED_NO_SONAME_${CONFIG} but should")
+ endif()
+ endforeach()
+
+ # Parse the binary to check for SONAME if possible.
+ if("${CMAKE_EXECUTABLE_FORMAT}" MATCHES "ELF")
+ find_program(READELF_EXE readelf)
+ if(READELF_EXE)
+ add_custom_target(check_${ns}_testLib5_soname ALL COMMAND
+ ${CMAKE_COMMAND} -Dreadelf=${READELF_EXE}
+ -Dlib=$<TARGET_FILE:${ns}_testLib5>
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/check_lib_soname.cmake
+ )
+ add_custom_target(check_${ns}_testLibNoSONAME_soname ALL COMMAND
+ ${CMAKE_COMMAND} -Dreadelf=${READELF_EXE}
+ -Dlib=$<TARGET_FILE:${ns}_testLibNoSONAME>
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/check_lib_nosoname.cmake
+ )
+ endif()
+ endif()
+ endforeach()
+endif()
+
add_executable(cmp0022OLD_test cmp0022OLD_test_vs6_1.cpp)
target_link_libraries(cmp0022OLD_test bld_cmp0022OLD)
add_executable(cmp0022NEW_test cmp0022NEW_test_vs6_1.cpp)
diff --git a/Tests/ExportImport/Import/A/check_lib_nosoname.cmake b/Tests/ExportImport/Import/A/check_lib_nosoname.cmake
new file mode 100644
index 0000000..6261ff4
--- /dev/null
+++ b/Tests/ExportImport/Import/A/check_lib_nosoname.cmake
@@ -0,0 +1,7 @@
+execute_process(COMMAND ${readelf} -d ${lib} OUTPUT_FILE ${lib}.readelf.txt)
+file(STRINGS ${lib}.readelf.txt soname REGEX "\\(SONAME\\)")
+if(soname)
+ message(FATAL_ERROR "${lib} has soname but should not:\n ${soname}")
+else()
+ message(STATUS "${lib} has no soname as expected:\n ${soname}")
+endif()
diff --git a/Tests/ExportImport/Import/A/check_lib_soname.cmake b/Tests/ExportImport/Import/A/check_lib_soname.cmake
new file mode 100644
index 0000000..7794e80
--- /dev/null
+++ b/Tests/ExportImport/Import/A/check_lib_soname.cmake
@@ -0,0 +1,7 @@
+execute_process(COMMAND ${readelf} -d ${lib} OUTPUT_FILE ${lib}.readelf.txt)
+file(STRINGS ${lib}.readelf.txt soname REGEX "\\(SONAME\\)")
+if(soname)
+ message(STATUS "${lib} has soname as expected:\n ${soname}")
+else()
+ message(FATAL_ERROR "${lib} has no soname but should:\n ${soname}")
+endif()
diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt
index ecdece8..2b7bac1 100644
--- a/Tests/Plugin/CMakeLists.txt
+++ b/Tests/Plugin/CMakeLists.txt
@@ -52,13 +52,8 @@ target_link_libraries(example_mod_1 example_exe)
if(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG AND
"${CMAKE_C_CREATE_SHARED_MODULE}" MATCHES "SONAME_FLAG")
- # Add a second plugin that should not have any soname.
- add_library(example_mod_2 MODULE src/example_mod_1.c)
- target_link_libraries(example_mod_2 example_exe)
- set_property(TARGET example_mod_2 PROPERTY NO_SONAME 1)
-
# Verify that targets export with proper IMPORTED SONAME properties.
- export(TARGETS example_mod_1 example_mod_2 NAMESPACE exp_
+ export(TARGETS example_mod_1 NAMESPACE exp_
FILE ${CMAKE_CURRENT_BINARY_DIR}/mods.cmake)
include(ExternalProject)
@@ -68,7 +63,7 @@ if(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG AND
DOWNLOAD_COMMAND ""
INSTALL_COMMAND ""
)
- add_dependencies(PluginTest example_mod_1 example_mod_2)
+ add_dependencies(PluginTest example_mod_1)
endif()
# TODO:
diff --git a/Tests/Plugin/PluginTest/CMakeLists.txt b/Tests/Plugin/PluginTest/CMakeLists.txt
index 79ef8a9..5626dbc 100644
--- a/Tests/Plugin/PluginTest/CMakeLists.txt
+++ b/Tests/Plugin/PluginTest/CMakeLists.txt
@@ -6,17 +6,11 @@ include(${CMAKE_CURRENT_BINARY_DIR}/../mods.cmake)
get_property(configs TARGET exp_example_mod_1 PROPERTY IMPORTED_CONFIGURATIONS)
foreach(c ${configs})
string(TOUPPER "${c}" CONFIG)
- get_property(soname1 TARGET exp_example_mod_1 PROPERTY IMPORTED_SONAME_${CONFIG})
- get_property(soname2 TARGET exp_example_mod_2 PROPERTY IMPORTED_NO_SONAME_${CONFIG})
- if(soname1)
- message(STATUS "exp_example_mod_1 has IMPORTED_SONAME_${CONFIG} as expected: ${soname1}")
+ get_property(soname TARGET exp_example_mod_1 PROPERTY IMPORTED_NO_SONAME_${CONFIG})
+ if(soname)
+ message(STATUS "exp_example_mod_1 has IMPORTED_NO_SONAME_${CONFIG} as expected: ${soname}")
else()
- message(SEND_ERROR "exp_example_mod_1 does not have IMPORTED_SONAME_${CONFIG} but should")
- endif()
- if(soname2)
- message(STATUS "exp_example_mod_2 has IMPORTED_NO_SONAME_${CONFIG} as expected: ${soname2}")
- else()
- message(SEND_ERROR "exp_example_mod_2 does not have IMPORTED_NO_SONAME_${CONFIG} but should")
+ message(SEND_ERROR "exp_example_mod_1 does not have IMPORTED_NO_SONAME_${CONFIG} but should")
endif()
endforeach()
@@ -26,8 +20,7 @@ if("${CMAKE_EXECUTABLE_FORMAT}" MATCHES "ELF")
if(READELF_EXE)
add_custom_target(check_mod_soname ALL COMMAND
${CMAKE_COMMAND} -Dreadelf=${READELF_EXE}
- -Dmod1=$<TARGET_FILE:exp_example_mod_1>
- -Dmod2=$<TARGET_FILE:exp_example_mod_2>
+ -Dmod=$<TARGET_FILE:exp_example_mod_1>
-P ${CMAKE_CURRENT_SOURCE_DIR}/../check_mod_soname.cmake
)
endif()
diff --git a/Tests/Plugin/check_mod_soname.cmake b/Tests/Plugin/check_mod_soname.cmake
index 3737b45..21a33b1 100644
--- a/Tests/Plugin/check_mod_soname.cmake
+++ b/Tests/Plugin/check_mod_soname.cmake
@@ -1,14 +1,7 @@
-execute_process(COMMAND ${readelf} -d ${mod1} OUTPUT_FILE ${mod1}.readelf.txt)
-execute_process(COMMAND ${readelf} -d ${mod2} OUTPUT_FILE ${mod2}.readelf.txt)
-file(STRINGS ${mod1}.readelf.txt soname1 REGEX "\\(SONAME\\)")
-file(STRINGS ${mod2}.readelf.txt soname2 REGEX "\\(SONAME\\)")
-if(soname1)
- message(STATUS "${mod1} has soname as expected: ${soname1}")
+execute_process(COMMAND ${readelf} -d ${mod} OUTPUT_FILE ${mod}.readelf.txt)
+file(STRINGS ${mod}.readelf.txt soname REGEX "\\(SONAME\\)")
+if(soname)
+ message(FATAL_ERROR "${mod} has soname but should not:\n ${soname}")
else()
- message(FATAL_ERROR "${mod1} has no soname but should:\n ${soname1}")
-endif()
-if(soname2)
- message(FATAL_ERROR "${mod2} has soname but should not:\n ${soname2}")
-else()
- message(STATUS "${mod2} has no soname as expected")
+ message(STATUS "${mod} has no soname as expected")
endif()
diff --git a/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-result.txt b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-stderr.txt b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-stderr.txt
new file mode 100644
index 0000000..bf592e7
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at OUTPUT_NAME-recursion.cmake:[0-9]+ \(add_executable\):
+ Target 'empty1' OUTPUT_NAME depends on itself.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion.cmake b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion.cmake
new file mode 100644
index 0000000..5cb8050
--- /dev/null
+++ b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion.cmake
@@ -0,0 +1,3 @@
+enable_language(C)
+add_executable(empty1 empty.c)
+set_property(TARGET empty1 PROPERTY OUTPUT_NAME $<TARGET_FILE_NAME:empty1>)
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 21fc851..0679024 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -26,6 +26,7 @@ run_cmake(COMPILE_LANGUAGE-add_library)
run_cmake(COMPILE_LANGUAGE-add_test)
run_cmake(COMPILE_LANGUAGE-unknown-lang)
run_cmake(TARGET_FILE-recursion)
+run_cmake(OUTPUT_NAME-recursion)
run_cmake(ImportedTarget-TARGET_PDB_FILE)
if(LINKER_SUPPORTS_PDB)
diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake
index 7633be1..e780103 100644
--- a/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake
+++ b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake
@@ -1,3 +1,4 @@
enable_language(C)
add_executable(empty1 empty.c)
+set_property(TARGET empty1 PROPERTY OUTPUT_NAME $<TARGET_FILE_NAME:empty1>)
set_property(TARGET empty1 PROPERTY RUNTIME_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:empty1>)
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index b7de614..ef81739 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -7,3 +7,35 @@ run_cmake(XcodeObjectNeedsQuote)
if (NOT XCODE_VERSION VERSION_LESS 6)
run_cmake(XcodePlatformFrameworks)
endif()
+
+# Use a single build tree for a few tests without cleaning.
+
+if(NOT XCODE_VERSION VERSION_LESS 5)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesOSX-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS "-DTEST_IOS=OFF")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeBundles)
+ run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesIOS-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS "-DTEST_IOS=ON")
+
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+ run_cmake(XcodeBundles)
+ run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+endif()
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
new file mode 100644
index 0000000..d5cb51f
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
@@ -0,0 +1,46 @@
+# check if Xcode and CMake have the same understanding of Bundle layout
+
+cmake_minimum_required(VERSION 3.3)
+enable_language(C)
+
+if(TEST_IOS)
+ set(CMAKE_OSX_SYSROOT iphoneos)
+ set(CMAKE_OSX_ARCHITECTURES "armv7")
+ set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
+ set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
+ set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
+endif(TEST_IOS)
+
+# App Bundle
+
+add_executable(AppBundle MACOSX_BUNDLE main.m)
+
+add_custom_target(AppBundleTest ALL
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "$<TARGET_FILE:AppBundle>" "$<TARGET_FILE:AppBundle>.old")
+
+add_dependencies(AppBundleTest AppBundle)
+
+# Framework (not supported for iOS on Xcode < 6)
+
+if(NOT TEST_IOS OR NOT XCODE_VERSION VERSION_LESS 6)
+ add_library(Framework SHARED main.c)
+ set_target_properties(Framework PROPERTIES FRAMEWORK TRUE)
+
+ add_custom_target(FrameworkTest ALL
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "$<TARGET_FILE:Framework>" "$<TARGET_FILE:Framework>.old")
+
+ add_dependencies(FrameworkTest Framework)
+endif()
+
+# Bundle
+
+add_library(Bundle MODULE main.c)
+set_target_properties(Bundle PROPERTIES BUNDLE TRUE)
+
+add_custom_target(BundleTest ALL
+ COMMAND ${CMAKE_COMMAND} -E copy
+ "$<TARGET_FILE:Bundle>" "$<TARGET_FILE:Bundle>.old")
+
+add_dependencies(BundleTest Bundle)
diff --git a/Tests/RunCMake/XcodeProject/main.m b/Tests/RunCMake/XcodeProject/main.m
new file mode 100644
index 0000000..6dc190a
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/main.m
@@ -0,0 +1,3 @@
+int main(int argc, const char * argv[]) {
+ return 1;
+}
diff --git a/Tests/RunCMake/get_filename_component/KnownComponents.cmake b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
index 386109f..d822258 100644
--- a/Tests/RunCMake/get_filename_component/KnownComponents.cmake
+++ b/Tests/RunCMake/get_filename_component/KnownComponents.cmake
@@ -38,6 +38,39 @@ check("ABSOLUTE .. in windows root" "${test_absolute}" "c:/path/to/filename.ext.
list(APPEND non_cache_vars test_absolute)
+# Test finding absolute paths from various base directories.
+
+get_filename_component(test_abs_base "testdir1" ABSOLUTE)
+check("ABSOLUTE .. from default base" "${test_abs_base}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/testdir1")
+
+get_filename_component(test_abs_base "../testdir2" ABSOLUTE
+ BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dummydir")
+check("ABSOLUTE .. from dummy base to parent" "${test_abs_base}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/testdir2")
+
+get_filename_component(test_abs_base "testdir3" ABSOLUTE
+ BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dummydir")
+check("ABSOLUTE .. from dummy base to child" "${test_abs_base}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dummydir/testdir3")
+
+list(APPEND non_cache_vars test_abs_base)
+
+# Test finding absolute paths with CACHE parameter. (Note that more
+# rigorous testing of the CACHE parameter comes later with PROGRAM).
+
+get_filename_component(test_abs_base_1 "testdir4" ABSOLUTE CACHE)
+check("ABSOLUTE CACHE 1" "${test_abs_base_1}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/testdir4")
+list(APPEND cache_vars test_abs_base_1)
+
+get_filename_component(test_abs_base_2 "testdir5" ABSOLUTE
+ BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dummydir"
+ CACHE)
+check("ABSOLUTE CACHE 2" "${test_abs_base_2}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/dummydir/testdir5")
+list(APPEND cache_vars test_abs_base_2)
+
# Test the PROGRAM component type.
get_filename_component(test_program_name "/ arg1 arg2" PROGRAM)
check("PROGRAM with no args output" "${test_program_name}" "/")
diff --git a/Tests/RunCMake/include_directories/DirectoryBefore-stdout.txt b/Tests/RunCMake/include_directories/DirectoryBefore-stdout.txt
new file mode 100644
index 0000000..e986082
--- /dev/null
+++ b/Tests/RunCMake/include_directories/DirectoryBefore-stdout.txt
@@ -0,0 +1 @@
+-- INCLUDE_DIRECTORIES: '[^;]*/Tests/RunCMake/include_directories/BeforeDir;[^;]*/Tests/RunCMake/include_directories/AfterDir'
diff --git a/Tests/RunCMake/include_directories/DirectoryBefore.cmake b/Tests/RunCMake/include_directories/DirectoryBefore.cmake
new file mode 100644
index 0000000..be3f663
--- /dev/null
+++ b/Tests/RunCMake/include_directories/DirectoryBefore.cmake
@@ -0,0 +1,4 @@
+include_directories(AfterDir)
+include_directories(BEFORE BeforeDir)
+get_property(dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
+message(STATUS "INCLUDE_DIRECTORIES: '${dirs}'")
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
index 54d5e97..57e8274 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -5,6 +5,7 @@ set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/NotDefa
run_cmake(NotFoundContent)
run_cmake(DebugIncludes)
+run_cmake(DirectoryBefore)
run_cmake(TID-bad-target)
run_cmake(ImportedTarget)
run_cmake(CMP0021)