diff options
author | Brad King <brad.king@kitware.com> | 2008-03-07 21:36:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-03-07 21:36:57 (GMT) |
commit | 46bf0347a3e86e78063f2d5df2d8f65a3ea2ac25 (patch) | |
tree | b62cc6130db6975cbc1434c00686903dd4d56096 /Source/cmPolicies.cxx | |
parent | 354abb72d9de0fbcf7e02bc0aeb32f919b19ccac (diff) | |
download | CMake-46bf0347a3e86e78063f2d5df2d8f65a3ea2ac25.zip CMake-46bf0347a3e86e78063f2d5df2d8f65a3ea2ac25.tar.gz CMake-46bf0347a3e86e78063f2d5df2d8f65a3ea2ac25.tar.bz2 |
ENH: Finish creating, documenting, and enforcing policy CMP_0002.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index bc123b1..2760e1b 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -116,8 +116,23 @@ cmPolicies::cmPolicies() this->DefinePolicy( CMP_0002, "CMP_0002", - "CMake requires that target names be globaly unique.", - "....", + "Logical target names must be globally unique.", + "Targets names created with " + "add_executable, add_library, or add_custom_target " + "are logical build target names. " + "Logical target names must be globally unique because:\n" + " - Unique names may be referenced unambiguously both in CMake\n" + " code and on make tool command lines.\n" + " - Logical names are used by Xcode and VS IDE generators\n" + " to produce meaningful project names for the targets.\n" + "The logical name of executable and library targets does not " + "have to correspond to the physical file names built. " + "Consider using the OUTPUT_NAME target property to create two " + "targets with the same physical name while keeping logical " + "names distinct. " + "Custom targets must simply have globally unique names (unless one " + "uses the global property ALLOW_DUPLICATE_CUSTOM_TARGETS with a " + "Makefiles generator).", 2,6,0, cmPolicies::WARN ); } |