diff options
author | Brad King <brad.king@kitware.com> | 2011-12-01 20:41:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-12-01 20:58:47 (GMT) |
commit | 363d3962c476a6018c0be9fde18f347816034b97 (patch) | |
tree | 809de12ad3874414353b18a396db8120976962b4 /Source/cmTarget.cxx | |
parent | 9401da808446b1746c75e81b9b6056b96a122fe9 (diff) | |
download | CMake-363d3962c476a6018c0be9fde18f347816034b97.zip CMake-363d3962c476a6018c0be9fde18f347816034b97.tar.gz CMake-363d3962c476a6018c0be9fde18f347816034b97.tar.bz2 |
Factor out target location undefined behavior helper macro
Move CM_LOCATION_UNDEFINED_BEHAVIOR into a dedicated header. Add a
parameter to describe the action that leads to the undefined target
location.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index d021990..7e02a39 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -17,6 +17,7 @@ #include "cmGlobalGenerator.h" #include "cmComputeLinkInformation.h" #include "cmDocumentCompileDefinitions.h" +#include "cmDocumentLocationUndefined.h" #include "cmListFileCache.h" #include "cmGeneratorExpression.h" #include <cmsys/RegularExpression.hxx> @@ -584,15 +585,6 @@ 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.", @@ -612,7 +604,7 @@ void cmTarget::DefineProperties(cmake *cm) "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_LOCATION_UNDEFINED_BEHAVIOR("reading this property")); cm->DefineProperty ("LOCATION_<CONFIG>", cmProperty::TARGET, @@ -626,7 +618,7 @@ void cmTarget::DefineProperties(cmake *cm) "arbitrary available configuration. " "Use the MAP_IMPORTED_CONFIG_<CONFIG> property to map imported " "configurations explicitly." - CM_LOCATION_UNDEFINED_BEHAVIOR); + CM_LOCATION_UNDEFINED_BEHAVIOR("reading this property")); cm->DefineProperty ("LINK_DEPENDS", cmProperty::TARGET, |