summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-14 21:42:29 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-14 21:42:29 (GMT)
commit1c0595c73fe1fa88b67691794eef8ee10edfc257 (patch)
treefd453a6e799d7d5f4ee6e1f01096a40cb8aadb1d /Source/cmake.cxx
parent67f8c0fd104fe6ec1b6c1df2ebce6fdb9b2c811f (diff)
downloadCMake-1c0595c73fe1fa88b67691794eef8ee10edfc257.zip
CMake-1c0595c73fe1fa88b67691794eef8ee10edfc257.tar.gz
CMake-1c0595c73fe1fa88b67691794eef8ee10edfc257.tar.bz2
ENH: Add global property ALLOW_DUPLICATE_CUSTOM_TARGETS to help existing projects that depend on having duplicate custom targets. It is allowed only for Makefile generators. See bug#6348.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index cf89a4c..84f4217 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3322,6 +3322,25 @@ void cmake::DefineProperties(cmake *cm)
"at the beginning of native build system generation. "
"This property causes it to display details of its analysis to stderr.");
+ cm->DefineProperty(
+ "ALLOW_DUPLICATE_CUSTOM_TARGETS", cmProperty::GLOBAL,
+ "Allow duplicate custom targets to be created.",
+ "Normally CMake requires that all targets built in a project have "
+ "globally unique names. "
+ "This is necessary to generate meaningful project file names in "
+ "Xcode and VS IDE generators. "
+ "It also allows the target names to be referenced unambiguously.\n"
+ "Makefile generators are capable of supporting duplicate custom target "
+ "names. "
+ "For projects that care only about Makefile generators and do "
+ "not wish to support Xcode or VS IDE generators, one may set this "
+ "property to true to allow duplicate custom targets. "
+ "The property allows multiple add_custom_target command calls in "
+ "*different directories* to specify the same target name. "
+ "However, setting this property will cause non-Makefile generators "
+ "to produce an error and refuse to generate the project."
+ );
+
cm->DefineProperty
("IN_TRY_COMPILE", cmProperty::GLOBAL,
"Read-only property that is true during a try-compile configuration.",