diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h index 08887fe8e..2632ebc47 100644 --- a/Source/CTest/cmCTestBuildCommand.h +++ b/Source/CTest/cmCTestBuildCommand.h @@ -43,7 +43,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_build";} + virtual std::string GetName() const { return "ctest_build";} virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); diff --git a/Source/CTest/cmCTestConfigureCommand.h b/Source/CTest/cmCTestConfigureCommand.h index b592c5a2c..7941d4e3c 100644 --- a/Source/CTest/cmCTestConfigureCommand.h +++ b/Source/CTest/cmCTestConfigureCommand.h @@ -38,7 +38,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_configure";} + virtual std::string GetName() const { return "ctest_configure";} cmTypeMacro(cmCTestConfigureCommand, cmCTestHandlerCommand); diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h index 37315922c..5762e0731 100644 --- a/Source/CTest/cmCTestCoverageCommand.h +++ b/Source/CTest/cmCTestCoverageCommand.h @@ -39,7 +39,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_coverage";} + virtual std::string GetName() const { return "ctest_coverage";} cmTypeMacro(cmCTestCoverageCommand, cmCTestHandlerCommand); diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h index 07e59a46c..d182d1794 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h @@ -48,7 +48,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_empty_binary_directory";} + virtual std::string GetName() const { return "ctest_empty_binary_directory";} cmTypeMacro(cmCTestEmptyBinaryDirectoryCommand, cmCTestCommand); diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h index b50170df1..e239d4642 100644 --- a/Source/CTest/cmCTestMemCheckCommand.h +++ b/Source/CTest/cmCTestMemCheckCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_memcheck";} + virtual std::string GetName() const { return "ctest_memcheck";} cmTypeMacro(cmCTestMemCheckCommand, cmCTestTestCommand); diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h index 9c0af8198..c95694ae5 100644 --- a/Source/CTest/cmCTestReadCustomFilesCommand.h +++ b/Source/CTest/cmCTestReadCustomFilesCommand.h @@ -46,7 +46,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_read_custom_files";} + virtual std::string GetName() const { return "ctest_read_custom_files";} cmTypeMacro(cmCTestReadCustomFilesCommand, cmCTestCommand); diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h index f34bd133c..0998e5c62 100644 --- a/Source/CTest/cmCTestRunScriptCommand.h +++ b/Source/CTest/cmCTestRunScriptCommand.h @@ -47,7 +47,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_run_script";} + virtual std::string GetName() const { return "ctest_run_script";} cmTypeMacro(cmCTestRunScriptCommand, cmCTestCommand); }; diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h index c6baf1c57..740a7e12a 100644 --- a/Source/CTest/cmCTestSleepCommand.h +++ b/Source/CTest/cmCTestSleepCommand.h @@ -47,7 +47,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_sleep";} + virtual std::string GetName() const { return "ctest_sleep";} cmTypeMacro(cmCTestSleepCommand, cmCTestCommand); diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h index e5535c110..3b8843f35 100644 --- a/Source/CTest/cmCTestStartCommand.h +++ b/Source/CTest/cmCTestStartCommand.h @@ -55,7 +55,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_start";} + virtual std::string GetName() const { return "ctest_start";} cmTypeMacro(cmCTestStartCommand, cmCTestCommand); diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h index 64c6cae26..3673fbdec 100644 --- a/Source/CTest/cmCTestSubmitCommand.h +++ b/Source/CTest/cmCTestSubmitCommand.h @@ -48,7 +48,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_submit";} + virtual std::string GetName() const { return "ctest_submit";} cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand); diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h index 451ac99ff..a1e5f368f 100644 --- a/Source/CTest/cmCTestTestCommand.h +++ b/Source/CTest/cmCTestTestCommand.h @@ -39,7 +39,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_test";} + virtual std::string GetName() const { return "ctest_test";} cmTypeMacro(cmCTestTestCommand, cmCTestHandlerCommand); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index b1dddcb03..59706568f 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -60,7 +60,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "subdirs";} + virtual std::string GetName() const { return "subdirs";} cmTypeMacro(cmCTestSubdirCommand, cmCommand); @@ -157,7 +157,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "add_subdirectory";} + virtual std::string GetName() const { return "add_subdirectory";} cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand); @@ -243,7 +243,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "add_test";} + virtual std::string GetName() const { return "add_test";} cmTypeMacro(cmCTestAddTestCommand, cmCommand); @@ -287,7 +287,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "set_tests_properties";} + virtual std::string GetName() const { return "set_tests_properties";} cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand); diff --git a/Source/CTest/cmCTestUpdateCommand.h b/Source/CTest/cmCTestUpdateCommand.h index a785bd860..fb80333b7 100644 --- a/Source/CTest/cmCTestUpdateCommand.h +++ b/Source/CTest/cmCTestUpdateCommand.h @@ -39,7 +39,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_update";} + virtual std::string GetName() const { return "ctest_update";} cmTypeMacro(cmCTestUpdateCommand, cmCTestHandlerCommand); diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h index e867fb687..4a07608d2 100644 --- a/Source/CTest/cmCTestUploadCommand.h +++ b/Source/CTest/cmCTestUploadCommand.h @@ -43,7 +43,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "ctest_upload";} + virtual std::string GetName() const { return "ctest_upload";} cmTypeMacro(cmCTestUploadCommand, cmCTestHandlerCommand); diff --git a/Source/cmAddCompileOptionsCommand.h b/Source/cmAddCompileOptionsCommand.h index 38ed2089f..f147ec04e 100644 --- a/Source/cmAddCompileOptionsCommand.h +++ b/Source/cmAddCompileOptionsCommand.h @@ -35,7 +35,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "add_compile_options";} + virtual std::string GetName() const {return "add_compile_options";} cmTypeMacro(cmAddCompileOptionsCommand, cmCommand); }; diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h index 114957f18..1d6ddb288 100644 --- a/Source/cmAddCustomCommandCommand.h +++ b/Source/cmAddCustomCommandCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "add_custom_command";} + virtual std::string GetName() const {return "add_custom_command";} cmTypeMacro(cmAddCustomCommandCommand, cmCommand); protected: diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h index d0fcdad77..d2b00adf4 100644 --- a/Source/cmAddCustomTargetCommand.h +++ b/Source/cmAddCustomTargetCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const + virtual std::string GetName() const {return "add_custom_target";} cmTypeMacro(cmAddCustomTargetCommand, cmCommand); diff --git a/Source/cmAddDefinitionsCommand.h b/Source/cmAddDefinitionsCommand.h index d05f1875e..9800fd291 100644 --- a/Source/cmAddDefinitionsCommand.h +++ b/Source/cmAddDefinitionsCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "add_definitions";} + virtual std::string GetName() const {return "add_definitions";} cmTypeMacro(cmAddDefinitionsCommand, cmCommand); }; diff --git a/Source/cmAddDependenciesCommand.h b/Source/cmAddDependenciesCommand.h index 247cc5465..db3712a24 100644 --- a/Source/cmAddDependenciesCommand.h +++ b/Source/cmAddDependenciesCommand.h @@ -40,7 +40,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "add_dependencies";} + virtual std::string GetName() const { return "add_dependencies";} cmTypeMacro(cmAddDependenciesCommand, cmCommand); }; diff --git a/Source/cmAddExecutableCommand.h b/Source/cmAddExecutableCommand.h index 30ecce3df..e134077b5 100644 --- a/Source/cmAddExecutableCommand.h +++ b/Source/cmAddExecutableCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "add_executable";} + virtual std::string GetName() const { return "add_executable";} cmTypeMacro(cmAddExecutableCommand, cmCommand); }; diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h index 10010439f..350708b23 100644 --- a/Source/cmAddLibraryCommand.h +++ b/Source/cmAddLibraryCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "add_library";} + virtual std::string GetName() const { return "add_library";} cmTypeMacro(cmAddLibraryCommand, cmCommand); }; diff --git a/Source/cmAddSubDirectoryCommand.h b/Source/cmAddSubDirectoryCommand.h index 1e5b1abdd..abf3efcd9 100644 --- a/Source/cmAddSubDirectoryCommand.h +++ b/Source/cmAddSubDirectoryCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "add_subdirectory";} + virtual std::string GetName() const { return "add_subdirectory";} cmTypeMacro(cmAddSubDirectoryCommand, cmCommand); }; diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h index 9173454dc..624288f57 100644 --- a/Source/cmAddTestCommand.h +++ b/Source/cmAddTestCommand.h @@ -40,7 +40,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "add_test";} + virtual std::string GetName() const { return "add_test";} cmTypeMacro(cmAddTestCommand, cmCommand); private: diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h index 8b5fa8ab1..6615273bb 100644 --- a/Source/cmAuxSourceDirectoryCommand.h +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -44,7 +44,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "aux_source_directory";} + virtual std::string GetName() const { return "aux_source_directory";} cmTypeMacro(cmAuxSourceDirectoryCommand, cmCommand); }; diff --git a/Source/cmBreakCommand.h b/Source/cmBreakCommand.h index 52f0e9c47..1fcae505a 100644 --- a/Source/cmBreakCommand.h +++ b/Source/cmBreakCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "break";} + virtual std::string GetName() const {return "break";} cmTypeMacro(cmBreakCommand, cmCommand); }; diff --git a/Source/cmBuildCommand.h b/Source/cmBuildCommand.h index 21606555e..3fb618f9c 100644 --- a/Source/cmBuildCommand.h +++ b/Source/cmBuildCommand.h @@ -50,7 +50,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "build_command";} + virtual std::string GetName() const {return "build_command";} cmTypeMacro(cmBuildCommand, cmCommand); }; diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h index 2f7acdeb7..8f8038feb 100644 --- a/Source/cmBuildNameCommand.h +++ b/Source/cmBuildNameCommand.h @@ -21,7 +21,7 @@ public: virtual cmCommand* Clone() { return new cmBuildNameCommand; } virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - virtual const char* GetName() const {return "build_name";} + virtual std::string GetName() const {return "build_name";} virtual bool IsScriptable() const { return true; } virtual bool IsDiscouraged() const { return true; } }; diff --git a/Source/cmCMakeHostSystemInformationCommand.h b/Source/cmCMakeHostSystemInformationCommand.h index 27ba638e8..463b180b3 100644 --- a/Source/cmCMakeHostSystemInformationCommand.h +++ b/Source/cmCMakeHostSystemInformationCommand.h @@ -48,7 +48,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const + virtual std::string GetName() const { return "cmake_host_system_information"; } diff --git a/Source/cmCMakeMinimumRequired.h b/Source/cmCMakeMinimumRequired.h index 0cdd4c523..31b727198 100644 --- a/Source/cmCMakeMinimumRequired.h +++ b/Source/cmCMakeMinimumRequired.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "cmake_minimum_required";} + virtual std::string GetName() const {return "cmake_minimum_required";} cmTypeMacro(cmCMakeMinimumRequired, cmCommand); diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h index 7e3f4e6e2..8dc8fbeed 100644 --- a/Source/cmCMakePolicyCommand.h +++ b/Source/cmCMakePolicyCommand.h @@ -46,7 +46,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "cmake_policy";} + virtual std::string GetName() const {return "cmake_policy";} cmTypeMacro(cmCMakePolicyCommand, cmCommand); private: diff --git a/Source/cmCommand.h b/Source/cmCommand.h index 2378ef0f8..b15869a70 100644 --- a/Source/cmCommand.h +++ b/Source/cmCommand.h @@ -124,7 +124,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const = 0; + virtual std::string GetName() const = 0; /** * Enable the command. diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h index 86de92c1d..8155ef736 100644 --- a/Source/cmConfigureFileCommand.h +++ b/Source/cmConfigureFileCommand.h @@ -34,7 +34,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "configure_file";} + virtual std::string GetName() const { return "configure_file";} /** * This determines if the command is invoked when in script mode. diff --git a/Source/cmCreateTestSourceList.h b/Source/cmCreateTestSourceList.h index 8b1e4deaf..2f6b541f8 100644 --- a/Source/cmCreateTestSourceList.h +++ b/Source/cmCreateTestSourceList.h @@ -40,7 +40,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "create_test_sourcelist";} + virtual std::string GetName() const {return "create_test_sourcelist";} cmTypeMacro(cmCreateTestSourceList, cmCommand); }; diff --git a/Source/cmDefinePropertyCommand.h b/Source/cmDefinePropertyCommand.h index 8dc4d963a..bc5c8a4f8 100644 --- a/Source/cmDefinePropertyCommand.h +++ b/Source/cmDefinePropertyCommand.h @@ -32,7 +32,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "define_property";} + virtual std::string GetName() const { return "define_property";} cmTypeMacro(cmDefinePropertyCommand, cmCommand); private: diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h index 636860d35..d796da84b 100644 --- a/Source/cmDocumentationSection.h +++ b/Source/cmDocumentationSection.h @@ -34,8 +34,8 @@ public: void Clear() { this->Entries.clear(); } /** Return the name of this section. */ - const char* GetName() const - { return this->Name.c_str(); } + std::string GetName() const + { return this->Name; } /** Return a pointer to the first entry of this section. */ const std::vector &GetEntries() const diff --git a/Source/cmElseCommand.h b/Source/cmElseCommand.h index d472e99a7..dde5fcc61 100644 --- a/Source/cmElseCommand.h +++ b/Source/cmElseCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "else";} + virtual std::string GetName() const { return "else";} cmTypeMacro(cmElseCommand, cmCommand); }; diff --git a/Source/cmElseIfCommand.h b/Source/cmElseIfCommand.h index d811b35cc..c627cbe5e 100644 --- a/Source/cmElseIfCommand.h +++ b/Source/cmElseIfCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "elseif";} + virtual std::string GetName() const { return "elseif";} cmTypeMacro(cmElseIfCommand, cmCommand); }; diff --git a/Source/cmEnableLanguageCommand.h b/Source/cmEnableLanguageCommand.h index a248042ac..2b09e1186 100644 --- a/Source/cmEnableLanguageCommand.h +++ b/Source/cmEnableLanguageCommand.h @@ -43,7 +43,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "enable_language";} + virtual std::string GetName() const {return "enable_language";} cmTypeMacro(cmEnableLanguageCommand, cmCommand); }; diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h index e102f5e43..d028c59b4 100644 --- a/Source/cmEnableTestingCommand.h +++ b/Source/cmEnableTestingCommand.h @@ -48,7 +48,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "enable_testing";} + virtual std::string GetName() const { return "enable_testing";} cmTypeMacro(cmEnableTestingCommand, cmCommand); diff --git a/Source/cmEndForEachCommand.h b/Source/cmEndForEachCommand.h index 44d29b56f..c3be3879b 100644 --- a/Source/cmEndForEachCommand.h +++ b/Source/cmEndForEachCommand.h @@ -52,7 +52,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "endforeach";} + virtual std::string GetName() const { return "endforeach";} cmTypeMacro(cmEndForEachCommand, cmCommand); }; diff --git a/Source/cmEndFunctionCommand.h b/Source/cmEndFunctionCommand.h index 4fdca6bc6..3a42c1743 100644 --- a/Source/cmEndFunctionCommand.h +++ b/Source/cmEndFunctionCommand.h @@ -52,7 +52,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "endfunction";} + virtual std::string GetName() const { return "endfunction";} cmTypeMacro(cmEndFunctionCommand, cmCommand); }; diff --git a/Source/cmEndIfCommand.h b/Source/cmEndIfCommand.h index 634da60cc..a8248c81a 100644 --- a/Source/cmEndIfCommand.h +++ b/Source/cmEndIfCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "endif";} + virtual std::string GetName() const { return "endif";} cmTypeMacro(cmEndIfCommand, cmCommand); }; diff --git a/Source/cmEndMacroCommand.h b/Source/cmEndMacroCommand.h index db15f2742..fdc04eebb 100644 --- a/Source/cmEndMacroCommand.h +++ b/Source/cmEndMacroCommand.h @@ -52,7 +52,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "endmacro";} + virtual std::string GetName() const { return "endmacro";} cmTypeMacro(cmEndMacroCommand, cmCommand); }; diff --git a/Source/cmEndWhileCommand.h b/Source/cmEndWhileCommand.h index 41138d1a9..ec1cb652f 100644 --- a/Source/cmEndWhileCommand.h +++ b/Source/cmEndWhileCommand.h @@ -52,7 +52,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "endwhile";} + virtual std::string GetName() const { return "endwhile";} cmTypeMacro(cmEndWhileCommand, cmCommand); }; diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h index 6d28cdcc7..23d10f9f1 100644 --- a/Source/cmExecProgramCommand.h +++ b/Source/cmExecProgramCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const + virtual std::string GetName() const {return "exec_program";} /** diff --git a/Source/cmExecuteProcessCommand.h b/Source/cmExecuteProcessCommand.h index bd0f783b6..6906a08a8 100644 --- a/Source/cmExecuteProcessCommand.h +++ b/Source/cmExecuteProcessCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const + virtual std::string GetName() const {return "execute_process";} /** diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h index c0e445f8a..f9506bbdd 100644 --- a/Source/cmExportCommand.h +++ b/Source/cmExportCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "export";} + virtual std::string GetName() const { return "export";} cmTypeMacro(cmExportCommand, cmCommand); diff --git a/Source/cmExportLibraryDependenciesCommand.h b/Source/cmExportLibraryDependenciesCommand.h index 29b568fc8..2ea4e79b9 100644 --- a/Source/cmExportLibraryDependenciesCommand.h +++ b/Source/cmExportLibraryDependenciesCommand.h @@ -21,7 +21,7 @@ public: virtual cmCommand* Clone() { return new cmExportLibraryDependenciesCommand; } virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - virtual const char* GetName() const { return "export_library_dependencies";} + virtual std::string GetName() const { return "export_library_dependencies";} virtual bool IsDiscouraged() const { return true; } virtual void FinalPass(); diff --git a/Source/cmFLTKWrapUICommand.h b/Source/cmFLTKWrapUICommand.h index b94390ca9..617fcd955 100644 --- a/Source/cmFLTKWrapUICommand.h +++ b/Source/cmFLTKWrapUICommand.h @@ -52,7 +52,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "fltk_wrap_ui";} + virtual std::string GetName() const { return "fltk_wrap_ui";} private: /** diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h index ba4581516..8d66fdf18 100644 --- a/Source/cmFileCommand.h +++ b/Source/cmFileCommand.h @@ -46,7 +46,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "file";} + virtual std::string GetName() const { return "file";} cmTypeMacro(cmFileCommand, cmCommand); diff --git a/Source/cmFindFileCommand.h b/Source/cmFindFileCommand.h index 3f0baa2cd..daf1d6582 100644 --- a/Source/cmFindFileCommand.h +++ b/Source/cmFindFileCommand.h @@ -33,7 +33,7 @@ public: { return new cmFindFileCommand; } - virtual const char* GetName() const { return "find_file";} + virtual std::string GetName() const { return "find_file";} cmTypeMacro(cmFindFileCommand, cmFindPathCommand); }; diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h index a9ec40e93..e25717446 100644 --- a/Source/cmFindLibraryCommand.h +++ b/Source/cmFindLibraryCommand.h @@ -49,7 +49,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "find_library";} + virtual std::string GetName() const {return "find_library";} cmTypeMacro(cmFindLibraryCommand, cmFindBase); diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index 72c1e3c9e..224945948 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -49,7 +49,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "find_package";} + virtual std::string GetName() const { return "find_package";} cmTypeMacro(cmFindPackageCommand, cmFindCommon); private: diff --git a/Source/cmFindPathCommand.h b/Source/cmFindPathCommand.h index 8df4540dc..a51da7920 100644 --- a/Source/cmFindPathCommand.h +++ b/Source/cmFindPathCommand.h @@ -49,7 +49,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "find_path";} + virtual std::string GetName() const {return "find_path";} cmTypeMacro(cmFindPathCommand, cmFindBase); bool IncludeFileInPath; diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h index 7f4811c0a..70f758ff8 100644 --- a/Source/cmFindProgramCommand.h +++ b/Source/cmFindProgramCommand.h @@ -48,7 +48,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "find_program";} + virtual std::string GetName() const { return "find_program";} cmTypeMacro(cmFindProgramCommand, cmFindBase); diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h index e548ba8d8..9b7c85a4d 100644 --- a/Source/cmForEachCommand.h +++ b/Source/cmForEachCommand.h @@ -59,7 +59,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "foreach";} + virtual std::string GetName() const { return "foreach";} cmTypeMacro(cmForEachCommand, cmCommand); private: diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx index 85b89d9ab..9b981a320 100644 --- a/Source/cmFunctionCommand.cxx +++ b/Source/cmFunctionCommand.cxx @@ -64,7 +64,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return this->Args[0].c_str(); } + virtual std::string GetName() const { return this->Args[0]; } cmTypeMacro(cmFunctionHelperCommand, cmCommand); diff --git a/Source/cmFunctionCommand.h b/Source/cmFunctionCommand.h index a8bd3e784..2df435e71 100644 --- a/Source/cmFunctionCommand.h +++ b/Source/cmFunctionCommand.h @@ -57,7 +57,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "function";} + virtual std::string GetName() const { return "function";} cmTypeMacro(cmFunctionCommand, cmCommand); }; diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h index 6c58bb44a..15114064e 100644 --- a/Source/cmGetCMakePropertyCommand.h +++ b/Source/cmGetCMakePropertyCommand.h @@ -37,7 +37,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "get_cmake_property";} + virtual std::string GetName() const { return "get_cmake_property";} cmTypeMacro(cmGetCMakePropertyCommand, cmCommand); }; diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h index aea04ad17..6c5750a9c 100644 --- a/Source/cmGetDirectoryPropertyCommand.h +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -37,7 +37,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "get_directory_property";} + virtual std::string GetName() const { return "get_directory_property";} cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand); }; diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h index e2cd21960..534de53d1 100644 --- a/Source/cmGetFilenameComponentCommand.h +++ b/Source/cmGetFilenameComponentCommand.h @@ -46,7 +46,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "get_filename_component";} + virtual std::string GetName() const { return "get_filename_component";} cmTypeMacro(cmGetFilenameComponentCommand, cmCommand); }; diff --git a/Source/cmGetPropertyCommand.h b/Source/cmGetPropertyCommand.h index e1630ffb3..8c3738fbd 100644 --- a/Source/cmGetPropertyCommand.h +++ b/Source/cmGetPropertyCommand.h @@ -39,7 +39,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "get_property";} + virtual std::string GetName() const { return "get_property";} cmTypeMacro(cmGetPropertyCommand, cmCommand); private: diff --git a/Source/cmGetSourceFilePropertyCommand.h b/Source/cmGetSourceFilePropertyCommand.h index 338318eb5..ab8ce365b 100644 --- a/Source/cmGetSourceFilePropertyCommand.h +++ b/Source/cmGetSourceFilePropertyCommand.h @@ -32,7 +32,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "get_source_file_property";} + virtual std::string GetName() const { return "get_source_file_property";} cmTypeMacro(cmGetSourceFilePropertyCommand, cmCommand); }; diff --git a/Source/cmGetTargetPropertyCommand.h b/Source/cmGetTargetPropertyCommand.h index 4985b3c62..a35c6fe9d 100644 --- a/Source/cmGetTargetPropertyCommand.h +++ b/Source/cmGetTargetPropertyCommand.h @@ -32,7 +32,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "get_target_property";} + virtual std::string GetName() const { return "get_target_property";} cmTypeMacro(cmGetTargetPropertyCommand, cmCommand); }; diff --git a/Source/cmGetTestPropertyCommand.h b/Source/cmGetTestPropertyCommand.h index 2dccabe77..2819492ee 100644 --- a/Source/cmGetTestPropertyCommand.h +++ b/Source/cmGetTestPropertyCommand.h @@ -32,7 +32,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "get_test_property";} + virtual std::string GetName() const { return "get_test_property";} cmTypeMacro(cmGetTestPropertyCommand, cmCommand); }; diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index 02d87edee..b9de84572 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -63,7 +63,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "if";} + virtual std::string GetName() const { return "if";} /** * This determines if the command is invoked when in script mode. diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h index 267723d49..0dcd7de8b 100644 --- a/Source/cmIncludeCommand.h +++ b/Source/cmIncludeCommand.h @@ -46,7 +46,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "include";} + virtual std::string GetName() const {return "include";} cmTypeMacro(cmIncludeCommand, cmCommand); }; diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h index c621dcbc7..6cc2c8335 100644 --- a/Source/cmIncludeDirectoryCommand.h +++ b/Source/cmIncludeDirectoryCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "include_directories";} + virtual std::string GetName() const { return "include_directories";} cmTypeMacro(cmIncludeDirectoryCommand, cmCommand); diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h index 8ca674fb1..081f77a01 100644 --- a/Source/cmIncludeExternalMSProjectCommand.h +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "include_external_msproject";} + virtual std::string GetName() const {return "include_external_msproject";} cmTypeMacro(cmIncludeExternalMSProjectCommand, cmCommand); }; diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h index 0c5fa6f93..c58f01876 100644 --- a/Source/cmIncludeRegularExpressionCommand.h +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "include_regular_expression";} + virtual std::string GetName() const {return "include_regular_expression";} cmTypeMacro(cmIncludeRegularExpressionCommand, cmCommand); }; diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h index 9db2490ba..8e14a0828 100644 --- a/Source/cmInstallCommand.h +++ b/Source/cmInstallCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "install";} + virtual std::string GetName() const { return "install";} cmTypeMacro(cmInstallCommand, cmCommand); diff --git a/Source/cmInstallFilesCommand.h b/Source/cmInstallFilesCommand.h index 5583fe455..4551ab14f 100644 --- a/Source/cmInstallFilesCommand.h +++ b/Source/cmInstallFilesCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "install_files";} + virtual std::string GetName() const { return "install_files";} /** * This is called at the end after all the information diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h index 95acfa298..90c7ba3ac 100644 --- a/Source/cmInstallProgramsCommand.h +++ b/Source/cmInstallProgramsCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "install_programs";} + virtual std::string GetName() const { return "install_programs";} /** * This is called at the end after all the information diff --git a/Source/cmInstallTargetsCommand.h b/Source/cmInstallTargetsCommand.h index 2aa34dbe3..e6cbe6e35 100644 --- a/Source/cmInstallTargetsCommand.h +++ b/Source/cmInstallTargetsCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "install_targets";} + virtual std::string GetName() const { return "install_targets";} /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index c6eb40ce5..8e04bafcd 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -43,7 +43,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "link_directories";} + virtual std::string GetName() const { return "link_directories";} cmTypeMacro(cmLinkDirectoriesCommand, cmCommand); private: diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h index 74de23c53..c572439e5 100644 --- a/Source/cmLinkLibrariesCommand.h +++ b/Source/cmLinkLibrariesCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "link_libraries";} + virtual std::string GetName() const { return "link_libraries";} /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h index b79ff0d72..5ea1d9f18 100644 --- a/Source/cmListCommand.h +++ b/Source/cmListCommand.h @@ -44,7 +44,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "list";} + virtual std::string GetName() const { return "list";} cmTypeMacro(cmListCommand, cmCommand); protected: diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h index ff8625f37..04207d0dd 100644 --- a/Source/cmLoadCacheCommand.h +++ b/Source/cmLoadCacheCommand.h @@ -40,7 +40,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "load_cache";} + virtual std::string GetName() const { return "load_cache";} cmTypeMacro(cmLoadCacheCommand, cmCommand); protected: diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 21ee0fe45..36e9980a4 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -69,7 +69,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return info.Name; } + virtual std::string GetName() const { return info.Name; } static const char* LastName; static void TrapsForSignals(int sig) diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h index 11bcf097d..45812694f 100644 --- a/Source/cmLoadCommandCommand.h +++ b/Source/cmLoadCommandCommand.h @@ -20,7 +20,7 @@ public: virtual cmCommand* Clone() { return new cmLoadCommandCommand; } virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - virtual const char* GetName() const {return "load_command";} + virtual std::string GetName() const {return "load_command";} virtual bool IsDiscouraged() const { return true; } cmTypeMacro(cmLoadCommandCommand, cmCommand); }; diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx index 499d3c675..9d253b8fc 100644 --- a/Source/cmMacroCommand.cxx +++ b/Source/cmMacroCommand.cxx @@ -65,7 +65,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return this->Args[0].c_str(); } + virtual std::string GetName() const { return this->Args[0]; } cmTypeMacro(cmMacroHelperCommand, cmCommand); diff --git a/Source/cmMacroCommand.h b/Source/cmMacroCommand.h index 4c585d850..5c1cc000a 100644 --- a/Source/cmMacroCommand.h +++ b/Source/cmMacroCommand.h @@ -57,7 +57,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "macro";} + virtual std::string GetName() const { return "macro";} cmTypeMacro(cmMacroCommand, cmCommand); }; diff --git a/Source/cmMakeDirectoryCommand.h b/Source/cmMakeDirectoryCommand.h index 49a4009f2..71b97eb28 100644 --- a/Source/cmMakeDirectoryCommand.h +++ b/Source/cmMakeDirectoryCommand.h @@ -44,7 +44,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "make_directory";} + virtual std::string GetName() const { return "make_directory";} /** * This determines if the command is invoked when in script mode. diff --git a/Source/cmMarkAsAdvancedCommand.h b/Source/cmMarkAsAdvancedCommand.h index b65e4a87e..38064a326 100644 --- a/Source/cmMarkAsAdvancedCommand.h +++ b/Source/cmMarkAsAdvancedCommand.h @@ -40,7 +40,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "mark_as_advanced";} + virtual std::string GetName() const {return "mark_as_advanced";} /** * This determines if the command is invoked when in script mode. diff --git a/Source/cmMathCommand.h b/Source/cmMathCommand.h index c826ef162..76dc102bd 100644 --- a/Source/cmMathCommand.h +++ b/Source/cmMathCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "math";} + virtual std::string GetName() const { return "math";} cmTypeMacro(cmMathCommand, cmCommand); protected: diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h index fec9a3233..c0ae2a322 100644 --- a/Source/cmMessageCommand.h +++ b/Source/cmMessageCommand.h @@ -39,7 +39,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "message";} + virtual std::string GetName() const { return "message";} /** * This determines if the command is invoked when in script mode. diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h index 89e3ac122..12a647227 100644 --- a/Source/cmOptionCommand.h +++ b/Source/cmOptionCommand.h @@ -40,7 +40,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "option";} + virtual std::string GetName() const {return "option";} /** * This determines if the command is invoked when in script mode. diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h index dd5ed6c83..95eba38ec 100644 --- a/Source/cmOutputRequiredFilesCommand.h +++ b/Source/cmOutputRequiredFilesCommand.h @@ -22,7 +22,7 @@ public: virtual cmCommand* Clone() { return new cmOutputRequiredFilesCommand; } virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - virtual const char* GetName() const { return "output_required_files";} + virtual std::string GetName() const { return "output_required_files";} virtual bool IsDiscouraged() const { return true; } void ListDependencies(cmDependInformation const *info, diff --git a/Source/cmProjectCommand.h b/Source/cmProjectCommand.h index f7d086d36..7aacb5537 100644 --- a/Source/cmProjectCommand.h +++ b/Source/cmProjectCommand.h @@ -43,7 +43,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "project";} + virtual std::string GetName() const {return "project";} cmTypeMacro(cmProjectCommand, cmCommand); }; diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h index 868eb91fa..85729ddc9 100644 --- a/Source/cmQTWrapCPPCommand.h +++ b/Source/cmQTWrapCPPCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "qt_wrap_cpp";} + virtual std::string GetName() const { return "qt_wrap_cpp";} }; diff --git a/Source/cmQTWrapUICommand.h b/Source/cmQTWrapUICommand.h index 3406dac3f..4aa9a614a 100644 --- a/Source/cmQTWrapUICommand.h +++ b/Source/cmQTWrapUICommand.h @@ -43,7 +43,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "qt_wrap_ui";} + virtual std::string GetName() const { return "qt_wrap_ui";} }; diff --git a/Source/cmRemoveCommand.h b/Source/cmRemoveCommand.h index ad739088f..94161f8e3 100644 --- a/Source/cmRemoveCommand.h +++ b/Source/cmRemoveCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "remove";} + virtual std::string GetName() const {return "remove";} /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const diff --git a/Source/cmRemoveDefinitionsCommand.h b/Source/cmRemoveDefinitionsCommand.h index 4e291fc38..cac94bef2 100644 --- a/Source/cmRemoveDefinitionsCommand.h +++ b/Source/cmRemoveDefinitionsCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "remove_definitions";} + virtual std::string GetName() const {return "remove_definitions";} cmTypeMacro(cmRemoveDefinitionsCommand, cmCommand); }; diff --git a/Source/cmReturnCommand.h b/Source/cmReturnCommand.h index 2822b62c4..4ff81effa 100644 --- a/Source/cmReturnCommand.h +++ b/Source/cmReturnCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "return";} + virtual std::string GetName() const {return "return";} cmTypeMacro(cmReturnCommand, cmCommand); }; diff --git a/Source/cmSeparateArgumentsCommand.h b/Source/cmSeparateArgumentsCommand.h index ce0236043..a527ae7b2 100644 --- a/Source/cmSeparateArgumentsCommand.h +++ b/Source/cmSeparateArgumentsCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "separate_arguments";} + virtual std::string GetName() const {return "separate_arguments";} cmTypeMacro(cmSeparateArgumentsCommand, cmCommand); }; diff --git a/Source/cmSetCommand.h b/Source/cmSetCommand.h index 6cef0a0f5..4adc2d9f0 100644 --- a/Source/cmSetCommand.h +++ b/Source/cmSetCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "set";} + virtual std::string GetName() const {return "set";} cmTypeMacro(cmSetCommand, cmCommand); }; diff --git a/Source/cmSetDirectoryPropertiesCommand.h b/Source/cmSetDirectoryPropertiesCommand.h index 6240598ad..f444a1bb2 100644 --- a/Source/cmSetDirectoryPropertiesCommand.h +++ b/Source/cmSetDirectoryPropertiesCommand.h @@ -37,7 +37,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "set_directory_properties";} + virtual std::string GetName() const { return "set_directory_properties";} /** * Static entry point for use by other commands diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h index 5757d219c..eaa023362 100644 --- a/Source/cmSetPropertyCommand.h +++ b/Source/cmSetPropertyCommand.h @@ -34,7 +34,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "set_property";} + virtual std::string GetName() const { return "set_property";} /** * This determines if the command is invoked when in script mode. diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h index 8541a9678..5fa5a3ac7 100644 --- a/Source/cmSetSourceFilesPropertiesCommand.h +++ b/Source/cmSetSourceFilesPropertiesCommand.h @@ -32,7 +32,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "set_source_files_properties";} + virtual std::string GetName() const { return "set_source_files_properties";} cmTypeMacro(cmSetSourceFilesPropertiesCommand, cmCommand); diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index cfe35df38..3981ef3d1 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -32,7 +32,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "set_target_properties";} + virtual std::string GetName() const { return "set_target_properties";} /** * Used by this command and cmSetPropertiesCommand diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h index 7f8d57d13..dabe9448d 100644 --- a/Source/cmSetTestsPropertiesCommand.h +++ b/Source/cmSetTestsPropertiesCommand.h @@ -32,7 +32,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "set_tests_properties";} + virtual std::string GetName() const { return "set_tests_properties";} cmTypeMacro(cmSetTestsPropertiesCommand, cmCommand); diff --git a/Source/cmSiteNameCommand.h b/Source/cmSiteNameCommand.h index eb9d4d87e..ec63ef860 100644 --- a/Source/cmSiteNameCommand.h +++ b/Source/cmSiteNameCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "site_name";} + virtual std::string GetName() const {return "site_name";} cmTypeMacro(cmSiteNameCommand, cmCommand); }; diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h index 5d8b48ce9..410411be9 100644 --- a/Source/cmSourceGroupCommand.h +++ b/Source/cmSourceGroupCommand.h @@ -41,7 +41,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "source_group";} + virtual std::string GetName() const {return "source_group";} cmTypeMacro(cmSourceGroupCommand, cmCommand); }; diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index 66b48e69f..b8053c504 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -50,7 +50,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "string";} + virtual std::string GetName() const { return "string";} cmTypeMacro(cmStringCommand, cmCommand); static void ClearMatches(cmMakefile* mf); diff --git a/Source/cmSubdirCommand.h b/Source/cmSubdirCommand.h index 8be8335d0..6addd8f85 100644 --- a/Source/cmSubdirCommand.h +++ b/Source/cmSubdirCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "subdirs";} + virtual std::string GetName() const { return "subdirs";} /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const diff --git a/Source/cmSubdirDependsCommand.h b/Source/cmSubdirDependsCommand.h index f78cfb701..75a568594 100644 --- a/Source/cmSubdirDependsCommand.h +++ b/Source/cmSubdirDependsCommand.h @@ -20,7 +20,7 @@ public: virtual cmCommand* Clone() { return new cmSubdirDependsCommand; } virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - virtual const char* GetName() const { return "subdir_depends";} + virtual std::string GetName() const { return "subdir_depends";} virtual bool IsDiscouraged() const { return true; } cmTypeMacro(cmSubdirDependsCommand, cmCommand); }; diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h index 7405e90a9..5ba9e03cd 100644 --- a/Source/cmTargetCompileDefinitionsCommand.h +++ b/Source/cmTargetCompileDefinitionsCommand.h @@ -36,7 +36,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "target_compile_definitions";} + virtual std::string GetName() const { return "target_compile_definitions";} cmTypeMacro(cmTargetCompileDefinitionsCommand, cmTargetPropCommandBase); diff --git a/Source/cmTargetCompileOptionsCommand.h b/Source/cmTargetCompileOptionsCommand.h index 3713e5a48..d58dc0785 100644 --- a/Source/cmTargetCompileOptionsCommand.h +++ b/Source/cmTargetCompileOptionsCommand.h @@ -36,7 +36,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "target_compile_options";} + virtual std::string GetName() const { return "target_compile_options";} cmTypeMacro(cmTargetCompileOptionsCommand, cmTargetPropCommandBase); diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h index 6863ee5a3..c8b22fbe3 100644 --- a/Source/cmTargetIncludeDirectoriesCommand.h +++ b/Source/cmTargetIncludeDirectoriesCommand.h @@ -37,7 +37,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "target_include_directories";} + virtual std::string GetName() const { return "target_include_directories";} cmTypeMacro(cmTargetIncludeDirectoriesCommand, cmTargetPropCommandBase); diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h index e2f374372..47dd8bd6c 100644 --- a/Source/cmTargetLinkLibrariesCommand.h +++ b/Source/cmTargetLinkLibrariesCommand.h @@ -42,7 +42,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "target_link_libraries";} + virtual std::string GetName() const { return "target_link_libraries";} cmTypeMacro(cmTargetLinkLibrariesCommand, cmCommand); private: diff --git a/Source/cmTryCompileCommand.h b/Source/cmTryCompileCommand.h index 8e6bbc13d..a09c47ff3 100644 --- a/Source/cmTryCompileCommand.h +++ b/Source/cmTryCompileCommand.h @@ -40,7 +40,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "try_compile";} + virtual std::string GetName() const { return "try_compile";} cmTypeMacro(cmTryCompileCommand, cmCoreTryCompile); diff --git a/Source/cmTryRunCommand.h b/Source/cmTryRunCommand.h index d0bf9ce70..9b97b16a2 100644 --- a/Source/cmTryRunCommand.h +++ b/Source/cmTryRunCommand.h @@ -40,7 +40,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "try_run";} + virtual std::string GetName() const { return "try_run";} cmTypeMacro(cmTryRunCommand, cmCoreTryCompile); private: diff --git a/Source/cmUnsetCommand.h b/Source/cmUnsetCommand.h index 2308139f9..62c2bd39b 100644 --- a/Source/cmUnsetCommand.h +++ b/Source/cmUnsetCommand.h @@ -45,7 +45,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const {return "unset";} + virtual std::string GetName() const {return "unset";} cmTypeMacro(cmUnsetCommand, cmCommand); }; diff --git a/Source/cmUseMangledMesaCommand.h b/Source/cmUseMangledMesaCommand.h index dca75a5c7..da927c72b 100644 --- a/Source/cmUseMangledMesaCommand.h +++ b/Source/cmUseMangledMesaCommand.h @@ -21,7 +21,7 @@ public: virtual cmCommand* Clone() { return new cmUseMangledMesaCommand; } virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - virtual const char* GetName() const { return "use_mangled_mesa";} + virtual std::string GetName() const { return "use_mangled_mesa";} virtual bool IsScriptable() const { return true; } virtual bool IsDiscouraged() const { return true; } protected: diff --git a/Source/cmUtilitySourceCommand.h b/Source/cmUtilitySourceCommand.h index 83d115c38..23afdbe0d 100644 --- a/Source/cmUtilitySourceCommand.h +++ b/Source/cmUtilitySourceCommand.h @@ -21,7 +21,7 @@ public: virtual cmCommand* Clone() { return new cmUtilitySourceCommand; } virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - virtual const char* GetName() const { return "utility_source";} + virtual std::string GetName() const { return "utility_source";} virtual bool IsDiscouraged() const { return true; } }; diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h index 881b14996..7e68de11d 100644 --- a/Source/cmVariableRequiresCommand.h +++ b/Source/cmVariableRequiresCommand.h @@ -21,7 +21,7 @@ public: virtual cmCommand* Clone() { return new cmVariableRequiresCommand; } virtual bool InitialPass(std::vector const& args, cmExecutionStatus &status); - virtual const char* GetName() const { return "variable_requires";} + virtual std::string GetName() const { return "variable_requires";} virtual bool IsDiscouraged() const { return true; } }; diff --git a/Source/cmVariableWatchCommand.h b/Source/cmVariableWatchCommand.h index fb6062c48..c1ee9b14e 100644 --- a/Source/cmVariableWatchCommand.h +++ b/Source/cmVariableWatchCommand.h @@ -54,7 +54,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "variable_watch";} + virtual std::string GetName() const { return "variable_watch";} cmTypeMacro(cmVariableWatchCommand, cmCommand); diff --git a/Source/cmWhileCommand.h b/Source/cmWhileCommand.h index 45badd00d..9fafffc09 100644 --- a/Source/cmWhileCommand.h +++ b/Source/cmWhileCommand.h @@ -66,7 +66,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "while";} + virtual std::string GetName() const { return "while";} cmTypeMacro(cmWhileCommand, cmCommand); }; diff --git a/Source/cmWriteFileCommand.h b/Source/cmWriteFileCommand.h index 84a38fcfb..0d06878c0 100644 --- a/Source/cmWriteFileCommand.h +++ b/Source/cmWriteFileCommand.h @@ -44,7 +44,7 @@ public: /** * The name of the command as specified in CMakeList.txt. */ - virtual const char* GetName() const { return "write_file";} + virtual std::string GetName() const { return "write_file";} /** This command is kept for compatibility with older CMake versions. */ virtual bool IsDiscouraged() const diff --git a/Source/cmake.cxx b/Source/cmake.cxx index ab1241146..d37bd940f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -221,13 +221,13 @@ void cmake::CleanupCommandsAndMacros() } } -bool cmake::CommandExists(const char* name) const +bool cmake::CommandExists(const std::string& name) const { std::string sName = cmSystemTools::LowerCase(name); return (this->Commands.find(sName) != this->Commands.end()); } -cmCommand *cmake::GetCommand(const char *name) +cmCommand *cmake::GetCommand(const std::string& name) { cmCommand* rm = 0; std::string sName = cmSystemTools::LowerCase(name); @@ -239,7 +239,8 @@ cmCommand *cmake::GetCommand(const char *name) return rm; } -void cmake::RenameCommand(const char*oldName, const char* newName) +void cmake::RenameCommand(const std::string& oldName, + const std::string& newName) { // if the command already exists, free the old one std::string sOldName = cmSystemTools::LowerCase(oldName); @@ -262,7 +263,7 @@ void cmake::RenameCommand(const char*oldName, const char* newName) this->Commands.erase(pos); } -void cmake::RemoveCommand(const char* name) +void cmake::RemoveCommand(const std::string& name) { std::string sName = cmSystemTools::LowerCase(name); RegisteredCommandsMap::iterator pos = this->Commands.find(sName); diff --git a/Source/cmake.h b/Source/cmake.h index 3134493a4..6772740d1 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -218,20 +218,20 @@ class cmake * Add a command to this cmake instance */ void AddCommand(cmCommand* ); - void RenameCommand(const char* oldName, const char* newName); - void RemoveCommand(const char* name); + void RenameCommand(const std::string& oldName, const std::string& newName); + void RemoveCommand(const std::string& name); void RemoveUnscriptableCommands(); /** * Get a command by its name */ - cmCommand *GetCommand(const char *name); + cmCommand *GetCommand(const std::string& name); /** Get list of all commands */ RegisteredCommandsMap* GetCommands() { return &this->Commands; } /** Check if a command exists. */ - bool CommandExists(const char* name) const; + bool CommandExists(const std::string& name) const; ///! Parse command line arguments void SetArgs(const std::vector&,