cmTarget.cxx 211 KB
Newer Older
1 2 3
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4

5 6
  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.
7

8 9 10 11
  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.
============================================================================*/
12
#include "cmTarget.h"
13
#include "cmake.h"
14
#include "cmMakefile.h"
Ken Martin's avatar
Ken Martin committed
15
#include "cmSourceFile.h"
16
#include "cmLocalGenerator.h"
17
#include "cmGlobalGenerator.h"
18
#include "cmComputeLinkInformation.h"
19
#include "cmDocumentCompileDefinitions.h"
20
#include "cmDocumentGeneratorExpressions.h"
21
#include "cmDocumentLocationUndefined.h"
22
#include "cmListFileCache.h"
23
#include "cmGeneratorExpression.h"
24
#include "cmGeneratorExpressionDAGChecker.h"
25
#include <cmsys/RegularExpression.hxx>
26 27
#include <map>
#include <set>
Ken Martin's avatar
Ken Martin committed
28
#include <queue>
29
#include <stdlib.h> // required for atof
30
#include <assert.h>
Nicolas Despres's avatar
Nicolas Despres committed
31 32 33 34 35 36 37 38 39 40 41

const char* cmTarget::GetTargetTypeName(TargetType targetType)
{
  switch( targetType )
    {
      case cmTarget::STATIC_LIBRARY:
        return "STATIC_LIBRARY";
      case cmTarget::MODULE_LIBRARY:
        return "MODULE_LIBRARY";
      case cmTarget::SHARED_LIBRARY:
        return "SHARED_LIBRARY";
Brad King's avatar
Brad King committed
42 43
      case cmTarget::OBJECT_LIBRARY:
        return "OBJECT_LIBRARY";
Nicolas Despres's avatar
Nicolas Despres committed
44 45 46 47 48 49 50 51 52 53 54 55
      case cmTarget::EXECUTABLE:
        return "EXECUTABLE";
      case cmTarget::UTILITY:
        return "UTILITY";
      case cmTarget::GLOBAL_TARGET:
        return "GLOBAL_TARGET";
      case cmTarget::UNKNOWN_LIBRARY:
        return "UNKNOWN_LIBRARY";
    }
  assert(0 && "Unexpected target type");
  return 0;
}
56

57 58 59 60 61
//----------------------------------------------------------------------------
struct cmTarget::OutputInfo
{
  std::string OutDir;
  std::string ImpDir;
62
  std::string PdbDir;
63 64 65 66 67 68 69 70 71 72 73 74
};

//----------------------------------------------------------------------------
struct cmTarget::ImportInfo
{
  bool NoSOName;
  std::string Location;
  std::string SOName;
  std::string ImportLibrary;
  cmTarget::LinkInterface LinkInterface;
};

75 76 77 78 79
struct TargetConfigPair : public std::pair<cmTarget*, std::string> {
  TargetConfigPair(cmTarget* tgt, const std::string &config)
    : std::pair<cmTarget*, std::string>(tgt, config) {}
};

80 81 82 83 84 85 86 87
//----------------------------------------------------------------------------
class cmTargetInternals
{
public:
  cmTargetInternals()
    {
    this->SourceFileFlagsConstructed = false;
    }
88 89
  cmTargetInternals(cmTargetInternals const& r)
    {
90
    this->SourceFileFlagsConstructed = false;
91 92 93 94
    // Only some of these entries are part of the object state.
    // Others not copied here are result caches.
    this->SourceEntries = r.SourceEntries;
    }
95
  ~cmTargetInternals();
96 97 98
  typedef cmTarget::SourceFileFlags SourceFileFlags;
  std::map<cmSourceFile const*, SourceFileFlags> SourceFlagsMap;
  bool SourceFileFlagsConstructed;
99 100 101

  // The backtrace when the target was created.
  cmListFileBacktrace Backtrace;
102 103 104 105 106 107 108

  // Cache link interface computation from each configuration.
  struct OptionalLinkInterface: public cmTarget::LinkInterface
  {
    OptionalLinkInterface(): Exists(false) {}
    bool Exists;
  };
109 110
  typedef std::map<TargetConfigPair, OptionalLinkInterface>
                                                          LinkInterfaceMapType;
111
  LinkInterfaceMapType LinkInterfaceMap;
112 113 114 115

  typedef std::map<cmStdString, cmTarget::OutputInfo> OutputInfoMapType;
  OutputInfoMapType OutputInfoMap;

116 117
  typedef std::map<TargetConfigPair, cmTarget::ImportInfo>
                                                            ImportInfoMapType;
118
  ImportInfoMapType ImportInfoMap;
119 120

  // Cache link implementation computation from each configuration.
121 122
  typedef std::map<TargetConfigPair,
                   cmTarget::LinkImplementation> LinkImplMapType;
123
  LinkImplMapType LinkImplMap;
124

125 126
  typedef std::map<TargetConfigPair, cmTarget::LinkClosure>
                                                          LinkClosureMapType;
127
  LinkClosureMapType LinkClosureMap;
128 129 130 131

  struct SourceEntry { std::vector<cmSourceFile*> Depends; };
  typedef std::map<cmSourceFile*, SourceEntry> SourceEntriesType;
  SourceEntriesType SourceEntries;
132 133

  struct IncludeDirectoriesEntry {
134 135 136
    IncludeDirectoriesEntry(cmsys::auto_ptr<cmCompiledGeneratorExpression> cge,
      const std::string &targetName = std::string())
      : ge(cge), TargetName(targetName)
137 138
    {}
    const cmsys::auto_ptr<cmCompiledGeneratorExpression> ge;
139
    std::vector<std::string> CachedIncludes;
140
    const std::string TargetName;
141 142
  };
  std::vector<IncludeDirectoriesEntry*> IncludeDirectoriesEntries;
143
  std::vector<cmValueWithOrigin> LinkInterfaceIncludeDirectoriesEntries;
144 145 146 147 148 149 150

  std::vector<IncludeDirectoriesEntry*>
                                CachedLinkInterfaceIncludeDirectoriesEntries;
  std::map<std::string, std::string> CachedLinkInterfaceCompileDefinitions;

  std::map<std::string, bool> CacheLinkInterfaceIncludeDirectoriesDone;
  std::map<std::string, bool> CacheLinkInterfaceCompileDefinitionsDone;
151 152
};

153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
//----------------------------------------------------------------------------
void deleteAndClear(
      std::vector<cmTargetInternals::IncludeDirectoriesEntry*> &entries)
{
  for (std::vector<cmTargetInternals::IncludeDirectoriesEntry*>::const_iterator
      it = entries.begin(),
      end = entries.end();
      it != end; ++it)
    {
      delete *it;
    }
  entries.clear();
}

//----------------------------------------------------------------------------
cmTargetInternals::~cmTargetInternals()
{
  deleteAndClear(CachedLinkInterfaceIncludeDirectoriesEntries);
}

173 174 175
//----------------------------------------------------------------------------
cmTarget::cmTarget()
{
Ken Martin's avatar
Ken Martin committed
176
  this->Makefile = 0;
177
  this->PolicyStatusCMP0003 = cmPolicies::WARN;
178
  this->PolicyStatusCMP0004 = cmPolicies::WARN;
179
  this->PolicyStatusCMP0008 = cmPolicies::WARN;
180
  this->PolicyStatusCMP0020 = cmPolicies::WARN;
Ken Martin's avatar
Ken Martin committed
181 182
  this->LinkLibrariesAnalyzed = false;
  this->HaveInstallRule = false;
183
  this->DLLPlatform = false;
184
  this->IsApple = false;
Alexander Neundorf's avatar
 
Alexander Neundorf committed
185
  this->IsImportedTarget = false;
186
  this->BuildInterfaceIncludesAppended = false;
187
  this->DebugIncludesDone = false;
188 189
}

