Commit 8d32d229 authored by Ken Martin's avatar Ken Martin
Browse files

ENH: make commands lower case by default

parent 8e4c7b99
...@@ -47,7 +47,7 @@ public: ...@@ -47,7 +47,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() {return "ADD_CUSTOM_COMMAND";} virtual const char* GetName() {return "add_custom_command";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -63,10 +63,10 @@ public: ...@@ -63,10 +63,10 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
"There are two main signatures for ADD_CUSTOM_COMMAND " "There are two main signatures for add_custom_command "
"The first signature is for adding a custom command " "The first signature is for adding a custom command "
"to produce an output.\n" "to produce an output.\n"
" ADD_CUSTOM_COMMAND(OUTPUT output1 [output2 ...]\n" " add_custom_command(OUTPUT output1 [output2 ...]\n"
" COMMAND command1 [ARGS] [args1...]\n" " COMMAND command1 [ARGS] [args1...]\n"
" [COMMAND command2 [ARGS] [args2...] ...]\n" " [COMMAND command2 [ARGS] [args2...] ...]\n"
" [MAIN_DEPENDENCY depend]\n" " [MAIN_DEPENDENCY depend]\n"
...@@ -92,7 +92,7 @@ public: ...@@ -92,7 +92,7 @@ public:
"The command becomes part of the target and will only execute " "The command becomes part of the target and will only execute "
"when the target itself is built. If the target is already built," "when the target itself is built. If the target is already built,"
" the command will not execute.\n" " the command will not execute.\n"
" ADD_CUSTOM_COMMAND(TARGET target\n" " add_custom_command(TARGET target\n"
" PRE_BUILD | PRE_LINK | POST_BUILD\n" " PRE_BUILD | PRE_LINK | POST_BUILD\n"
" COMMAND command1 [ARGS] [args1...]\n" " COMMAND command1 [ARGS] [args1...]\n"
" [COMMAND command2 [ARGS] [args2...] ...]\n" " [COMMAND command2 [ARGS] [args2...] ...]\n"
......
...@@ -47,7 +47,7 @@ public: ...@@ -47,7 +47,7 @@ public:
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() virtual const char* GetName()
{return "ADD_CUSTOM_TARGET";} {return "add_custom_target";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ADD_CUSTOM_TARGET(Name [ALL] [command1 [args1...]]\n" " add_custom_target(Name [ALL] [command1 [args1...]]\n"
" [COMMAND command2 [args2...] ...]\n" " [COMMAND command2 [args2...] ...]\n"
" [DEPENDS depend depend depend ... ]\n" " [DEPENDS depend depend depend ... ]\n"
" [WORKING_DIRECTORY dir]\n" " [WORKING_DIRECTORY dir]\n"
...@@ -89,7 +89,7 @@ public: ...@@ -89,7 +89,7 @@ public:
"If VERBATIM is given then all the arguments to the commands will be " "If VERBATIM is given then all the arguments to the commands will be "
"passed exactly as specified no matter the build tool used. " "passed exactly as specified no matter the build tool used. "
"Note that one level of escapes is still used by the CMake language " "Note that one level of escapes is still used by the CMake language "
"processor before ADD_CUSTOM_TARGET even sees the arguments. " "processor before add_custom_target even sees the arguments. "
"Use of VERBATIM is recommended as it enables correct behavior. " "Use of VERBATIM is recommended as it enables correct behavior. "
"When VERBATIM is not given the behavior is platform specific. " "When VERBATIM is not given the behavior is platform specific. "
"In the future VERBATIM may be enabled by default. The only reason " "In the future VERBATIM may be enabled by default. The only reason "
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() {return "ADD_DEFINITIONS";} virtual const char* GetName() {return "add_definitions";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ADD_DEFINITIONS(-DFOO -DBAR ...)\n" " add_definitions(-DFOO -DBAR ...)\n"
"Adds flags to command line of C and C++ compilers. " "Adds flags to command line of C and C++ compilers. "
"This command can be used to add any flag to a compile line, " "This command can be used to add any flag to a compile line, "
"but the -D flag is accepted most C/C++ compilers. " "but the -D flag is accepted most C/C++ compilers. "
......
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "ADD_DEPENDENCIES";} virtual const char* GetName() { return "add_dependencies";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ADD_DEPENDENCIES(target-name depend-target1\n" " add_dependencies(target-name depend-target1\n"
" depend-target2 ...)\n" " depend-target2 ...)\n"
"Make a top-level target depend on other top-level targets. A " "Make a top-level target depend on other top-level targets. A "
"top-level target is one created by ADD_EXECUTABLE, ADD_LIBRARY, " "top-level target is one created by ADD_EXECUTABLE, ADD_LIBRARY, "
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "ADD_EXECUTABLE";} virtual const char* GetName() { return "add_executable";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ADD_EXECUTABLE(exename [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]\n" " add_executable(exename [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]\n"
" source1 source2 ... sourceN)\n" " source1 source2 ... sourceN)\n"
"This command adds an executable target to the current directory. " "This command adds an executable target to the current directory. "
"The executable will be built from the list of source files " "The executable will be built from the list of source files "
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "ADD_LIBRARY";} virtual const char* GetName() { return "add_library";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ADD_LIBRARY(libname [SHARED | STATIC | MODULE] [EXCLUDE_FROM_ALL]\n" " add_library(libname [SHARED | STATIC | MODULE] [EXCLUDE_FROM_ALL]\n"
" source1 source2 ... sourceN)\n" " source1 source2 ... sourceN)\n"
"Adds a library target. SHARED, STATIC or MODULE keywords are used " "Adds a library target. SHARED, STATIC or MODULE keywords are used "
"to set the library type. If the keyword MODULE appears, the library " "to set the library type. If the keyword MODULE appears, the library "
......
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "ADD_SUBDIRECTORY";} virtual const char* GetName() { return "add_subdirectory";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ADD_SUBDIRECTORY(source_dir [binary_dir] \n" " add_subdirectory(source_dir [binary_dir] \n"
" [EXCLUDE_FROM_ALL])\n" " [EXCLUDE_FROM_ALL])\n"
"Add a subdirectory to the build. The source_dir specifies the " "Add a subdirectory to the build. The source_dir specifies the "
"directory in which the source CmakeLists.txt and code files are " "directory in which the source CmakeLists.txt and code files are "
......
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "ADD_TEST";} virtual const char* GetName() { return "add_test";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ADD_TEST(testname Exename arg1 arg2 ...)\n" " add_test(testname Exename arg1 arg2 ...)\n"
"If the ENABLE_TESTING command has been run, this command adds a " "If the ENABLE_TESTING command has been run, this command adds a "
"test target to the current directory. If ENABLE_TESTING has not " "test target to the current directory. If ENABLE_TESTING has not "
"been run, this command does nothing. " "been run, this command does nothing. "
......
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "AUX_SOURCE_DIRECTORY";} virtual const char* GetName() { return "aux_source_directory";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -64,7 +64,7 @@ public: ...@@ -64,7 +64,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" AUX_SOURCE_DIRECTORY(dir VARIABLE)\n" " aux_source_directory(dir VARIABLE)\n"
"Collects the names of all the source files in the specified " "Collects the names of all the source files in the specified "
"directory and stores the list in the variable provided. This " "directory and stores the list in the variable provided. This "
"command is intended to be used by projects that use explicit " "command is intended to be used by projects that use explicit "
......
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() {return "BUILD_COMMAND";} virtual const char* GetName() {return "build_command";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" BUILD_COMMAND(variable MAKECOMMAND)\n" " build_command(variable MAKECOMMAND)\n"
"Sets the given variable to a string containing the command that " "Sets the given variable to a string containing the command that "
"will build this project from the root of the build tree using the " "will build this project from the root of the build tree using the "
"build tool given by MAKECOMMAND. MAKECOMMAND should be msdev, " "build tool given by MAKECOMMAND. MAKECOMMAND should be msdev, "
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() {return "BUILD_NAME";} virtual const char* GetName() {return "build_name";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" BUILD_NAME(variable)\n" " build_name(variable)\n"
"Sets the specified variable to a string representing the platform " "Sets the specified variable to a string representing the platform "
"and compiler settings. These values are now available through the " "and compiler settings. These values are now available through the "
"CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables."; "CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables.";
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() {return "CMAKE_MINIMUM_REQUIRED";} virtual const char* GetName() {return "cmake_minimum_required";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" CMAKE_MINIMUM_REQUIRED(VERSION versionNumber [FATAL_ERROR])\n" " cmake_minimum_required(VERSION versionNumber [FATAL_ERROR])\n"
"Let cmake know that the project requires a certain version of a " "Let cmake know that the project requires a certain version of a "
"cmake, or newer. CMake will also try to be backwards compatible to " "cmake, or newer. CMake will also try to be backwards compatible to "
"the version of cmake specified, if a newer version of cmake is " "the version of cmake specified, if a newer version of cmake is "
......
...@@ -38,7 +38,7 @@ public: ...@@ -38,7 +38,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "CONFIGURE_FILE";} virtual const char* GetName() { return "configure_file";}
/** /**
* This determines if the command is invoked when in script mode. * This determines if the command is invoked when in script mode.
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" CONFIGURE_FILE(InputFile OutputFile\n" " configure_file(InputFile OutputFile\n"
" [COPYONLY] [ESCAPE_QUOTES] [@ONLY])\n" " [COPYONLY] [ESCAPE_QUOTES] [@ONLY])\n"
"The Input and Ouput files have to have full paths. " "The Input and Ouput files have to have full paths. "
"This command replaces any variables in the input file referenced as " "This command replaces any variables in the input file referenced as "
......
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() {return "CREATE_TEST_SOURCELIST";} virtual const char* GetName() {return "create_test_sourcelist";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" CREATE_TEST_SOURCELIST(SourceListName DriverName\n" " create_test_sourcelist(SourceListName DriverName\n"
" test1 test2 test3\n" " test1 test2 test3\n"
" EXTRA_INCLUDE include.h\n" " EXTRA_INCLUDE include.h\n"
" FUNCTION function)\n" " FUNCTION function)\n"
......
...@@ -36,7 +36,7 @@ public: ...@@ -36,7 +36,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "DEFINE_PROPERTY";} virtual const char* GetName() { return "define_property";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" DEFINE_PROPERTY(property_name scope_value\n" " define_property(property_name scope_value\n"
" short_description\n" " short_description\n"
" full_description inherit)\n" " full_description inherit)\n"
"Define a property for a scope. scope_value is either GLOBAL, " "Define a property for a scope. scope_value is either GLOBAL, "
......
...@@ -696,7 +696,7 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv) ...@@ -696,7 +696,7 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv)
help.HelpType = cmDocumentation::Usage; help.HelpType = cmDocumentation::Usage;
help.HelpForm = cmDocumentation::UsageForm; help.HelpForm = cmDocumentation::UsageForm;
GET_OPT_ARGUMENT(help.Argument); GET_OPT_ARGUMENT(help.Argument);
help.Argument = cmSystemTools::UpperCase(help.Argument); help.Argument = cmSystemTools::LowerCase(help.Argument);
// special case for single command // special case for single command
if (!help.Argument.empty()) if (!help.Argument.empty())
{ {
...@@ -756,7 +756,7 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv) ...@@ -756,7 +756,7 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv)
help.HelpType = cmDocumentation::Single; help.HelpType = cmDocumentation::Single;
GET_OPT_ARGUMENT(help.Argument); GET_OPT_ARGUMENT(help.Argument);
GET_OPT_ARGUMENT(help.Filename); GET_OPT_ARGUMENT(help.Filename);
help.Argument = cmSystemTools::UpperCase(help.Argument); help.Argument = cmSystemTools::LowerCase(help.Argument);
help.HelpForm = this->GetFormFromFilename(help.Filename); help.HelpForm = this->GetFormFromFilename(help.Filename);
} }
else if(strcmp(argv[i], "--help-module") == 0) else if(strcmp(argv[i], "--help-module") == 0)
......
...@@ -49,14 +49,14 @@ public: ...@@ -49,14 +49,14 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "ELSE";} virtual const char* GetName() { return "else";}
/** /**
* Succinct documentation. * Succinct documentation.
*/ */
virtual const char* GetTerseDocumentation() virtual const char* GetTerseDocumentation()
{ {
return "Starts the ELSE portion of an IF block."; return "Starts the else portion of an if block.";
} }
/** /**
...@@ -65,8 +65,8 @@ public: ...@@ -65,8 +65,8 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ELSE(expression)\n" " else(expression)\n"
"See the IF command."; "See the if command.";
} }
cmTypeMacro(cmElseCommand, cmCommand); cmTypeMacro(cmElseCommand, cmCommand);
......
...@@ -49,14 +49,14 @@ public: ...@@ -49,14 +49,14 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "ELSEIF";} virtual const char* GetName() { return "elseif";}
/** /**
* Succinct documentation. * Succinct documentation.
*/ */
virtual const char* GetTerseDocumentation() virtual const char* GetTerseDocumentation()
{ {
return "Starts the ELSEIF portion of an IF block."; return "Starts the elseif portion of an if block.";
} }
/** /**
...@@ -65,8 +65,8 @@ public: ...@@ -65,8 +65,8 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ELSEIF(expression)\n" " elseif(expression)\n"
"See the IF command."; "See the if command.";
} }
cmTypeMacro(cmElseIfCommand, cmCommand); cmTypeMacro(cmElseIfCommand, cmCommand);
......
...@@ -47,7 +47,7 @@ public: ...@@ -47,7 +47,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() {return "ENABLE_LANGUAGE";} virtual const char* GetName() {return "enable_language";}
/** /**
* Succinct documentation. * Succinct documentation.
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
virtual const char* GetFullDocumentation() virtual const char* GetFullDocumentation()
{ {
return return
" ENABLE_LANGUAGE(languageName [OPTIONAL] )\n" " enable_language(languageName [OPTIONAL] )\n"
"This command enables support for the named language in CMake. " "This command enables support for the named language in CMake. "
"This is the same as the project command but does not create " "This is the same as the project command but does not create "
"any of the extra varaibles that are created by the project command. " "any of the extra varaibles that are created by the project command. "
......
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
/** /**
* The name of the command as specified in CMakeList.txt. * The name of the command as specified in CMakeList.txt.
*/ */
virtual const char* GetName() { return "ENABLE_TESTING";} virtual const char* GetName() { return "enable_testing";}
/** /**