Commit 399e9c46 authored by Brad King's avatar Brad King
Browse files

Drop builtin property documentation

Drop all DefineProperty calls for non-chained properties.  Drop the
documentation from the chained ones.  The documentation for all
properties is now in Help/prop_*/*.rst files.
parent 6035c045
......@@ -160,10 +160,8 @@ set(SRCS
cmDocumentation.cxx
cmDocumentationFormatter.cxx
cmDocumentationSection.cxx
cmDocumentCompileDefinitions.h
cmDocumentGeneratorExpressions.h
cmDocumentLocationUndefined.h
cmDocumentVariables.cxx
cmDynamicLoader.cxx
cmDynamicLoader.h
${ELF_SRCS}
......@@ -494,7 +492,6 @@ set(CPACK_SRCS
CPack/cmCPackTarBZip2Generator.cxx
CPack/cmCPackTarCompressGenerator.cxx
CPack/cmCPackZIPGenerator.cxx
CPack/cmCPackDocumentVariables.cxx
)
if(CYGWIN)
......
#include "cmCPackDocumentVariables.h"
#include "cmake.h"
void cmCPackDocumentVariables::DefineVariables(cmake* cm)
{
// Subsection: variables defined/used by cpack,
// which are common to all CPack generators
cm->DefineProperty
("CPACK_PACKAGING_INSTALL_PREFIX", cmProperty::VARIABLE,
"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.\n"
"e.g. "
" set(CPACK_PACKAGING_INSTALL_PREFIX \"/opt\")\n"
"This is not the same purpose as CMAKE_INSTALL_PREFIX which"
" is used when installing from the build tree without building"
" a package."
"", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
"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).\n"
"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.\n"
"There is a similar 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.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY", cmProperty::VARIABLE,
"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.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_SET_DESTDIR", cmProperty::VARIABLE,
"Boolean toggle to make CPack use DESTDIR mechanism when"
" packaging.", "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:\n"
" make DESTDIR=/home/john install\n"
"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 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 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.\n"
"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.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_INSTALL_SCRIPT", cmProperty::VARIABLE,
"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.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_ABSOLUTE_DESTINATION_FILES", cmProperty::VARIABLE,
"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 "
"scripts. The value can be used within CPack project configuration"
" file and/or CPack<GEN>.cmake file of <GEN> generator.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
"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.", false,
"Variables common to all CPack generators");
cm->DefineProperty
("CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION", cmProperty::VARIABLE,
"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 internally. "
"This variable triggers the definition of"
"CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs"
"Variables common to all CPack generators");
}
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef cmCPackDocumentVariables_h
#define cmCPackDocumentVariables_h
class cmake;
class cmCPackDocumentVariables
{
public:
static void DefineVariables(cmake* cm);
};
#endif
......@@ -14,7 +14,6 @@
// Need these for documentation support.
#include "cmake.h"
#include "cmDocumentation.h"
#include "cmCPackDocumentVariables.h"
#include "cmCPackGeneratorFactory.h"
#include "cmCPackGenerator.h"
#include "cmake.h"
......
......@@ -935,65 +935,3 @@ bool cmCacheManager::NeedCacheCompatibility(int major, int minor)
return (actual_compat &&
actual_compat <= CMake_VERSION_ENCODE(major, minor, 0));
}
//----------------------------------------------------------------------------
void cmCacheManager::DefineProperties(cmake *cm)
{
cm->DefineProperty
("ADVANCED", cmProperty::CACHE,
"True if entry should be hidden by default in GUIs.",
"This is a boolean value indicating whether the entry is considered "
"interesting only for advanced configuration. "
"The mark_as_advanced() command modifies this property."
);
cm->DefineProperty
("HELPSTRING", cmProperty::CACHE,
"Help associated with entry in GUIs.",
"This string summarizes the purpose of an entry to help users set it "
"through a CMake GUI."
);
cm->DefineProperty
("TYPE", cmProperty::CACHE,
"Widget type for entry in GUIs.",
"Cache entry values are always strings, but CMake GUIs present widgets "
"to help users set values. "
"The GUIs use this property as a hint to determine the widget type. "
"Valid TYPE values are:\n"
" BOOL = Boolean ON/OFF value.\n"
" PATH = Path to a directory.\n"
" FILEPATH = Path to a file.\n"
" STRING = Generic string value.\n"
" INTERNAL = Do not present in GUI at all.\n"
" STATIC = Value managed by CMake, do not change.\n"
" UNINITIALIZED = Type not yet specified.\n"
"Generally the TYPE of a cache entry should be set by the command "
"which creates it (set, option, find_library, etc.)."
);
cm->DefineProperty
("MODIFIED", cmProperty::CACHE,
"Internal management property. Do not set or get.",
"This is an internal cache entry property managed by CMake to "
"track interactive user modification of entries. Ignore it."
);
cm->DefineProperty
("STRINGS", cmProperty::CACHE,
"Enumerate possible STRING entry values for GUI selection.",
"For cache entries with type STRING, this enumerates a set of values. "
"CMake GUIs may use this to provide a selection widget instead of a "
"generic string entry field. "
"This is for convenience only. "
"CMake does not enforce that the value matches one of those listed."
);
cm->DefineProperty
("VALUE", cmProperty::CACHE,
"Value of a cache entry.",
"This property maps to the actual value of a cache entry. "
"Setting this property always sets the value without checking, so "
"use with care."
);
}
......@@ -149,9 +149,6 @@ public:
unsigned int GetCacheMinorVersion() { return this->CacheMinorVersion; }
bool NeedCacheCompatibility(int major, int minor);
/** Define and document CACHE entry properties. */
static void DefineProperties(cmake *cm);
protected:
///! Add an entry into the cache
void AddCacheEntry(const char* key, const char* value,
......
......@@ -12,7 +12,6 @@
#include "cmDefinePropertyCommand.h"
#include "cmake.h"
// cmDefinePropertiesCommand
bool cmDefinePropertyCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
......
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef cmDocumentCompileDefinitions_h
#define cmDocumentCompileDefinitions_h
#define CM_DOCUMENT_COMPILE_DEFINITIONS_DISCLAIMER \
"Disclaimer: Most native build tools have poor support for escaping " \
"certain values. CMake has work-arounds for many cases but some " \
"values may just not be possible to pass correctly. If a value " \
"does not seem to be escaped correctly, do not attempt to " \
"work-around the problem by adding escape sequences to the value. " \
"Your work-around may break in a future version of CMake that " \
"has improved escape support. Instead consider defining the macro " \
"in a (configured) header file. Then report the limitation. " \
"Known limitations include:\n" \
" # - broken almost everywhere\n" \
" ; - broken in VS IDE 7.0 and Borland Makefiles\n" \
" , - broken in VS IDE\n" \
" % - broken in some cases in NMake\n" \
" & | - broken in some cases on MinGW\n" \
" ^ < > \\\" - broken in most Make tools on Windows\n" \
"CMake does not reject these values outright because they do work " \
"in some cases. Use with caution. "
#endif
This diff is collapsed.
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef cmDocumentVariables_h
#define cmDocumentVariables_h
class cmake;
class cmDocumentVariables
{
public:
static void DefineVariables(cmake* cm);
};
#endif
......@@ -21,9 +21,7 @@
#include "cmCacheManager.h"
#include "cmFunctionBlocker.h"
#include "cmListFileCache.h"
#include "cmDocumentGeneratorExpressions.h"
#include "cmCommandArgumentParserHelper.h"
#include "cmDocumentCompileDefinitions.h"
#include "cmGeneratorExpression.h"
#include "cmTest.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
......@@ -4023,244 +4021,15 @@ void cmMakefile::RaiseScope(const char *var, const char *varDef)
// define properties
void cmMakefile::DefineProperties(cmake *cm)
{
cm->DefineProperty
("ADDITIONAL_MAKE_CLEAN_FILES", cmProperty::DIRECTORY,
"Additional files to clean during the make clean stage.",
"A list of files that will be cleaned as a part of the "
"\"make clean\" stage. ");
cm->DefineProperty
("CLEAN_NO_CUSTOM", cmProperty::DIRECTORY,
"Should the output of custom commands be left.",
"If this is true then the outputs of custom commands for this "
"directory will not be removed during the \"make clean\" stage. ");
cm->DefineProperty
("LISTFILE_STACK", cmProperty::DIRECTORY,
"The current stack of listfiles being processed.",
"This property is mainly useful when trying to debug errors "
"in your CMake scripts. It returns a list of what list files "
"are currently being processed, in order. So if one listfile "
"does an INCLUDE command then that is effectively pushing "
"the included listfile onto the stack.", false);
cm->DefineProperty
("TEST_INCLUDE_FILE", cmProperty::DIRECTORY,
"A cmake file that will be included when ctest is run.",
"If you specify TEST_INCLUDE_FILE, that file will be "
"included and processed when ctest is run on the directory.");
cm->DefineProperty
("COMPILE_DEFINITIONS", cmProperty::DIRECTORY,
"Preprocessor definitions for compiling a directory's sources.",
"The COMPILE_DEFINITIONS property may be set to a "
"semicolon-separated list of preprocessor "
"definitions using the syntax VAR or VAR=value. Function-style "
"definitions are not supported. CMake will automatically escape "
"the value correctly for the native build system (note that CMake "
"language syntax may require escapes to specify some values). "
"This property may be set on a per-configuration basis using the name "
"COMPILE_DEFINITIONS_<CONFIG> where <CONFIG> is an upper-case name "
"(ex. \"COMPILE_DEFINITIONS_DEBUG\"). "
"This property will be initialized in each directory by its value "
"in the directory's parent.\n"
"CMake will automatically drop some definitions that "
"are not supported by the native build tool. "
"The VS6 IDE does not support definition values with spaces "
"(but NMake does).\n"
CM_DOCUMENT_COMPILE_DEFINITIONS_DISCLAIMER);
cm->DefineProperty
("COMPILE_DEFINITIONS_<CONFIG>", cmProperty::DIRECTORY,
"Per-configuration preprocessor definitions in a directory.",
"This is the configuration-specific version of COMPILE_DEFINITIONS. "
"This property will be initialized in each directory by its value "
"in the directory's parent.\n");
cm->DefineProperty
("IMPLICIT_DEPENDS_INCLUDE_TRANSFORM", cmProperty::DIRECTORY,
"Specify #include line transforms for dependencies in a directory.",
"This property specifies rules to transform macro-like #include lines "
"during implicit dependency scanning of C and C++ source files. "
"The list of rules must be semicolon-separated with each entry of "
"the form \"A_MACRO(%)=value-with-%\" (the % must be literal). "
"During dependency scanning occurrences of A_MACRO(...) on #include "
"lines will be replaced by the value given with the macro argument "
"substituted for '%'. For example, the entry\n"
" MYDIR(%)=<mydir/%>\n"
"will convert lines of the form\n"
" #include MYDIR(myheader.h)\n"
"to\n"
" #include <mydir/myheader.h>\n"
"allowing the dependency to be followed.\n"
"This property applies to sources in all targets within a directory. "
"The property value is initialized in each directory by its value "
"in the directory's parent.");
cm->DefineProperty
("EXCLUDE_FROM_ALL", cmProperty::DIRECTORY,
"Exclude the directory from the all target of its parent.",
"A property on a directory that indicates if its targets are excluded "
"from the default build target. If it is not, then with a Makefile "
"for example typing make will cause the targets to be built. "
"The same concept applies to the default build of other generators.",
false);
cm->DefineProperty
("PARENT_DIRECTORY", cmProperty::DIRECTORY,
"Source directory that added current subdirectory.",
"This read-only property specifies the source directory that "
"added the current source directory as a subdirectory of the build. "
"In the top-level directory the value is the empty-string.", false);
cm->DefineProperty
("INCLUDE_REGULAR_EXPRESSION", cmProperty::DIRECTORY,
"Include file scanning regular expression.",
"This read-only property specifies the regular expression used "
"during dependency scanning to match include files that should "
"be followed. See the include_regular_expression command.", false);
cm->DefineProperty
("INTERPROCEDURAL_OPTIMIZATION", cmProperty::DIRECTORY,
"Enable interprocedural optimization for targets in a directory.",
"If set to true, enables interprocedural optimizations "
"if they are known to be supported by the compiler.");
cm->DefineProperty
("INTERPROCEDURAL_OPTIMIZATION_<CONFIG>", cmProperty::DIRECTORY,
"Per-configuration interprocedural optimization for a directory.",
"This is a per-configuration version of INTERPROCEDURAL_OPTIMIZATION. "
"If set, this property overrides the generic property "
"for the named configuration.");
cm->DefineProperty
("VARIABLES", cmProperty::DIRECTORY,
"List of variables defined in the current directory.",
"This read-only property specifies the list of CMake variables "
"currently defined. "
"It is intended for debugging purposes.", false);
cm->DefineProperty
("CACHE_VARIABLES", cmProperty::DIRECTORY,
"List of cache variables available in the current directory.",
"This read-only property specifies the list of CMake cache "
"variables currently defined. "
"It is intended for debugging purposes.", false);
cm->DefineProperty
("MACROS", cmProperty::DIRECTORY,
"List of macro commands available in the current directory.",
"This read-only property specifies the list of CMake macros "
"currently defined. "
"It is intended for debugging purposes. "
"See the macro command.", false);
cm->DefineProperty
("DEFINITIONS", cmProperty::DIRECTORY,
"For CMake 2.4 compatibility only. Use COMPILE_DEFINITIONS instead.",
"This read-only property specifies the list of flags given so far "
"to the add_definitions command. "
"It is intended for debugging purposes. "
"Use the COMPILE_DEFINITIONS instead.", false);
cm->DefineProperty
("INCLUDE_DIRECTORIES", cmProperty::DIRECTORY,
"List of preprocessor include file search directories.",
"This property specifies the list of directories given "
"so far to the include_directories command. "
"This property exists on directories and targets. "
"In addition to accepting values from the include_directories "
"command, values may be set directly on any directory or any "
"target using the set_property command. "
"A target gets its initial value for this property from the value "
"of the directory property. "
"A directory gets its initial value from its parent directory if "
"it has one. "
"Both directory and target property values are adjusted by calls "
"to the include_directories command."
"\n"
"The target property values are used by the generators to set "
"the include paths for the compiler. "
"See also the include_directories command.");
cm->DefineProperty
("COMPILE_OPTIONS", cmProperty::DIRECTORY,
"List of options to pass to the compiler.",
"This property specifies the list of directories given "
"so far for this property. "
"This property exists on directories and targets."
"\n"
"The target property values are used by the generators to set "
"the options for the compiler.\n"
"Contents of COMPILE_OPTIONS may use \"generator expressions\" with "
"the syntax \"$<...>\". "
CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS);
cm->DefineProperty
("LINK_DIRECTORIES", cmProperty::DIRECTORY,
"List of linker search directories.",
"This read-only property specifies the list of directories given "
"so far to the link_directories command. "
"It is intended for debugging purposes.", false);
cm->DefineProperty
("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY,
"Specify a launcher for compile rules.",
"See the global property of the same name for details. "
"This overrides the global property for a directory.",
true);
"", "", true);
cm->DefineProperty
("RULE_LAUNCH_LINK", cmProperty::DIRECTORY,
"Specify a launcher for link rules.",
"See the global property of the same name for details. "
"This overrides the global property for a directory.",
true);
"", "", true);
cm->DefineProperty
("RULE_LAUNCH_CUSTOM", cmProperty::DIRECTORY,
"Specify a launcher for custom rules.",
"See the global property of the same name for details. "
"This overrides the global property for a directory.",
true);
cm->DefineProperty
("VS_GLOBAL_SECTION_PRE_<section>", cmProperty::DIRECTORY,
"Specify a preSolution global section in Visual Studio.",
"Setting a property like this generates an entry of the following form "
"in the solution file:\n"
" GlobalSection(<section>) = preSolution\n"
" <contents based on property value>\n"
" EndGlobalSection\n"
"The property must be set to a semicolon-separated list of key=value "
"pairs. Each such pair will be transformed into an entry in the solution "
"global section. Whitespace around key and value is ignored. List "
"elements which do not contain an equal sign are skipped."
"\n"
"This property only works for Visual Studio 7 and above; it is ignored "
"on other generators. The property only applies when set on a directory "
"whose CMakeLists.txt contains a project() command.");
cm->DefineProperty
("VS_GLOBAL_SECTION_POST_<section>", cmProperty::DIRECTORY,
"Specify a postSolution global section in Visual Studio.",
"Setting a property like this generates an entry of the following form "
"in the solution file:\n"
" GlobalSection(<section>) = postSolution\n"
" <contents based on property value>\n"
" EndGlobalSection\n"
"The property must be set to a semicolon-separated list of key=value "
"pairs. Each such pair will be transformed into an entry in the solution "
"global section. Whitespace around key and value is ignored. List "
"elements which do not contain an equal sign are skipped."
"\n"
"This property only works for Visual Studio 7 and above; it is ignored "
"on other generators. The property only applies when set on a directory "
"whose CMakeLists.txt contains a project() command."
"\n"
"Note that CMake generates postSolution sections ExtensibilityGlobals "
"and ExtensibilityAddIns by default. If you set the corresponding "
"property, it will override the default section. For example, setting "
"VS_GLOBAL_SECTION_POST_ExtensibilityGlobals will override the default "
"contents of the ExtensibilityGlobals section, while keeping "
"ExtensibilityAddIns on its default.");
"", "", true);
}
//----------------------------------------------------------------------------
......
......@@ -16,7 +16,6 @@
#include "cmMakefile.h"
#include "cmSystemTools.h"
#include "cmake.h"
#include "cmDocumentCompileDefinitions.h"
//----------------------------------------------------------------------------
cmSourceFile::cmSourceFile(cmMakefile* mf, const char* name):
......@@ -382,176 +381,3 @@ void cmSourceFile::SetCustomCommand(cmCustomCommand* cc)
this->CustomCommand = cc;
delete old;
}
//----------------------------------------------------------------------------
void cmSourceFile::DefineProperties(cmake *cm)
{
// define properties
cm->DefineProperty
("ABSTRACT", cmProperty::SOURCE_FILE,
"Is this source file an abstract class.",
"A property on a source file that indicates if the source file "
"represents a class that is abstract. This only makes sense for "
"languages that have a notion of an abstract class and it is "
"only used by some tools that wrap classes into other languages.");
cm->DefineProperty
("COMPILE_FLAGS", cmProperty::SOURCE_FILE,
"Additional flags to be added when compiling this source file.",
"These flags will be added to the list of compile flags when "
"this source file builds. Use COMPILE_DEFINITIONS to pass additional "
"preprocessor definitions.");
cm->DefineProperty
("COMPILE_DEFINITIONS", cmProperty::SOURCE_FILE,
"Preprocessor definitions for compiling a source file.",
"The COMPILE_DEFINITIONS property may be set to a "
"semicolon-separated list of preprocessor "
"definitions using the syntax VAR or VAR=value. Function-style "
"definitions are not supported. CMake will automatically escape "
"the value correctly for the native build system (note that CMake "
"language syntax may require escapes to specify some values). "
"This property m