summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6e33b71..75ff712 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -16,6 +16,7 @@
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmComputeLinkInformation.h"
+#include "cmDocumentCompileDefinitions.h"
#include "cmListFileCache.h"
#include "cmGeneratorExpression.h"
#include <cmsys/RegularExpression.hxx>
@@ -146,14 +147,7 @@ void cmTarget::DefineProperties(cmake *cm)
"are not supported by the native build tool. "
"The VS6 IDE does not support definition values with spaces "
"(but NMake does).\n"
- "Dislaimer: 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.");
+ CM_DOCUMENT_COMPILE_DEFINITIONS_DISCLAIMER);
cm->DefineProperty
("COMPILE_DEFINITIONS_<CONFIG>", cmProperty::TARGET,
@@ -517,6 +511,15 @@ void cmTarget::DefineProperties(cmake *cm)
"value is the default. "
"See documentation of CMAKE_<LANG>_LINKER_PREFERENCE variables.");
+#define CM_LOCATION_UNDEFINED_BEHAVIOR \
+ "\n" \
+ "Do not set properties that affect the location of the target after " \
+ "reading this property. These include properties whose names match " \
+ "\"(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_<CONFIG>)?\" " \
+ "or \"(IMPLIB_)?(PREFIX|SUFFIX)\". " \
+ "Failure to follow this rule is not diagnosed and leaves the location " \
+ "of the target undefined."
+
cm->DefineProperty
("LOCATION", cmProperty::TARGET,
"Read-only location of a target on disk.",
@@ -533,7 +536,10 @@ void cmTarget::DefineProperties(cmake *cm)
"In CMake 2.6 and above add_custom_command automatically recognizes a "
"target name in its COMMAND and DEPENDS options and computes the "
"target location. "
- "Therefore this property is not needed for creating custom commands.");
+ "In CMake 2.8.4 and above add_custom_command recognizes generator "
+ "expressions to refer to target locations anywhere in the command. "
+ "Therefore this property is not needed for creating custom commands."
+ CM_LOCATION_UNDEFINED_BEHAVIOR);
cm->DefineProperty
("LOCATION_<CONFIG>", cmProperty::TARGET,
@@ -546,7 +552,8 @@ void cmTarget::DefineProperties(cmake *cm)
"By default CMake looks for an exact-match but otherwise uses an "
"arbitrary available configuration. "
"Use the MAP_IMPORTED_CONFIG_<CONFIG> property to map imported "
- "configurations explicitly.");
+ "configurations explicitly."
+ CM_LOCATION_UNDEFINED_BEHAVIOR);
cm->DefineProperty
("LINK_DEPENDS", cmProperty::TARGET,