Selaa lähdekoodia

BUG: Corrected and updated documentation of the -P option, -C option, GET_TARGET_PROPERTY command, and GET_SOURCE_FILE_PROPERTY command.

Brad King 20 vuotta sitten
vanhempi
sitoutus
c59d56f653

+ 2 - 2
Source/cmGetSourceFilePropertyCommand.h

@@ -53,9 +53,9 @@ public:
     {
       return
         "  GET_SOURCE_FILE_PROPERTY(VAR file property)\n"
-        "Get a property from a source file.  The value of the property is " 
+        "Get a property from a source file.  The value of the property is "
         "stored in the variable VAR.  If the property is not found, var "
-        "will be set to NOT_FOUND.  Use SET_SOURCE_FILES_PROPERTIES to set "
+        "will be set to \"NOTFOUND\".  Use SET_SOURCE_FILES_PROPERTIES to set "
         "property values.  Source file properties usually control how the "
         "file is built.";
     }

+ 6 - 6
Source/cmGetTargetPropertyCommand.h

@@ -53,19 +53,19 @@ public:
     {
       return
         "  GET_TARGET_PROPERTY(VAR target property)\n"
-        "Get a property from a target.   The value of the property is " 
+        "Get a property from a target.   The value of the property is "
         "stored in the variable VAR.  If the property is not found, var "
-        "will be set to NOT_FOUND.  Use SET_TARGET_PROPERTIES to set "
+        "will be set to \"NOTFOUND\".  Use SET_TARGET_PROPERTIES to set "
         "property values.  Properties are usually used to control how "
-        "a target is built.  The read-only property \"LOCATION\" specifies "
+        "a target is built.\n"
+        "The read-only property \"LOCATION\" specifies "
         "the full path to the file on disk that will be created for the "
         "target.  This is very useful for executable targets to get "
         "the path to the executable file for use in a custom command. "
-        "the path to the executable file for use in a custom command.\n"
         "The read-only property \"TYPE\" returns which type the specified "
         "target has (EXECUTABLE, STATIC_LIBRARY, SHARED_LIBRARY, "
-        "MODULE_LIBRARY, UTILITY, INSTALL_FILES or INSTALL_PROGRAMS)."
-        "This command can get properties for any target so far created. "
+        "MODULE_LIBRARY, UTILITY, INSTALL_FILES or INSTALL_PROGRAMS). "
+        "This command can get properties for any target so far created.\n"
         "The targets do not need to be in the current CMakeLists.txt file.";
     }
   

+ 4 - 2
Source/cmake.h

@@ -318,13 +318,15 @@ private:
 };
 
 #define CMAKE_STANDARD_OPTIONS_TABLE \
-  {"-C <initial-cache>", "Pre-load cmake cache from given file.", \
+  {"-C <initial-cache>", "Pre-load a script to populate the cache.", \
    "When cmake is first run in an empty build tree, it creates a " \
    "CMakeCache.txt file and populates it with customizable settings " \
    "for the project.  This option may be used to specify a file from " \
    "which to load cache entries before the first pass through " \
    "the project's cmake listfiles.  The loaded entries take priority " \
-   "over the project's default values."}, \
+   "over the project's default values.  The given file should be a CMake " \
+   "script containing SET commands that use the CACHE option, " \
+   "not a cache-format file."}, \
   {"-D <var>:<type>=<value>", "Create a cmake cache entry.", \
    "When cmake is first run in an empty build tree, it creates a " \
    "CMakeCache.txt file and populates it with customizable settings " \

+ 3 - 0
Source/cmakemain.cxx

@@ -74,6 +74,9 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
    "each variable."},
   {"-N", "View mode only.",
    "Only load the cache. Do not actually run configure and generate steps."},
+  {"-P <file>", "Process script mode.",
+   "Process the given cmake file as a script written in the CMake language.  "
+   "No configure or generate step is performed and the cache is not modified."},
   {"--help-command cmd [file]", "Print help for a single command and exit.",
    "Full documentation specific to the given command is displayed."},
   {"--help-command-list [file]", "List available listfile commands and exit.",