Просмотр исходного кода

automoc: add documentation for CMAKE_AUTOMOC_STRICT_MODE

Alex
Alex Neundorf 14 лет назад
Родитель
Сommit
1eca18fd52
2 измененных файлов с 18 добавлено и 1 удалено
  1. 14 0
      Source/cmDocumentVariables.cxx
  2. 4 1
      Source/cmTarget.cxx

+ 14 - 0
Source/cmDocumentVariables.cxx

@@ -507,6 +507,20 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
      false,
      "Variables That Change Behavior");
 
+    cm->DefineProperty
+    ("CMAKE_AUTOMOC_STRICT_MODE",  cmProperty::VARIABLE,
+     "Switch between strict and relaxed automoc mode.",
+     "When TRUE, automoc behaves exactly as described in the documentation "
+     "of the AUTOMOC target property.  "
+     "When set to FALSE, it accepts more input and tries to find the correct "
+     "input file for moc even if it differs from the documented behaviour. "
+     "In this mode it e.g. also checks whether a header file is intended to "
+     "be processed by moc when a \"foo.moc\" file has been included.\n"
+     "When using Qt4, CMAKE_AUTOMOC_STRICT_MODE is initialized to FALSE. "
+     "It also has to be set to FALSE for KDE4 compatibility.",
+     false,
+     "Variables That Change Behavior");
+
     cm->DefineProperty
     ("CMAKE_FIND_LIBRARY_PREFIXES",  cmProperty::VARIABLE,
      "Prefixes to prepend when looking for libraries.",

+ 4 - 1
Source/cmTarget.cxx

@@ -157,7 +157,10 @@ void cmTarget::DefineProperties(cmake *cm)
      "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 "
-     "CMAKE_AUTOMOC if it is set when a target is created.");
+     "CMAKE_AUTOMOC if it is set when a target is created.\n"
+     "By setting the CMAKE_AUTOMOC_STRICT_MODE variable to FALSE the rules "
+     "for searching the files which will be processed by moc can be relaxed. "
+     "See the documentation for this variable for more details.");
 
   cm->DefineProperty
     ("BUILD_WITH_INSTALL_RPATH", cmProperty::TARGET,