190
//----------------------------------------------------------------------------
191 192
void cmTarget::DefineProperties(cmake *cm)
{
193 194 195 196 197
  cm->DefineProperty
    ("AUTOMOC", cmProperty::TARGET,
     "Should the target be processed with automoc (for Qt projects).",
     "AUTOMOC is a boolean specifying whether CMake will handle "
     "the Qt moc preprocessor automatically, i.e. without having to use "
198 199
     "the QT4_WRAP_CPP() or QT5_WRAP_CPP() macro. Currently Qt4 and Qt5 are "
     "supported.  "
200 201 202 203 204 205 206 207 208 209 210 211 212 213
     "When this property is set to TRUE, CMake will scan the source files "
     "at build time and invoke moc accordingly. "
     "If an #include statement like #include \"moc_foo.cpp\" is found, "
     "the Q_OBJECT class declaration is expected in the header, and moc is "
     "run on the header file. "
     "If an #include statement like #include \"foo.moc\" is found, "
     "then a Q_OBJECT is expected in the current source file and moc "
     "is run on the file itself. "
     "Additionally, all header files are parsed for Q_OBJECT macros, "
     "and if found, moc is also executed on those files. The resulting "
     "moc files, which are not included as shown above in any of the source "
     "files are included in a generated <targetname>_automoc.cpp file, "
     "which is compiled as part of the target."
     "This property is initialized by the value of the variable "
214 215
     "CMAKE_AUTOMOC if it is set when a target is created.\n"
     "Additional command line options for moc can be set via the "
216
     "AUTOMOC_MOC_OPTIONS property.\n"
217
     "By setting the CMAKE_AUTOMOC_RELAXED_MODE variable to TRUE the rules "
218 219
     "for searching the files which will be processed by moc can be relaxed. "
     "See the documentation for this variable for more details.");
220 221 222 223 224 225 226 227 228 229

  cm->DefineProperty
    ("AUTOMOC_MOC_OPTIONS", cmProperty::TARGET,
    "Additional options for moc when using automoc (see the AUTOMOC property)",
     "This property is only used if the AUTOMOC property is set to TRUE for "
     "this target. In this case, it holds additional command line options "
     "which will be used when moc is executed during the build, i.e. it is "
     "equivalent to the optional OPTIONS argument of the qt4_wrap_cpp() "
     "macro.\n"
     "By default it is empty.");
230

231
  cm->DefineProperty
232
    ("BUILD_WITH_INSTALL_RPATH", cmProperty::TARGET,
233 234 235 236
     "Should build tree targets have install tree rpaths.",
     "BUILD_WITH_INSTALL_RPATH is a boolean specifying whether to link "
     "the target in the build tree with the INSTALL_RPATH.  This takes "
     "precedence over SKIP_BUILD_RPATH and avoids the need for relinking "
237 238 239
     "before installation.  "
     "This property is initialized by the value of the variable "
     "CMAKE_BUILD_WITH_INSTALL_RPATH if it is set when a target is created.");
240 241

  cm->DefineProperty
242
    ("COMPILE_FLAGS", cmProperty::TARGET,
243
     "Additional flags to use when compiling this target's sources.",
244
     "The COMPILE_FLAGS property sets additional compiler flags used "
245 246 247 248 249
     "to build sources within the target.  Use COMPILE_DEFINITIONS "
     "to pass additional preprocessor definitions.");

  cm->DefineProperty
    ("COMPILE_DEFINITIONS", cmProperty::TARGET,
250
     "Preprocessor definitions for compiling a target's sources.",
251 252
     "The COMPILE_DEFINITIONS property may be set to a "
     "semicolon-separated list of preprocessor "
253 254 255 256 257
     "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 "
258 259
     "COMPILE_DEFINITIONS_<CONFIG> where <CONFIG> is an upper-case name "
     "(ex. \"COMPILE_DEFINITIONS_DEBUG\").\n"
260 261
     "CMake will automatically drop some definitions that "
     "are not supported by the native build tool.  "
262
     "The VS6 IDE does not support definition values with spaces "
263
     "(but NMake does).\n"
264 265 266
     "Contents of COMPILE_DEFINITIONS may use \"generator expressions\" with "
     "the syntax \"$<...>\".  "
     CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS
267
     CM_DOCUMENT_COMPILE_DEFINITIONS_DISCLAIMER);
268

269
  cm->DefineProperty
270
    ("COMPILE_DEFINITIONS_<CONFIG>", cmProperty::TARGET,
271 272 273
     "Per-configuration preprocessor definitions on a target.",
     "This is the configuration-specific version of COMPILE_DEFINITIONS.");

274
  cm->DefineProperty
275
    ("DEFINE_SYMBOL", cmProperty::TARGET,
276 277 278 279 280 281 282 283
     "Define a symbol when compiling this target's sources.",
     "DEFINE_SYMBOL sets the name of the preprocessor symbol defined when "
     "compiling sources in a shared library. "
     "If not set here then it is set to target_EXPORTS by default "
     "(with some substitutions if the target is not a valid C "
     "identifier). This is useful for headers to know whether they are "
     "being included from inside their library our outside to properly "
     "setup dllexport/dllimport decorations. ");
284

285
  cm->DefineProperty
286
    ("DEBUG_POSTFIX", cmProperty::TARGET,
287 288 289 290 291 292 293 294 295 296 297 298 299
     "See target property <CONFIG>_POSTFIX.",
     "This property is a special case of the more-general <CONFIG>_POSTFIX "
     "property for the DEBUG configuration.");

  cm->DefineProperty
    ("<CONFIG>_POSTFIX", cmProperty::TARGET,
     "Postfix to append to the target file name for configuration <CONFIG>.",
     "When building with configuration <CONFIG> the value of this property "
     "is appended to the target file name built on disk.  "
     "For non-executable targets, this property is initialized by the value "
     "of the variable CMAKE_<CONFIG>_POSTFIX if it is set when a target is "
     "created.  "
     "This property is ignored on the Mac for Frameworks and App Bundles.");
300 301

  cm->DefineProperty
302
    ("EchoString", cmProperty::TARGET,
Alexander Neundorf's avatar
 
Alexander Neundorf committed
303
     "A message to be displayed when the target is built.",
Alexander Neundorf's avatar
 
Alexander Neundorf committed
304
     "A message to display on some generators (such as makefiles) when "
305 306
     "the target is built.");

307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
  cm->DefineProperty
    ("BUNDLE", cmProperty::TARGET,
     "This target is a CFBundle on the Mac.",
     "If a module library target has this property set to true it will "
     "be built as a CFBundle when built on the mac. It will have the "
     "directory structure required for a CFBundle and will be suitable "
     "to be used for creating Browser Plugins or other application "
     "resources.");

  cm->DefineProperty
    ("BUNDLE_EXTENSION", cmProperty::TARGET,
     "The file extension used to name a BUNDLE target on the Mac.",
     "The default value is \"bundle\" - you can also use \"plugin\" or "
     "whatever file extension is required by the host app for your "
     "bundle.");

323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
  cm->DefineProperty
    ("EXCLUDE_FROM_DEFAULT_BUILD", cmProperty::TARGET,
     "Exclude target from \"Build Solution\".",
     "This property is only used by Visual Studio generators 7 and above. "
     "When set to TRUE, the target will not be built when you press "
     "\"Build Solution\".");

  cm->DefineProperty
    ("EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>", cmProperty::TARGET,
     "Per-configuration version of target exclusion from \"Build Solution\". ",
     "This is the configuration-specific version of "
     "EXCLUDE_FROM_DEFAULT_BUILD. If the generic EXCLUDE_FROM_DEFAULT_BUILD "
     "is also set on a target, EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG> takes "
     "precedence in configurations for which it has a value.");

338 339 340
  cm->DefineProperty
    ("FRAMEWORK", cmProperty::TARGET,
     "This target is a framework on the Mac.",
341
     "If a shared library target has this property set to true it will "
342 343 344 345
     "be built as a framework when built on the mac. It will have the "
     "directory structure required for a framework and will be suitable "
     "to be used with the -framework option");

346
  cm->DefineProperty
347
    ("HAS_CXX", cmProperty::TARGET,
348
     "Link the target using the C++ linker tool (obsolete).",
349 350
     "This is equivalent to setting the LINKER_LANGUAGE property to CXX.  "
     "See that property's documentation for details.");
351

352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
  cm->DefineProperty
    ("IMPLICIT_DEPENDS_INCLUDE_TRANSFORM", cmProperty::TARGET,
     "Specify #include line transforms for dependencies in a target.",
     "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 the target on which it is set.");

370
  cm->DefineProperty
371
    ("IMPORT_PREFIX", cmProperty::TARGET,
372 373 374 375 376 377 378
     "What comes before the import library name.",
     "Similar to the target property PREFIX, but used for import libraries "
     "(typically corresponding to a DLL) instead of regular libraries. "
     "A target property that can be set to override the prefix "
     "(such as \"lib\") on an import library name.");

  cm->DefineProperty
379
    ("IMPORT_SUFFIX", cmProperty::TARGET,
380 381 382 383 384 385
     "What comes after the import library name.",
     "Similar to the target property SUFFIX, but used for import libraries "
     "(typically corresponding to a DLL) instead of regular libraries. "
     "A target property that can be set to override the suffix "
     "(such as \".lib\") on an import library name.");

386 387 388 389 390 391 392 393 394 395
  cm->DefineProperty
    ("IMPORTED", cmProperty::TARGET,
     "Read-only indication of whether a target is IMPORTED.",
     "The boolean value of this property is true for targets created with "
     "the IMPORTED option to add_executable or add_library.  "
     "It is false for targets built within the project.");

  cm->DefineProperty
    ("IMPORTED_CONFIGURATIONS", cmProperty::TARGET,
     "Configurations provided for an IMPORTED target.",
396 397
     "Set this to the list of configuration names available for an "
     "IMPORTED target.  "
398 399 400 401 402 403 404 405 406 407
     "The names correspond to configurations defined in the project from "
     "which the target is imported.  "
     "If the importing project uses a different set of configurations "
     "the names may be mapped using the MAP_IMPORTED_CONFIG_<CONFIG> "
     "property.  "
     "Ignored for non-imported targets.");

  cm->DefineProperty
    ("IMPORTED_IMPLIB", cmProperty::TARGET,
     "Full path to the import library for an IMPORTED target.",
408
     "Set this to the location of the \".lib\" part of a windows DLL.  "
409 410 411 412
     "Ignored for non-imported targets.");

  cm->DefineProperty
    ("IMPORTED_IMPLIB_<CONFIG>", cmProperty::TARGET,
413
     "<CONFIG>-specific version of IMPORTED_IMPLIB property.",
414 415 416 417
     "Configuration names correspond to those provided by the project "
     "from which the target is imported.");

  cm->DefineProperty
418 419 420 421 422
    ("IMPORTED_LINK_DEPENDENT_LIBRARIES", cmProperty::TARGET,
     "Dependent shared libraries of an imported shared library.",
     "Shared libraries may be linked to other shared libraries as part "
     "of their implementation.  On some platforms the linker searches "
     "for the dependent libraries of shared libraries they are including "
423 424 425 426
     "in the link.  "
     "Set this property to the list of dependent shared libraries of an "
     "imported library.  "
     "The list "
427 428 429
     "should be disjoint from the list of interface libraries in the "
     "IMPORTED_LINK_INTERFACE_LIBRARIES property.  On platforms requiring "
     "dependent shared libraries to be found at link time CMake uses this "
430 431
     "list to add appropriate files or paths to the link command line.  "
     "Ignored for non-imported targets.");
432 433 434

  cm->DefineProperty
    ("IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG>", cmProperty::TARGET,
435
     "<CONFIG>-specific version of IMPORTED_LINK_DEPENDENT_LIBRARIES.",
436
     "Configuration names correspond to those provided by the project "
437 438 439
     "from which the target is imported.  "
     "If set, this property completely overrides the generic property "
     "for the named configuration.");
440 441 442 443

  cm->DefineProperty
    ("IMPORTED_LINK_INTERFACE_LIBRARIES", cmProperty::TARGET,
     "Transitive link interface of an IMPORTED target.",
444 445
     "Set this to the list of libraries whose interface is included when "
     "an IMPORTED library target is linked to another target.  "
446
     "The libraries will be included on the link line for the target.  "
447 448 449
     "Unlike the LINK_INTERFACE_LIBRARIES property, this property applies "
     "to all imported target types, including STATIC libraries.  "
     "This property is ignored for non-imported targets.");
450 451

  cm->DefineProperty
452
    ("IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG>", cmProperty::TARGET,
453
     "<CONFIG>-specific version of IMPORTED_LINK_INTERFACE_LIBRARIES.",
454
     "Configuration names correspond to those provided by the project "
455 456 457
     "from which the target is imported.  "
     "If set, this property completely overrides the generic property "
     "for the named configuration.");
458

459 460 461
  cm->DefineProperty
    ("IMPORTED_LINK_INTERFACE_LANGUAGES", cmProperty::TARGET,
     "Languages compiled into an IMPORTED static library.",
462 463
     "Set this to the list of languages of source files compiled to "
     "produce a STATIC IMPORTED library (such as \"C\" or \"CXX\").  "
464 465 466 467 468 469 470 471 472 473 474
     "CMake accounts for these languages when computing how to link a "
     "target to the imported library.  "
     "For example, when a C executable links to an imported C++ static "
     "library CMake chooses the C++ linker to satisfy language runtime "
     "dependencies of the static library.  "
     "\n"
     "This property is ignored for targets that are not STATIC libraries.  "
     "This property is ignored for non-imported targets.");

  cm->DefineProperty
    ("IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>", cmProperty::TARGET,
475
     "<CONFIG>-specific version of IMPORTED_LINK_INTERFACE_LANGUAGES.",
476 477 478 479 480
     "Configuration names correspond to those provided by the project "
     "from which the target is imported.  "
     "If set, this property completely overrides the generic property "
     "for the named configuration.");

481 482 483 484 485 486
  cm->DefineProperty
    ("IMPORTED_LINK_INTERFACE_MULTIPLICITY", cmProperty::TARGET,
     "Repetition count for cycles of IMPORTED static libraries.",
     "This is LINK_INTERFACE_MULTIPLICITY for IMPORTED targets.");
  cm->DefineProperty
    ("IMPORTED_LINK_INTERFACE_MULTIPLICITY_<CONFIG>", cmProperty::TARGET,
487
     "<CONFIG>-specific version of IMPORTED_LINK_INTERFACE_MULTIPLICITY.",
488 489 490
     "If set, this property completely overrides the generic property "
     "for the named configuration.");

491 492 493
  cm->DefineProperty
    ("IMPORTED_LOCATION", cmProperty::TARGET,
     "Full path to the main file on disk for an IMPORTED target.",
494
     "Set this to the location of an IMPORTED target file on disk.  "
495
     "For executables this is the location of the executable file.  "
496 497
     "For bundles on OS X this is the location of the executable file "
     "inside Contents/MacOS under the application bundle folder.  "
498 499 500 501
     "For static libraries and modules this is the location of the "
     "library or module.  "
     "For shared libraries on non-DLL platforms this is the location of "
     "the shared library.  "
502 503
     "For frameworks on OS X this is the location of the library file "
     "symlink just inside the framework folder.  "
504
     "For DLLs this is the location of the \".dll\" part of the library.  "
505
     "For UNKNOWN libraries this is the location of the file to be linked.  "
506 507 508 509 510 511
     "Ignored for non-imported targets."
     "\n"
     "Projects may skip IMPORTED_LOCATION if the configuration-specific "
     "property IMPORTED_LOCATION_<CONFIG> is set.  "
     "To get the location of an imported target read one of the "
     "LOCATION or LOCATION_<CONFIG> properties.");
512 513 514

  cm->DefineProperty
    ("IMPORTED_LOCATION_<CONFIG>", cmProperty::TARGET,
515
     "<CONFIG>-specific version of IMPORTED_LOCATION property.",
516 517 518 519 520 521
     "Configuration names correspond to those provided by the project "
     "from which the target is imported.");

  cm->DefineProperty
    ("IMPORTED_SONAME", cmProperty::TARGET,
     "The \"soname\" of an IMPORTED target of shared library type.",
522
     "Set this to the \"soname\" embedded in an imported shared library.  "
523 524 525 526 527
     "This is meaningful only on platforms supporting the feature.  "
     "Ignored for non-imported targets.");

  cm->DefineProperty
    ("IMPORTED_SONAME_<CONFIG>", cmProperty::TARGET,
528
     "<CONFIG>-specific version of IMPORTED_SONAME property.",
529 530 531
     "Configuration names correspond to those provided by the project "
     "from which the target is imported.");

532 533 534 535 536 537 538 539 540 541 542 543
  cm->DefineProperty
    ("IMPORTED_NO_SONAME", cmProperty::TARGET,
     "Specifies that an IMPORTED shared library target has no \"soname\".  ",
     "Set this property to true for an imported shared library file that "
     "has no \"soname\" field.  "
     "CMake may adjust generated link commands for some platforms to prevent "
     "the linker from using the path to the library in place of its missing "
     "soname.  "
     "Ignored for non-imported targets.");

  cm->DefineProperty
    ("IMPORTED_NO_SONAME_<CONFIG>", cmProperty::TARGET,
544
     "<CONFIG>-specific version of IMPORTED_NO_SONAME property.",
545 546 547
     "Configuration names correspond to those provided by the project "
     "from which the target is imported.");

548
  cm->DefineProperty
549
    ("EXCLUDE_FROM_ALL", cmProperty::TARGET,
550 551 552
     "Exclude the target from the all target.",
     "A property on a target that indicates if the target is excluded "
     "from the default build target. If it is not, then with a Makefile "
553
     "for example typing make will cause this target to be built. "
554 555 556
     "The same concept applies to the default build of other generators. "
     "Installing a target with EXCLUDE_FROM_ALL set to true has "
     "undefined behavior.");
557

558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573
  cm->DefineProperty
    ("LINK_LIBRARIES", cmProperty::TARGET,
     "List of direct link dependencies.",
     "This property specifies the list of libraries or targets which will be "
     "used for linking. "
     "In addition to accepting values from the target_link_libraries "
     "command, values may be set directly on any target using the "
     "set_property command. "
     "\n"
     "The target property values are used by the generators to set "
     "the link libraries for the compiler.  "
     "See also the target_link_libraries command.\n"
     "Contents of LINK_LIBRARIES may use \"generator expressions\" with "
     "the syntax \"$<...>\".  "
     CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS);

574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590
  cm->DefineProperty
    ("INCLUDE_DIRECTORIES", cmProperty::TARGET,
     "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 "
591 592 593 594 595
     "the include paths for the compiler.  "
     "See also the include_directories command.\n"
     "Contents of INCLUDE_DIRECTORIES may use \"generator expressions\" with "
     "the syntax \"$<...>\".  "
     CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS);
596

597
  cm->DefineProperty
598
    ("INSTALL_NAME_DIR", cmProperty::TARGET,
599 600 601 602 603 604
     "Mac OSX directory name for installed targets.",
     "INSTALL_NAME_DIR is a string specifying the "
     "directory portion of the \"install_name\" field of shared libraries "
     "on Mac OSX to use in the installed targets. ");

  cm->DefineProperty
605
    ("INSTALL_RPATH", cmProperty::TARGET,
606 607
     "The rpath to use for installed targets.",
     "A semicolon-separated list specifying the rpath "
608 609 610
     "to use in installed targets (for platforms that support it).  "
     "This property is initialized by the value of the variable "
     "CMAKE_INSTALL_RPATH if it is set when a target is created.");
611 612

  cm->DefineProperty
613
    ("INSTALL_RPATH_USE_LINK_PATH", cmProperty::TARGET,
614 615 616
     "Add paths to linker search and installed rpath.",
     "INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true will "
     "append directories in the linker search path and outside the "
617 618 619 620
     "project to the INSTALL_RPATH.  "
     "This property is initialized by the value of the variable "
     "CMAKE_INSTALL_RPATH_USE_LINK_PATH if it is set when a target is "
     "created.");
621

622 623 624 625 626 627 628 629 630 631 632 633 634
  cm->DefineProperty
    ("INTERPROCEDURAL_OPTIMIZATION", cmProperty::TARGET,
     "Enable interprocedural optimization for a target.",
     "If set to true, enables interprocedural optimizations "
     "if they are known to be supported by the compiler.");

  cm->DefineProperty
    ("INTERPROCEDURAL_OPTIMIZATION_<CONFIG>", cmProperty::TARGET,
     "Per-configuration interprocedural optimization for a target.",
     "This is a per-configuration version of INTERPROCEDURAL_OPTIMIZATION.  "
     "If set, this property overrides the generic property "
     "for the named configuration.");

635 636 637 638 639
  cm->DefineProperty
    ("LABELS", cmProperty::TARGET,
     "Specify a list of text labels associated with a target.",
     "Target label semantics are currently unspecified.");

640
  cm->DefineProperty
641
    ("LINK_FLAGS", cmProperty::TARGET,
642 643 644 645 646 647
     "Additional flags to use when linking this target.",
     "The LINK_FLAGS property can be used to add extra flags to the "
     "link step of a target. LINK_FLAGS_<CONFIG> will add to the "
     "configuration <CONFIG>, "
     "for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO. ");

648 649 650 651 652
  cm->DefineProperty
    ("LINK_FLAGS_<CONFIG>", cmProperty::TARGET,
     "Per-configuration linker flags for a target.",
     "This is the configuration-specific version of LINK_FLAGS.");

653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669
#define CM_LINK_SEARCH_SUMMARY \
  "Some linkers support switches such as -Bstatic and -Bdynamic " \
  "to determine whether to use static or shared libraries for -lXXX " \
  "options.  CMake uses these options to set the link type for " \
  "libraries whose full paths are not known or (in some cases) are in " \
  "implicit link directories for the platform.  "

  cm->DefineProperty
    ("LINK_SEARCH_START_STATIC", cmProperty::TARGET,
     "Assume the linker looks for static libraries by default.",
     CM_LINK_SEARCH_SUMMARY
     "By default the linker search type is assumed to be -Bdynamic at "
     "the beginning of the library list.  This property switches the "
     "assumption to -Bstatic.  It is intended for use when linking an "
     "executable statically (e.g. with the GNU -static option).  "
     "See also LINK_SEARCH_END_STATIC.");

670 671 672
  cm->DefineProperty
    ("LINK_SEARCH_END_STATIC", cmProperty::TARGET,
     "End a link line such that static system libraries are used.",
673 674 675 676 677 678
     CM_LINK_SEARCH_SUMMARY
     "By default CMake adds an option at the end of the library list (if "
     "necessary) to set the linker search type back to its starting type.  "
     "This property switches the final linker search type to -Bstatic "
     "regardless of how it started.  "
     "See also LINK_SEARCH_START_STATIC.");
679

680
  cm->DefineProperty
681
    ("LINKER_LANGUAGE", cmProperty::TARGET,
682
     "Specifies language whose compiler will invoke the linker.",
683
     "For executables, shared libraries, and modules, this sets the "
684
     "language whose compiler is used to link the target "
685
     "(such as \"C\" or \"CXX\").  "
686 687 688 689 690
     "A typical value for an executable is the language of the source "
     "file providing the program entry point (main).  "
     "If not set, the language with the highest linker preference "
     "value is the default.  "
     "See documentation of CMAKE_<LANG>_LINKER_PREFERENCE variables.");
691 692

  cm->DefineProperty
693
    ("LOCATION", cmProperty::TARGET,
694 695 696 697 698 699
     "Read-only location of a target on disk.",
     "For an imported target, this read-only property returns the value of "
     "the LOCATION_<CONFIG> property for an unspecified configuration "
     "<CONFIG> provided by the target.\n"
     "For a non-imported target, this property is provided for compatibility "
     "with CMake 2.4 and below.  "
700 701
     "It was meant to get the location of an executable target's output file "
     "for use in add_custom_command.  "
702 703 704
     "The path may contain a build-system-specific portion that "
     "is replaced at build time with the configuration getting built "
     "(such as \"$(ConfigurationName)\" in VS). "
705 706
     "In CMake 2.6 and above add_custom_command automatically recognizes a "
     "target name in its COMMAND and DEPENDS options and computes the "
707
     "target location.  "
708 709 710
     "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."
711
     CM_LOCATION_UNDEFINED_BEHAVIOR("reading this property"));
712 713 714 715 716 717

  cm->DefineProperty
    ("LOCATION_<CONFIG>", cmProperty::TARGET,
     "Read-only property providing a target location on disk.",
     "A read-only property that indicates where a target's main file is "
     "located on disk for the configuration <CONFIG>.  "
718 719 720 721 722 723
     "The property is defined only for library and executable targets.  "
     "An imported target may provide a set of configurations different "
     "from that of the importing project.  "
     "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 "
724
     "configurations explicitly."
725
     CM_LOCATION_UNDEFINED_BEHAVIOR("reading this property"));
726

727 728 729 730 731 732 733 734 735 736 737 738
  cm->DefineProperty
    ("LINK_DEPENDS", cmProperty::TARGET,
     "Additional files on which a target binary depends for linking.",
     "Specifies a semicolon-separated list of full-paths to files on which "
     "the link rule for this target depends.  "
     "The target binary will be linked if any of the named files is newer "
     "than it."
     "\n"
     "This property is ignored by non-Makefile generators.  "
     "It is intended to specify dependencies on \"linker scripts\" for "
     "custom Makefile link rules.");

739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754
  cm->DefineProperty
    ("LINK_DEPENDS_NO_SHARED", cmProperty::TARGET,
     "Do not depend on linked shared library files.",
     "Set this property to true to tell CMake generators not to add "
     "file-level dependencies on the shared library files linked by "
     "this target.  "
     "Modification to the shared libraries will not be sufficient to "
     "re-link this target.  "
     "Logical target-level dependencies will not be affected so the "
     "linked shared libraries will still be brought up to date before "
     "this target is built."
     "\n"
     "This property is initialized by the value of the variable "
     "CMAKE_LINK_DEPENDS_NO_SHARED if it is set when a target is "
     "created.");

755 756 757 758 759 760 761 762
  cm->DefineProperty
    ("LINK_INTERFACE_LIBRARIES", cmProperty::TARGET,
     "List public interface libraries for a shared library or executable.",
     "By default linking to a shared library target transitively "
     "links to targets with which the library itself was linked.  "
     "For an executable with exports (see the ENABLE_EXPORTS property) "
     "no default transitive link dependencies are used.  "
     "This property replaces the default transitive link dependencies with "
763
     "an explicit list.  "
764 765 766 767 768
     "When the target is linked into another target the libraries "
     "listed (and recursively their link interface libraries) will be "
     "provided to the other target also.  "
     "If the list is empty then no transitive link dependencies will be "
     "incorporated when this target is linked into another target even if "
769
     "the default set is non-empty.  "
770 771 772
     "This property is initialized by the value of the variable "
     "CMAKE_LINK_INTERFACE_LIBRARIES if it is set when a target is "
     "created.  "
773
     "This property is ignored for STATIC libraries.");
774 775 776 777 778

  cm->DefineProperty
    ("LINK_INTERFACE_LIBRARIES_<CONFIG>", cmProperty::TARGET,
     "Per-configuration list of public interface libraries for a target.",
     "This is the configuration-specific version of "
779 780 781
     "LINK_INTERFACE_LIBRARIES.  "
     "If set, this property completely overrides the generic property "
     "for the named configuration.");
782

783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
  cm->DefineProperty
    ("INTERFACE_INCLUDE_DIRECTORIES", cmProperty::TARGET,
     "List of public include directories for a library.",
     "Targets may populate this property to publish the include directories "
     "required to compile against the headers for the target.  Consuming "
     "targets can add entries to their own INCLUDE_DIRECTORIES property such "
     "as $<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES> to use the "
     "include directories specified in the interface of 'foo'."
     "\n"
     CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS);

  cm->DefineProperty
    ("INTERFACE_COMPILE_DEFINITIONS", cmProperty::TARGET,
     "List of public compile definitions for a library.",
     "Targets may populate this property to publish the compile definitions "
     "required to compile against the headers for the target.  Consuming "
     "targets can add entries to their own COMPILE_DEFINITIONS property such "
     "as $<TARGET_PROPERTY:foo,INTERFACE_COMPILE_DEFINITIONS> to use the "
     "compile definitions specified in the interface of 'foo'."
     "\n"
     CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS);

805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823
  cm->DefineProperty
    ("LINK_INTERFACE_MULTIPLICITY", cmProperty::TARGET,
     "Repetition count for STATIC libraries with cyclic dependencies.",
     "When linking to a STATIC library target with cyclic dependencies the "
     "linker may need to scan more than once through the archives in the "
     "strongly connected component of the dependency graph.  "
     "CMake by default constructs the link line so that the linker will "
     "scan through the component at least twice.  "
     "This property specifies the minimum number of scans if it is larger "
     "than the default.  "
     "CMake uses the largest value specified by any target in a component.");
  cm->DefineProperty
    ("LINK_INTERFACE_MULTIPLICITY_<CONFIG>", cmProperty::TARGET,
     "Per-configuration repetition count for cycles of STATIC libraries.",
     "This is the configuration-specific version of "
     "LINK_INTERFACE_MULTIPLICITY.  "
     "If set, this property completely overrides the generic property "
     "for the named configuration.");

824 825 826
  cm->DefineProperty
    ("MAP_IMPORTED_CONFIG_<CONFIG>", cmProperty::TARGET,
     "Map from project configuration to IMPORTED target's configuration.",
827 828
     "Set this to the list of configurations of an imported target that "
     "may be used for the current project's <CONFIG> configuration.  "
829 830 831 832 833
     "Targets imported from another project may not provide the same set "
     "of configuration names available in the current project.  "
     "Setting this property tells CMake what imported configurations are "
     "suitable for use when building the <CONFIG> configuration.  "
     "The first configuration in the list found to be provided by the "
834 835 836
     "imported target is selected.  If this property is set and no matching "
     "configurations are available, then the imported target is considered "
     "to be not found.  This property is ignored for non-imported targets.",
837
     false /* TODO: make this chained */ );
838

839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855
  cm->DefineProperty
    ("OSX_ARCHITECTURES", cmProperty::TARGET,
     "Target specific architectures for OS X.",
     "The OSX_ARCHITECTURES property sets the target binary architecture "
     "for targets on OS X.  "
     "This property is initialized by the value of the variable "
     "CMAKE_OSX_ARCHITECTURES if it is set when a target is created.  "
     "Use OSX_ARCHITECTURES_<CONFIG> to set the binary architectures on a "
     "per-configuration basis.  "
     "<CONFIG> is an upper-case name (ex: \"OSX_ARCHITECTURES_DEBUG\").");

  cm->DefineProperty
    ("OSX_ARCHITECTURES_<CONFIG>", cmProperty::TARGET,
     "Per-configuration OS X binary architectures for a target.",
     "This property is the configuration-specific version of "
     "OSX_ARCHITECTURES.");

856
  cm->DefineProperty
857
    ("OUTPUT_NAME", cmProperty::TARGET,
858 859 860 861 862 863 864 865 866 867 868 869 870 871 872
     "Output name for target files.",
     "This sets the base name for output files created for an executable or "
     "library target.  "
     "If not set, the logical target name is used by default.");

  cm->DefineProperty
    ("OUTPUT_NAME_<CONFIG>", cmProperty::TARGET,
     "Per-configuration target file base name.",
     "This is the configuration-specific version of OUTPUT_NAME.");

  cm->DefineProperty
    ("<CONFIG>_OUTPUT_NAME", cmProperty::TARGET,
     "Old per-configuration target file base name.",
     "This is a configuration-specific version of OUTPUT_NAME.  "
     "Use OUTPUT_NAME_<CONFIG> instead.");
873

874 875 876 877 878
  cm->DefineProperty
    ("PDB_NAME", cmProperty::TARGET,
     "Output name for MS debug symbols .pdb file.",
     "Set the base name for debug symbols file created for an "
     "executable or library target.  "
879 880 881
     "If not set, the logical target name is used by default.  "
     "\n"
     "This property is not implemented by the Visual Studio 6 generator.");
882 883 884 885

  cm->DefineProperty
    ("PDB_NAME_<CONFIG>", cmProperty::TARGET,
     "Per-configuration name for MS debug symbols .pdb file.  ",
886 887 888
     "This is the configuration-specific version of PDB_NAME.  "
     "\n"
     "This property is not implemented by the Visual Studio 6 generator.");
889

890
  cm->DefineProperty
891
    ("PRE_INSTALL_SCRIPT", cmProperty::TARGET,
892 893 894 895 896 897 898 899
     "Deprecated install support.",
     "The PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT properties are the "
     "old way to specify CMake scripts to run before and after "
     "installing a target.  They are used only when the old "
     "INSTALL_TARGETS command is used to install the target.  Use the "
     "INSTALL command instead.");

  cm->DefineProperty
900
    ("PREFIX", cmProperty::TARGET,
901 902 903 904
     "What comes before the library name.",
     "A target property that can be set to override the prefix "
     "(such as \"lib\") on a library name.");

905 906 907 908 909 910
  cm->DefineProperty
    ("POSITION_INDEPENDENT_CODE", cmProperty::TARGET,
     "Whether to create a position-independent target",
     "The POSITION_INDEPENDENT_CODE property determines whether position "
     "independent executables or shared libraries will be created.  "
     "This property is true by default for SHARED and MODULE library "
911 912
     "targets and false otherwise.  "
     "This property is initialized by the value of the variable "
913
     "CMAKE_POSITION_INDEPENDENT_CODE if it is set when a target is "
914
     "created.");
915

916 917 918 919 920 921 922 923 924 925 926 927 928 929
  cm->DefineProperty
    ("INTERFACE_POSITION_INDEPENDENT_CODE", cmProperty::TARGET,
     "Whether consumers need to create a position-independent target",
     "The INTERFACE_POSITION_INDEPENDENT_CODE property informs consumers of "
     "this target whether they must set their POSITION_INDEPENDENT_CODE "
     "property to ON.  If this property is set to ON, then the "
     "POSITION_INDEPENDENT_CODE property on all consumers will be set to "
     "ON.  Similarly, if this property is set to OFF, then the "
     "POSITION_INDEPENDENT_CODE property on all consumers will be set to "
     "OFF.  If this property is undefined, then consumers will determine "
     "their POSITION_INDEPENDENT_CODE property by other means.  Consumers "
     "must ensure that the targets that they link to have a consistent "
     "requirement for their INTERFACE_POSITION_INDEPENDENT_CODE property.");

930 931 932 933 934
  cm->DefineProperty
    ("COMPATIBLE_INTERFACE_BOOL", cmProperty::TARGET,
     "Properties which must be compatible with their link interface",
     "The COMPATIBLE_INTERFACE_BOOL property may contain a list of properties"
     "for this target which must be consistent when evaluated as a boolean "
935 936 937 938 939 940
     "in the INTERFACE of all linked dependees.  For example, if a "
     "property \"FOO\" appears in the list, then for each dependee, the "
     "\"INTERFACE_FOO\" property content in all of its dependencies must be "
     "consistent with each other, and with the \"FOO\" property in the "
     "dependee.  Consistency in this sense has the meaning that if the "
     "property is set, then it must have the same boolean value as all "
941 942 943 944
     "others, and if the property is not set, then it is ignored.  Note that "
     "for each dependee, the set of properties from this property must not "
     "intersect with the set of properties from the "
     "COMPATIBLE_INTERFACE_STRING property.");
945

946 947 948 949 950
  cm->DefineProperty
    ("COMPATIBLE_INTERFACE_STRING", cmProperty::TARGET,
     "Properties which must be string-compatible with their link interface",
     "The COMPATIBLE_INTERFACE_STRING property may contain a list of "
     "properties for this target which must be the same when evaluated as "
951 952 953 954
     "a string in the INTERFACE of all linked dependees.  For example, "
     "if a property \"FOO\" appears in the list, then for each dependee, the "
     "\"INTERFACE_FOO\" property content in all of its dependencies must be "
     "equal with each other, and with the \"FOO\" property in the dependee.  "
955 956 957 958
     "If the property is not set, then it is ignored.  Note that for each "
     "dependee, the set of properties from this property must not intersect "
     "with the set of properties from the COMPATIBLE_INTERFACE_BOOL "
     "property.");
959

960
  cm->DefineProperty
961
    ("POST_INSTALL_SCRIPT", cmProperty::TARGET,
962 963 964 965 966 967 968
     "Deprecated install support.",
     "The PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT properties are the "
     "old way to specify CMake scripts to run before and after "
     "installing a target.  They are used only when the old "
     "INSTALL_TARGETS command is used to install the target.  Use the "
     "INSTALL command instead.");

969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998
  cm->DefineProperty
    ("PRIVATE_HEADER", cmProperty::TARGET,
     "Specify private header files in a FRAMEWORK shared library target.",
     "Shared library targets marked with the FRAMEWORK property generate "
     "frameworks on OS X and normal shared libraries on other platforms.  "
     "This property may be set to a list of header files to be placed "
     "in the PrivateHeaders directory inside the framework folder.  "
     "On non-Apple platforms these headers may be installed using the "
     "PRIVATE_HEADER option to the install(TARGETS) command.");

  cm->DefineProperty
    ("PUBLIC_HEADER", cmProperty::TARGET,
     "Specify public header files in a FRAMEWORK shared library target.",
     "Shared library targets marked with the FRAMEWORK property generate "
     "frameworks on OS X and normal shared libraries on other platforms.  "
     "This property may be set to a list of header files to be placed "
     "in the Headers directory inside the framework folder.  "
     "On non-Apple platforms these headers may be installed using the "
     "PUBLIC_HEADER option to the install(TARGETS) command.");

  cm->DefineProperty
    ("RESOURCE", cmProperty::TARGET,
     "Specify resource files in a FRAMEWORK shared library target.",
     "Shared library targets marked with the FRAMEWORK property generate "
     "frameworks on OS X and normal shared libraries on other platforms.  "
     "This property may be set to a list of files to be placed "
     "in the Resources directory inside the framework folder.  "
     "On non-Apple platforms these files may be installed using the "
     "RESOURCE option to the install(TARGETS) command.");

999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017
  cm->DefineProperty
    ("RULE_LAUNCH_COMPILE", cmProperty::TARGET,
     "Specify a launcher for compile rules.",
     "See the global property of the same name for details.  "
     "This overrides the global and directory property for a target.",
     true);
  cm->DefineProperty
    ("RULE_LAUNCH_LINK", cmProperty::TARGET,
     "Specify a launcher for link rules.",
     "See the global property of the same name for details.  "
     "This overrides the global and directory property for a target.",
     true);
  cm->DefineProperty
    ("RULE_LAUNCH_CUSTOM", cmProperty::TARGET,
     "Specify a launcher for custom rules.",
     "See the global property of the same name for details.  "
     "This overrides the global and directory property for a target.",
     true);

1018
  cm->DefineProperty
1019
    ("SKIP_BUILD_RPATH", cmProperty::TARGET,
1020 1021 1022
     "Should rpaths be used for the build tree.",
     "SKIP_BUILD_RPATH is a boolean specifying whether to skip automatic "
     "generation of an rpath allowing the target to run from the "
1023 1024 1025
     "build tree.  "
     "This property is initialized by the value of the variable "
     "CMAKE_SKIP_BUILD_RPATH if it is set when a target is created.");
1026

1027 1028 1029 1030 1031 1032 1033 1034 1035 1036
  cm->DefineProperty
    ("NO_SONAME", cmProperty::TARGET,
     "Whether to set \"soname\" when linking a shared library or module.",
     "Enable this boolean property if a generated shared library or module "
     "should not have \"soname\" set. Default is to set \"soname\" on all "
     "shared libraries and modules as long as the platform supports it. "
     "Generally, use this property only for leaf private libraries or "
     "plugins. If you use it on normal shared libraries which other targets "
     "link against, on some platforms a linker will insert a full path to "
     "the library (as specified at link time) into the dynamic section of "
1037
     "the dependent binary. Therefore, once installed, dynamic loader may "
1038 1039
     "eventually fail to locate the library for the binary.");

1040
  cm->DefineProperty
1041
    ("SOVERSION", cmProperty::TARGET,
1042 1043 1044 1045 1046 1047 1048
     "What version number is this target.",
     "For shared libraries VERSION and SOVERSION can be used to specify "
     "the build version and api version respectively. When building or "
     "installing appropriate symlinks are created if the platform "
     "supports symlinks and the linker supports so-names. "
     "If only one of both is specified the missing is assumed to have "
     "the same version number. "
1049
     "SOVERSION is ignored if NO_SONAME property is set. "
1050 1051 1052 1053 1054
     "For shared libraries and executables on Windows the VERSION "
     "attribute is parsed to extract a \"major.minor\" version number. "
     "These numbers are used as the image version of the binary. ");

  cm->DefineProperty
1055
    ("STATIC_LIBRARY_FLAGS", cmProperty::TARGET,
1056 1057 1058
     "Extra flags to use when linking static libraries.",
     "Extra flags to use when linking a static library.");

1059 1060 1061 1062 1063
  cm->DefineProperty
    ("STATIC_LIBRARY_FLAGS_<CONFIG>", cmProperty::TARGET,
     "Per-configuration flags for creating a static library.",
     "This is the configuration-specific version of STATIC_LIBRARY_FLAGS.");

1064
  cm->DefineProperty
1065
    ("SUFFIX", cmProperty::TARGET,
1066
     "What comes after the target name.",
1067
     "A target property that can be set to override the suffix "
1068 1069
     "(such as \".so\" or \".exe\") on the name of a library, module or "
     "executable.");
1070

1071 1072 1073 1074 1075 1076 1077
  cm->DefineProperty
    ("TYPE", cmProperty::TARGET,
     "The type of the target.",
     "This read-only property can be used to test the type of the given "
     "target. It will be one of STATIC_LIBRARY, MODULE_LIBRARY, "
     "SHARED_LIBRARY, EXECUTABLE or one of the internal target types.");

1078
  cm->DefineProperty
1079
    ("VERSION", cmProperty::TARGET,
1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095
     "What version number is this target.",
     "For shared libraries VERSION and SOVERSION can be used to specify "
     "the build version and api version respectively. When building or "
     "installing appropriate symlinks are created if the platform "
     "supports symlinks and the linker supports so-names. "
     "If only one of both is specified the missing is assumed to have "
     "the same version number. "
     "For executables VERSION can be used to specify the build version. "
     "When building or installing appropriate symlinks are created if "
     "the platform supports symlinks. "
     "For shared libraries and executables on Windows the VERSION "
     "attribute is parsed to extract a \"major.minor\" version number. "
     "These numbers are used as the image version of the binary. ");


  cm->DefineProperty
1096
    ("WIN32_EXECUTABLE", cmProperty::TARGET,
1097 1098 1099
     "Build an executable with a WinMain entry point on windows.",
     "When this property is set to true the executable when linked "
     "on Windows will be created with a WinMain() entry point instead "
1100
     "of just main().  "
1101 1102
     "This makes it a GUI executable instead of a console application.  "
     "See the CMAKE_MFC_FLAG variable documentation to configure use "
1103 1104 1105
     "of MFC for WinMain executables.  "
     "This property is initialized by the value of the variable "
     "CMAKE_WIN32_EXECUTABLE if it is set when a target is created.");
1106 1107 1108 1109 1110 1111 1112

  cm->DefineProperty
    ("MACOSX_BUNDLE", cmProperty::TARGET,
     "Build an executable as an application bundle on Mac OS X.",
     "When this property is set to true the executable when built "
     "on Mac OS X will be created as an application bundle.  "
     "This makes it a GUI executable that can be launched from "
1113 1114
     "the Finder.  "
     "See the MACOSX_BUNDLE_INFO_PLIST target property for information "
1115 1116 1117
     "about creation of the Info.plist file for the application bundle.  "
     "This property is initialized by the value of the variable "
     "CMAKE_MACOSX_BUNDLE if it is set when a target is created.");
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129

  cm->DefineProperty
    ("MACOSX_BUNDLE_INFO_PLIST", cmProperty::TARGET,
     "Specify a custom Info.plist template for a Mac OS X App Bundle.",
     "An executable target with MACOSX_BUNDLE enabled will be built as an "
     "application bundle on Mac OS X.  "
     "By default its Info.plist file is created by configuring a template "
     "called MacOSXBundleInfo.plist.in located in the CMAKE_MODULE_PATH.  "
     "This property specifies an alternative template file name which "
     "may be a full path.\n"
     "The following target properties may be set to specify content to "
     "be configured into the file:\n"
1130 1131 1132 1133 1134 1135 1136 1137
     "  MACOSX_BUNDLE_INFO_STRING\n"
     "  MACOSX_BUNDLE_ICON_FILE\n"
     "  MACOSX_BUNDLE_GUI_IDENTIFIER\n"
     "  MACOSX_BUNDLE_LONG_VERSION_STRING\n"
     "  MACOSX_BUNDLE_BUNDLE_NAME\n"
     "  MACOSX_BUNDLE_SHORT_VERSION_STRING\n"
     "  MACOSX_BUNDLE_BUNDLE_VERSION\n"
     "  MACOSX_BUNDLE_COPYRIGHT\n"
1138
     "CMake variables of the same name may be set to affect all targets "
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158
     "in a directory that do not have each specific property set.  "
     "If a custom Info.plist is specified by this property it may of course "
     "hard-code all the settings instead of using the target properties.");

  cm->DefineProperty
    ("MACOSX_FRAMEWORK_INFO_PLIST", cmProperty::TARGET,
     "Specify a custom Info.plist template for a Mac OS X Framework.",
     "An library target with FRAMEWORK enabled will be built as a "
     "framework on Mac OS X.  "
     "By default its Info.plist file is created by configuring a template "
     "called MacOSXFrameworkInfo.plist.in located in the CMAKE_MODULE_PATH.  "
     "This property specifies an alternative template file name which "
     "may be a full path.\n"
     "The following target properties may be set to specify content to "
     "be configured into the file:\n"
     "  MACOSX_FRAMEWORK_ICON_FILE\n"
     "  MACOSX_FRAMEWORK_IDENTIFIER\n"
     "  MACOSX_FRAMEWORK_SHORT_VERSION_STRING\n"
     "  MACOSX_FRAMEWORK_BUNDLE_VERSION\n"
     "CMake variables of the same name may be set to affect all targets "
1159 1160 1161
     "in a directory that do not have each specific property set.  "
     "If a custom Info.plist is specified by this property it may of course "
     "hard-code all the settings instead of using the target properties.");
1162

1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174
  cm->DefineProperty
    ("ENABLE_EXPORTS", cmProperty::TARGET,
     "Specify whether an executable exports symbols for loadable modules.",
     "Normally an executable does not export any symbols because it is "
     "the final program.  It is possible for an executable to export "
     "symbols to be used by loadable modules.  When this property is "
     "set to true CMake will allow other targets to \"link\" to the "
     "executable with the TARGET_LINK_LIBRARIES command.  "
     "On all platforms a target-level dependency on the executable is "
     "created for targets that link to it.  "
     "For DLL platforms an import library will be created for the "
     "exported symbols and then used for linking.  "
1175 1176 1177 1178 1179 1180 1181 1182
     "All Windows-based systems including Cygwin are DLL platforms.  "
     "For non-DLL platforms that require all symbols to be resolved at "
     "link time, such as Mac OS X, the module will \"link\" to the "
     "executable using a flag like \"-bundle_loader\".  "
     "For other non-DLL platforms the link rule is simply ignored since "
     "the dynamic loader will automatically bind symbols when the "
     "module is loaded.  "
      );
1183

1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194
  cm->DefineProperty
    ("Fortran_FORMAT", cmProperty::TARGET,
     "Set to FIXED or FREE to indicate the Fortran source layout.",
     "This property tells CMake whether the Fortran source files "
     "in a target use fixed-format or free-format.  "
     "CMake will pass the corresponding format flag to the compiler.  "
     "Use the source-specific Fortran_FORMAT property to change the "
     "format of a specific source file.  "
     "If the variable CMAKE_Fortran_FORMAT is set when a target "
     "is created its value is used to initialize this property.");

1195 1196 1197 1198 1199 1200 1201
  cm->DefineProperty
    ("Fortran_MODULE_DIRECTORY", cmProperty::TARGET,
     "Specify output directory for Fortran modules provided by the target.",
     "If the target contains Fortran source files that provide modules "
     "and the compiler supports a module output directory this specifies "
     "the directory in which the modules will be placed.  "
     "When this property is not set the modules will be placed in the "
1202 1203
     "build directory corresponding to the target's source directory.  "
     "If the variable CMAKE_Fortran_MODULE_DIRECTORY is set when a target "
1204 1205 1206 1207 1208 1209
     "is created its value is used to initialize this property."
     "\n"
     "Note that some compilers will automatically search the module output "
     "directory for modules USEd during compilation but others will not.  "
     "If your sources USE modules their location must be specified by "
     "INCLUDE_DIRECTORIES regardless of this property.");
1210

1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227
  cm->DefineProperty
    ("GNUtoMS", cmProperty::TARGET,
     "Convert GNU import library (.dll.a) to MS format (.lib).",
     "When linking a shared library or executable that exports symbols "
     "using GNU tools on Windows (MinGW/MSYS) with Visual Studio installed "
     "convert the import library (.dll.a) from GNU to MS format (.lib).  "
     "Both import libraries will be installed by install(TARGETS) and "
     "exported by install(EXPORT) and export() to be linked by applications "
     "with either GNU- or MS-compatible tools."
     "\n"
     "If the variable CMAKE_GNUtoMS is set when a target "
     "is created its value is used to initialize this property.  "
     "The variable must be set prior to the first command that enables "
     "a language such as project() or enable_language().  "
     "CMake provides the variable as an option to the user automatically "
     "when configuring on Windows with GNU tools.");

1228 1229 1230 1231 1232 1233
  cm->DefineProperty
    ("XCODE_ATTRIBUTE_<an-attribute>", cmProperty::TARGET,
     "Set Xcode target attributes directly.",
     "Tell the Xcode generator to set '<an-attribute>' to a given value "
     "in the generated Xcode project.  Ignored on other generators.");

1234
  cm->DefineProperty
1235
    ("GENERATOR_FILE_NAME", cmProperty::TARGET,
1236 1237
     "Generator's file for this target.",
     "An internal property used by some generators to record the name of "
1238 1239 1240
     "project or dsp file associated with this target. Note that at configure "
     "time, this property is only set for targets created by "
     "include_external_msproject().");
1241

1242 1243 1244 1245 1246 1247 1248
  cm->DefineProperty
    ("SOURCES", cmProperty::TARGET,
     "Source names specified for a target.",
     "Read-only list of sources specified for a target.  "
     "The names returned are suitable for passing to the "
     "set_source_files_properties command.");

1249 1250 1251 1252 1253 1254 1255 1256 1257
  cm->DefineProperty
    ("FOLDER", cmProperty::TARGET,
     "Set the folder name. Use to organize targets in an IDE.",
     "Targets with no FOLDER property will appear as top level "
     "entities in IDEs like Visual Studio. Targets with the same "
     "FOLDER property value will appear next to each other in a "
     "folder of that name. To nest folders, use FOLDER values such "
     "as 'GUI/Dialogs' with '/' characters separating folder levels.");

1258 1259 1260 1261
  cm->DefineProperty
    ("PROJECT_LABEL", cmProperty::TARGET,
     "Change the name of a target in an IDE.",
     "Can be used to change the name of the target in an IDE "
1262
     "like Visual Studio. ");
1263 1264 1265 1266
  cm->DefineProperty
    ("VS_KEYWORD", cmProperty::TARGET,
     "Visual Studio project keyword.",
     "Can be set to change the visual studio keyword, for example "
1267
     "Qt integration works better if this is set to Qt4VSv1.0. ");
1268 1269 1270 1271 1272 1273 1274
  cm->DefineProperty
    ("VS_SCC_PROVIDER", cmProperty::TARGET,
     "Visual Studio Source Code Control Provider.",
     "Can be set to change the visual studio source code control "
     "provider property.");
  cm->DefineProperty
    ("VS_SCC_LOCALPATH", cmProperty::TARGET,
1275
     "Visual Studio Source Code Control Local Path.",
1276 1277 1278 1279 1280 1281 1282
     "Can be set to change the visual studio source code control "
     "local path property.");
  cm->DefineProperty
    ("VS_SCC_PROJECTNAME", cmProperty::TARGET,
     "Visual Studio Source Code Control Project.",
     "Can be set to change the visual studio source code control "
     "project name property.");
1283 1284 1285 1286 1287
  cm->DefineProperty
    ("VS_SCC_AUXPATH", cmProperty::TARGET,
     "Visual Studio Source Code Control Aux Path.",
     "Can be set to change the visual studio source code control "
     "auxpath property.");
1288 1289 1290 1291 1292 1293
  cm->DefineProperty
    ("VS_GLOBAL_PROJECT_TYPES", cmProperty::TARGET,
     "Visual Studio project type(s).",
     "Can be set to one or more UUIDs recognized by Visual Studio "
     "to indicate the type of project. This value is copied "
     "verbatim into the generated project file. Example for a "
1294 1295 1296 1297
     "managed C++ unit testing project:\n"
     " {3AC096D0-A1C2-E12C-1390-A8335801FDAB};"
     "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\n"
     "UUIDs are semicolon-delimited.");
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310
  cm->DefineProperty
    ("VS_GLOBAL_KEYWORD", cmProperty::TARGET,
     "Visual Studio project keyword.",
     "Sets the \"keyword\" attribute for a generated Visual Studio "
     "project. Defaults to \"Win32Proj\". You may wish to override "
     "this value with \"ManagedCProj\", for example, in a Visual "
     "Studio managed C++ unit test project.");
  cm->DefineProperty
    ("VS_DOTNET_REFERENCES", cmProperty::TARGET,
     "Visual Studio managed project .NET references",
     "Adds one or more semicolon-delimited .NET references to a "
     "generated Visual Studio project. For example, \"System;"
     "System.Windows.Forms\".");
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320
  cm->DefineProperty
    ("VS_WINRT_EXTENSIONS", cmProperty::TARGET,
     "Visual Studio project C++/CX language extensions for Windows Runtime",
     "Can be set to enable C++/CX language extensions.");
  cm->DefineProperty
    ("VS_WINRT_REFERENCES", cmProperty::TARGET,
     "Visual Studio project Windows Runtime Metadata references",
     "Adds one or more semicolon-delimited WinRT references to a "
     "generated Visual Studio project. For example, \"Windows;"
     "Windows.UI.Core\".");
1321 1322 1323 1324 1325 1326 1327 1328
  cm->DefineProperty
    ("VS_GLOBAL_<variable>", cmProperty::TARGET,
     "Visual Studio project-specific global variable.",
     "Tell the Visual Studio generator to set the global variable "
     "'<variable>' to a given value in the generated Visual Studio "
     "project. Ignored on other generators. Qt integration works "
     "better if VS_GLOBAL_QtVersion is set to the version "
     "FindQt4.cmake found. For example, \"4.7.3\"");
1329

1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342
#define CM_TARGET_FILE_TYPES_DOC                                            \
     "There are three kinds of target files that may be built: "            \
     "archive, library, and runtime.  "                                     \
     "Executables are always treated as runtime targets. "                  \
     "Static libraries are always treated as archive targets. "             \
     "Module libraries are always treated as library targets. "             \
     "For non-DLL platforms shared libraries are treated as library "       \
     "targets. "                                                            \
     "For DLL platforms the DLL part of a shared library is treated as "    \
     "a runtime target and the corresponding import library is treated as " \
     "an archive target. "                                                  \
     "All Windows-based systems including Cygwin are DLL platforms."

1343 1344 1345
#define CM_TARGET_OUTDIR_DOC(TYPE, type)                                    \
     "This property specifies the directory into which " #type " target "   \
     "files should be built. "                                              \
1346 1347
     "Multi-configuration generators (VS, Xcode) append "                   \
     "a per-configuration subdirectory to the specified directory.  "       \
1348 1349 1350 1351
     CM_TARGET_FILE_TYPES_DOC "  "                                          \
     "This property is initialized by the value of the variable "           \
     "CMAKE_" #TYPE "_OUTPUT_DIRECTORY if it is set when a target is created."

1352 1353 1354 1355 1356 1357 1358 1359
#define CM_TARGET_OUTDIR_CONFIG_DOC(TYPE)                                   \
     "This is a per-configuration version of " #TYPE "_OUTPUT_DIRECTORY, "  \
     "but multi-configuration generators (VS, Xcode) do NOT append "        \
     "a per-configuration subdirectory to the specified directory.  "       \
     "This property is initialized by the value of the variable "           \
     "CMAKE_" #TYPE "_OUTPUT_DIRECTORY_<CONFIG> "                           \
     "if it is set when a target is created."

1360 1361 1362
  cm->DefineProperty
    ("ARCHIVE_OUTPUT_DIRECTORY", cmProperty::TARGET,
     "Output directory in which to build ARCHIVE target files.",
1363
     CM_TARGET_OUTDIR_DOC(ARCHIVE, archive));
1364 1365 1366 1367
  cm->DefineProperty
    ("ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>", cmProperty::TARGET,
     "Per-configuration output directory for ARCHIVE target files.",
     CM_TARGET_OUTDIR_CONFIG_DOC(ARCHIVE));
1368 1369 1370
  cm->DefineProperty
    ("LIBRARY_OUTPUT_DIRECTORY", cmProperty::TARGET,
     "Output directory in which to build LIBRARY target files.",
1371
     CM_TARGET_OUTDIR_DOC(LIBRARY, library));
1372 1373 1374 1375
  cm->DefineProperty
    ("LIBRARY_OUTPUT_DIRECTORY_<CONFIG>", cmProperty::TARGET,
     "Per-configuration output directory for LIBRARY target files.",
     CM_TARGET_OUTDIR_CONFIG_DOC(LIBRARY));
1376 1377 1378
  cm->DefineProperty
    ("RUNTIME_OUTPUT_DIRECTORY", cmProperty::TARGET,
     "Output directory in which to build RUNTIME target files.",
1379
     CM_TARGET_OUTDIR_DOC(RUNTIME, runtime));
1380 1381 1382 1383
  cm->DefineProperty
    ("RUNTIME_OUTPUT_DIRECTORY_<CONFIG>", cmProperty::TARGET,
     "Per-configuration output directory for RUNTIME target files.",
     CM_TARGET_OUTDIR_CONFIG_DOC(RUNTIME));
1384

1385 1386 1387 1388 1389 1390
  cm->DefineProperty
    ("PDB_OUTPUT_DIRECTORY", cmProperty::TARGET,
     "Output directory for MS debug symbols .pdb files.",
     "This property specifies the directory into which the MS debug symbols "
     "will be placed.  "
     "This property is initialized by the value of the variable "
1391 1392 1393
     "CMAKE_PDB_OUTPUT_DIRECTORY if it is set when a target is created."
     "\n"
     "This property is not implemented by the Visual Studio 6 generator.");
1394 1395 1396 1397 1398 1399 1400 1401
  cm->DefineProperty
    ("PDB_OUTPUT_DIRECTORY_<CONFIG>", cmProperty::TARGET,
     "Per-configuration output directory for MS debug symbols .pdb files.",
     "This is a per-configuration version of PDB_OUTPUT_DIRECTORY, "
     "but multi-configuration generators (VS, Xcode) do NOT append "
     "a per-configuration subdirectory to the specified directory. "
     "This property is initialized by the value of the variable "
     "CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG> "
1402 1403 1404
     "if it is set when a target is created."
     "\n"
     "This property is not implemented by the Visual Studio 6 generator.");
1405

1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435
  cm->DefineProperty
    ("ARCHIVE_OUTPUT_NAME", cmProperty::TARGET,
     "Output name for ARCHIVE target files.",
     "This property specifies the base name for archive target files. "
     "It overrides OUTPUT_NAME and OUTPUT_NAME_<CONFIG> properties.  "
     CM_TARGET_FILE_TYPES_DOC);
  cm->DefineProperty
    ("ARCHIVE_OUTPUT_NAME_<CONFIG>", cmProperty::TARGET,
     "Per-configuration output name for ARCHIVE target files.",
     "This is the configuration-specific version of ARCHIVE_OUTPUT_NAME.");
  cm->DefineProperty
    ("LIBRARY_OUTPUT_NAME", cmProperty::TARGET,
     "Output name for LIBRARY target files.",
     "This property specifies the base name for library target files. "
     "It overrides OUTPUT_NAME and OUTPUT_NAME_<CONFIG> properties.  "
     CM_TARGET_FILE_TYPES_DOC);
  cm->DefineProperty
    ("LIBRARY_OUTPUT_NAME_<CONFIG>", cmProperty::TARGET,
     "Per-configuration output name for LIBRARY target files.",
     "This is the configuration-specific version of LIBRARY_OUTPUT_NAME.");
  cm->DefineProperty
    ("RUNTIME_OUTPUT_NAME", cmProperty::TARGET,
     "Output name for RUNTIME target files.",
     "This property specifies the base name for runtime target files.  "
     "It overrides OUTPUT_NAME and OUTPUT_NAME_<CONFIG> properties.  "
     CM_TARGET_FILE_TYPES_DOC);
  cm->DefineProperty
    ("RUNTIME_OUTPUT_NAME_<CONFIG>", cmProperty::TARGET,
     "Per-configuration output name for RUNTIME target files.",
     "This is the configuration-specific version of RUNTIME_OUTPUT_NAME.");
1436
}
1437

1438
void cmTarget::SetType(TargetType type, const char* name)
1439
{
Ken Martin's avatar
Ken Martin committed
1440
  this->Name = name;
1441
  // only add dependency information for library targets
Ken Martin's avatar
Ken Martin committed
1442
  this->TargetTypeValue = type;
1443 1444
  if(this->TargetTypeValue >= STATIC_LIBRARY
     && this->TargetTypeValue <= MODULE_LIBRARY)
Ken Martin's avatar
Ken Martin committed
1445 1446
    {
    this->RecordDependencies = true;
1447 1448
    }