From 658614ff6a14411e2a697fac1f1717a7f4370bf0 Mon Sep 17 00:00:00 2001 From: Will Schroeder Date: Thu, 18 Jan 2001 11:20:24 -0500 Subject: [PATCH] ENH:Reworked CMake for consistency --- CMakeRules.make.in => CMakeCommands.make.in | 2 +- CMakeMaster.make.in | 2 +- ...les.make.in => CMakeSimpleCommands.make.in | 0 Source/CMakeSetupCMD.dsp | 80 ++++----- Source/MFCDialog/CMakeSetup.dsp | 82 +++++----- Source/Makefile.in | 84 +++++----- ...lesRule.cxx => cmAbstractFilesCommand.cxx} | 6 +- ...ctFilesRule.h => cmAbstractFilesCommand.h} | 22 +-- ...dTargetRule.cxx => cmAddTargetCommand.cxx} | 6 +- ...cmAddTargetRule.h => cmAddTargetCommand.h} | 30 ++-- ...le.cxx => cmAuxSourceDirectoryCommand.cxx} | 6 +- ...ryRule.h => cmAuxSourceDirectoryCommand.h} | 32 ++-- Source/{cmRuleMaker.h => cmCommand.h} | 55 ++++--- Source/cmDumpDocumentation.cxx | 2 +- ...ablesRule.cxx => cmExecutablesCommand.cxx} | 6 +- ...ecutablesRule.h => cmExecutablesCommand.h} | 28 ++-- ...braryRule.cxx => cmFindIncludeCommand.cxx} | 6 +- ...ndIncludeRule.h => cmFindIncludeCommand.h} | 32 ++-- ...cludeRule.cxx => cmFindLibraryCommand.cxx} | 6 +- ...ndLibraryRule.h => cmFindLibraryCommand.h} | 34 ++-- ...ogramRule.cxx => cmFindProgramCommand.cxx} | 6 +- ...ndProgramRule.h => cmFindProgramCommand.h} | 34 ++-- ...Rule.cxx => cmIncludeDirectoryCommand.cxx} | 6 +- ...toryRule.h => cmIncludeDirectoryCommand.h} | 30 ++-- ...cmLibraryRule.cxx => cmLibraryCommand.cxx} | 6 +- .../{cmLibraryRule.h => cmLibraryCommand.h} | 28 ++-- ...sRule.cxx => cmLinkDirectoriesCommand.cxx} | 6 +- ...oriesRule.h => cmLinkDirectoriesCommand.h} | 32 ++-- ...iesRule.cxx => cmLinkLibrariesCommand.cxx} | 6 +- ...brariesRule.h => cmLinkLibrariesCommand.h} | 38 ++--- Source/cmMakefile.cxx | 154 +++++++++--------- Source/cmMakefile.h | 22 +-- Source/cmMakefileGenerator.h | 2 +- ...cmProjectRule.cxx => cmProjectCommand.cxx} | 6 +- .../{cmProjectRule.h => cmProjectCommand.h} | 28 ++-- ...FilesRule.cxx => cmSourceFilesCommand.cxx} | 6 +- ...urceFilesRule.h => cmSourceFilesCommand.h} | 32 ++-- ...le.cxx => cmSourceFilesRequireCommand.cxx} | 6 +- ...reRule.h => cmSourceFilesRequireCommand.h} | 30 ++-- .../{cmSubdirRule.cxx => cmSubdirCommand.cxx} | 6 +- Source/{cmSubdirRule.h => cmSubdirCommand.h} | 28 ++-- Source/cmSystemTools.h | 2 +- .../{cmTestsRule.cxx => cmTestsCommand.cxx} | 6 +- Source/{cmTestsRule.h => cmTestsCommand.h} | 34 ++-- ...finesRule.cxx => cmUnixDefinesCommand.cxx} | 8 +- ...ixDefinesRule.h => cmUnixDefinesCommand.h} | 32 ++-- ...iesRule.cxx => cmUnixLibrariesCommand.cxx} | 8 +- ...brariesRule.h => cmUnixLibrariesCommand.h} | 32 ++-- ...inesRule.cxx => cmWin32DefinesCommand.cxx} | 8 +- ...2DefinesRule.h => cmWin32DefinesCommand.h} | 32 ++-- ...esRule.cxx => cmWin32LibrariesCommand.cxx} | 8 +- ...rariesRule.h => cmWin32LibrariesCommand.h} | 32 ++-- 52 files changed, 562 insertions(+), 673 deletions(-) rename CMakeRules.make.in => CMakeCommands.make.in (93%) rename CMakeSimpleRules.make.in => CMakeSimpleCommands.make.in (100%) rename Source/{cmAbstractFilesRule.cxx => cmAbstractFilesCommand.cxx} (87%) rename Source/{cmAbstractFilesRule.h => cmAbstractFilesCommand.h} (67%) rename Source/{cmAddTargetRule.cxx => cmAddTargetCommand.cxx} (85%) rename Source/{cmAddTargetRule.h => cmAddTargetCommand.h} (63%) rename Source/{cmAuxSourceDirectoryRule.cxx => cmAuxSourceDirectoryCommand.cxx} (91%) rename Source/{cmAuxSourceDirectoryRule.h => cmAuxSourceDirectoryCommand.h} (60%) rename Source/{cmRuleMaker.h => cmCommand.h} (55%) rename Source/{cmExecutablesRule.cxx => cmExecutablesCommand.cxx} (86%) rename Source/{cmExecutablesRule.h => cmExecutablesCommand.h} (63%) rename Source/{cmFindLibraryRule.cxx => cmFindIncludeCommand.cxx} (84%) rename Source/{cmFindIncludeRule.h => cmFindIncludeCommand.h} (61%) rename Source/{cmFindIncludeRule.cxx => cmFindLibraryCommand.cxx} (84%) rename Source/{cmFindLibraryRule.h => cmFindLibraryCommand.h} (59%) rename Source/{cmFindProgramRule.cxx => cmFindProgramCommand.cxx} (93%) rename Source/{cmFindProgramRule.h => cmFindProgramCommand.h} (61%) rename Source/{cmIncludeDirectoryRule.cxx => cmIncludeDirectoryCommand.cxx} (83%) rename Source/{cmIncludeDirectoryRule.h => cmIncludeDirectoryCommand.h} (63%) rename Source/{cmLibraryRule.cxx => cmLibraryCommand.cxx} (84%) rename Source/{cmLibraryRule.h => cmLibraryCommand.h} (63%) rename Source/{cmLinkDirectoriesRule.cxx => cmLinkDirectoriesCommand.cxx} (83%) rename Source/{cmLinkDirectoriesRule.h => cmLinkDirectoriesCommand.h} (66%) rename Source/{cmLinkLibrariesRule.cxx => cmLinkLibrariesCommand.cxx} (84%) rename Source/{cmLinkLibrariesRule.h => cmLinkLibrariesCommand.h} (59%) rename Source/{cmProjectRule.cxx => cmProjectCommand.cxx} (84%) rename Source/{cmProjectRule.h => cmProjectCommand.h} (65%) rename Source/{cmSourceFilesRule.cxx => cmSourceFilesCommand.cxx} (86%) rename Source/{cmSourceFilesRule.h => cmSourceFilesCommand.h} (62%) rename Source/{cmSourceFilesRequireRule.cxx => cmSourceFilesRequireCommand.cxx} (89%) rename Source/{cmSourceFilesRequireRule.h => cmSourceFilesRequireCommand.h} (64%) rename Source/{cmSubdirRule.cxx => cmSubdirCommand.cxx} (86%) rename Source/{cmSubdirRule.h => cmSubdirCommand.h} (69%) rename Source/{cmTestsRule.cxx => cmTestsCommand.cxx} (87%) rename Source/{cmTestsRule.h => cmTestsCommand.h} (60%) rename Source/{cmUnixDefinesRule.cxx => cmUnixDefinesCommand.cxx} (82%) rename Source/{cmUnixDefinesRule.h => cmUnixDefinesCommand.h} (65%) rename Source/{cmUnixLibrariesRule.cxx => cmUnixLibrariesCommand.cxx} (81%) rename Source/{cmUnixLibrariesRule.h => cmUnixLibrariesCommand.h} (64%) rename Source/{cmWin32DefinesRule.cxx => cmWin32DefinesCommand.cxx} (81%) rename Source/{cmWin32DefinesRule.h => cmWin32DefinesCommand.h} (65%) rename Source/{cmWin32LibrariesRule.cxx => cmWin32LibrariesCommand.cxx} (80%) rename Source/{cmWin32LibrariesRule.h => cmWin32LibrariesCommand.h} (63%) diff --git a/CMakeRules.make.in b/CMakeCommands.make.in similarity index 93% rename from CMakeRules.make.in rename to CMakeCommands.make.in index bfecbf397..472121f07 100644 --- a/CMakeRules.make.in +++ b/CMakeCommands.make.in @@ -1,5 +1,5 @@ # rules for building .o files from source files -@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_CONFIG_DIR@/CMake/CMakeSimpleRules.make@MAKEQUOTE@ +@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_CONFIG_DIR@/CMake/CMakeSimpleCommands.make@MAKEQUOTE@ # # Makefile for diff --git a/CMakeMaster.make.in b/CMakeMaster.make.in index 404b73a87..f5dc9016d 100644 --- a/CMakeMaster.make.in +++ b/CMakeMaster.make.in @@ -16,6 +16,6 @@ CMAKE_LIB_EXT = @CMAKE_LIB_EXT@ #------------------------------------------------------------------------------ # Include General Build Rules -@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_CONFIG_DIR@/CMake/CMakeRules.make@MAKEQUOTE@ +@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_CONFIG_DIR@/CMake/CMakeCommands.make@MAKEQUOTE@ diff --git a/CMakeSimpleRules.make.in b/CMakeSimpleCommands.make.in similarity index 100% rename from CMakeSimpleRules.make.in rename to CMakeSimpleCommands.make.in diff --git a/Source/CMakeSetupCMD.dsp b/Source/CMakeSetupCMD.dsp index f24c193cd..244fb9e63 100644 --- a/Source/CMakeSetupCMD.dsp +++ b/Source/CMakeSetupCMD.dsp @@ -91,11 +91,11 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File -SOURCE=.\cmAbstractFilesRule.cxx +SOURCE=.\cmAbstractFilesCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmAddTargetRule.cxx +SOURCE=.\cmAddTargetCommand.cxx # End Source File # Begin Source File @@ -103,7 +103,7 @@ SOURCE=.\CMakeSetupCMD.cxx # End Source File # Begin Source File -SOURCE=.\cmAuxSourceDirectoryRule.cxx +SOURCE=.\cmAuxSourceDirectoryCommand.cxx # End Source File # Begin Source File @@ -123,35 +123,35 @@ SOURCE=.\cmDSWMakefile.cxx # End Source File # Begin Source File -SOURCE=.\cmExecutablesRule.cxx +SOURCE=.\cmExecutablesCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmFindIncludeRule.cxx +SOURCE=.\cmFindIncludeCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmFindLibraryRule.cxx +SOURCE=.\cmFindLibraryCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmFindProgramRule.cxx +SOURCE=.\cmFindProgramCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmIncludeDirectoryRule.cxx +SOURCE=.\cmIncludeDirectoryCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmLibraryRule.cxx +SOURCE=.\cmLibraryCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmLinkDirectoriesRule.cxx +SOURCE=.\cmLinkDirectoriesCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmLinkLibrariesRule.cxx +SOURCE=.\cmLinkLibrariesCommand.cxx # End Source File # Begin Source File @@ -171,7 +171,7 @@ SOURCE=.\cmMSProjectGenerator.cxx # End Source File # Begin Source File -SOURCE=.\cmProjectRule.cxx +SOURCE=.\cmProjectCommand.cxx # End Source File # Begin Source File @@ -179,15 +179,15 @@ SOURCE=.\cmRegularExpression.cxx # End Source File # Begin Source File -SOURCE=.\cmSourceFilesRequireRule.cxx +SOURCE=.\cmSourceFilesRequireCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmSourceFilesRule.cxx +SOURCE=.\cmSourceFilesCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmSubdirRule.cxx +SOURCE=.\cmSubdirCommand.cxx # End Source File # Begin Source File @@ -195,23 +195,23 @@ SOURCE=.\cmSystemTools.cxx # End Source File # Begin Source File -SOURCE=.\cmTestsRule.cxx +SOURCE=.\cmTestsCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmUnixDefinesRule.cxx +SOURCE=.\cmUnixDefinesCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmUnixLibrariesRule.cxx +SOURCE=.\cmUnixLibrariesCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmWin32DefinesRule.cxx +SOURCE=.\cmWin32DefinesCommand.cxx # End Source File # Begin Source File -SOURCE=.\cmWin32LibrariesRule.cxx +SOURCE=.\cmWin32LibrariesCommand.cxx # End Source File # Begin Source File @@ -223,15 +223,15 @@ SOURCE=.\cmWindowsConfigure.cxx # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File -SOURCE=.\cmAbstractFilesRule.h +SOURCE=.\cmAbstractFilesCommand.h # End Source File # Begin Source File -SOURCE=.\cmAddTargetRule.h +SOURCE=.\cmAddTargetCommand.h # End Source File # Begin Source File -SOURCE=.\cmAuxSourceDirectoryRule.h +SOURCE=.\cmAuxSourceDirectoryCommand.h # End Source File # Begin Source File @@ -251,35 +251,35 @@ SOURCE=.\cmDSWMakefile.h # End Source File # Begin Source File -SOURCE=.\cmExecutablesRule.h +SOURCE=.\cmExecutablesCommand.h # End Source File # Begin Source File -SOURCE=.\cmFindIncludeRule.h +SOURCE=.\cmFindIncludeCommand.h # End Source File # Begin Source File -SOURCE=.\cmFindLibraryRule.h +SOURCE=.\cmFindLibraryCommand.h # End Source File # Begin Source File -SOURCE=.\cmFindProgramRule.h +SOURCE=.\cmFindProgramCommand.h # End Source File # Begin Source File -SOURCE=.\cmIncludeDirectoryRule.h +SOURCE=.\cmIncludeDirectoryCommand.h # End Source File # Begin Source File -SOURCE=.\cmLibraryRule.h +SOURCE=.\cmLibraryCommand.h # End Source File # Begin Source File -SOURCE=.\cmLinkDirectoriesRule.h +SOURCE=.\cmLinkDirectoriesCommand.h # End Source File # Begin Source File -SOURCE=.\cmLinkLibrariesRule.h +SOURCE=.\cmLinkLibrariesCommand.h # End Source File # Begin Source File @@ -303,7 +303,7 @@ SOURCE=.\cmMSProjectGenerator.h # End Source File # Begin Source File -SOURCE=.\cmProjectRule.h +SOURCE=.\cmProjectCommand.h # End Source File # Begin Source File @@ -311,11 +311,11 @@ SOURCE=.\cmRegularExpression.h # End Source File # Begin Source File -SOURCE=.\cmRuleMaker.h +SOURCE=.\cmCommand.h # End Source File # Begin Source File -SOURCE=.\cmSourceFilesRule.h +SOURCE=.\cmSourceFilesCommand.h # End Source File # Begin Source File @@ -323,7 +323,7 @@ SOURCE=.\cmStandardIncludes.h # End Source File # Begin Source File -SOURCE=.\cmSubdirRule.h +SOURCE=.\cmSubdirCommand.h # End Source File # Begin Source File @@ -331,23 +331,23 @@ SOURCE=.\cmSystemTools.h # End Source File # Begin Source File -SOURCE=.\cmTestsRule.h +SOURCE=.\cmTestsCommand.h # End Source File # Begin Source File -SOURCE=.\cmUnixDefinesRule.h +SOURCE=.\cmUnixDefinesCommand.h # End Source File # Begin Source File -SOURCE=.\cmUnixLibrariesRule.h +SOURCE=.\cmUnixLibrariesCommand.h # End Source File # Begin Source File -SOURCE=.\cmWin32DefinesRule.h +SOURCE=.\cmWin32DefinesCommand.h # End Source File # Begin Source File -SOURCE=.\cmWin32LibrariesRule.h +SOURCE=.\cmWin32LibrariesCommand.h # End Source File # Begin Source File diff --git a/Source/MFCDialog/CMakeSetup.dsp b/Source/MFCDialog/CMakeSetup.dsp index b8dc31cfe..7a2dea124 100644 --- a/Source/MFCDialog/CMakeSetup.dsp +++ b/Source/MFCDialog/CMakeSetup.dsp @@ -92,11 +92,11 @@ LINK32=link.exe # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File -SOURCE=..\cmAbstractFilesRule.cxx +SOURCE=..\cmAbstractFilesCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmAddTargetRule.cxx +SOURCE=..\cmAddTargetCommand.cxx # End Source File # Begin Source File @@ -116,7 +116,7 @@ SOURCE=.\CMakeSetupDialog.cpp # End Source File # Begin Source File -SOURCE=..\cmAuxSourceDirectoryRule.cxx +SOURCE=..\cmAuxSourceDirectoryCommand.cxx # End Source File # Begin Source File @@ -136,35 +136,35 @@ SOURCE=..\cmDSWMakefile.cxx # End Source File # Begin Source File -SOURCE=..\cmExecutablesRule.cxx +SOURCE=..\cmExecutablesCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmFindIncludeRule.cxx +SOURCE=..\cmFindIncludeCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmFindLibraryRule.cxx +SOURCE=..\cmFindLibraryCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmFindProgramRule.cxx +SOURCE=..\cmFindProgramCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmIncludeDirectoryRule.cxx +SOURCE=..\cmIncludeDirectoryCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmLibraryRule.cxx +SOURCE=..\cmLibraryCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmLinkDirectoriesRule.cxx +SOURCE=..\cmLinkDirectoriesCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmLinkLibrariesRule.cxx +SOURCE=..\cmLinkLibrariesCommand.cxx # End Source File # Begin Source File @@ -184,7 +184,7 @@ SOURCE=..\cmMSProjectGenerator.cxx # End Source File # Begin Source File -SOURCE=..\cmProjectRule.cxx +SOURCE=..\cmProjectCommand.cxx # End Source File # Begin Source File @@ -192,15 +192,15 @@ SOURCE=..\cmRegularExpression.cxx # End Source File # Begin Source File -SOURCE=..\cmSourceFilesRequireRule.cxx +SOURCE=..\cmSourceFilesRequireCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmSourceFilesRule.cxx +SOURCE=..\cmSourceFilesCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmSubdirRule.cxx +SOURCE=..\cmSubdirCommand.cxx # End Source File # Begin Source File @@ -208,23 +208,23 @@ SOURCE=..\cmSystemTools.cxx # End Source File # Begin Source File -SOURCE=..\cmTestsRule.cxx +SOURCE=..\cmTestsCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmUnixDefinesRule.cxx +SOURCE=..\cmUnixDefinesCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmUnixLibrariesRule.cxx +SOURCE=..\cmUnixLibrariesCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmWin32DefinesRule.cxx +SOURCE=..\cmWin32DefinesCommand.cxx # End Source File # Begin Source File -SOURCE=..\cmWin32LibrariesRule.cxx +SOURCE=..\cmWin32LibrariesCommand.cxx # End Source File # Begin Source File @@ -241,11 +241,11 @@ SOURCE=.\StdAfx.cpp # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File -SOURCE=..\cmAbstractFilesRule.h +SOURCE=..\cmAbstractFilesCommand.h # End Source File # Begin Source File -SOURCE=..\cmAddTargetRule.h +SOURCE=..\cmAddTargetCommand.h # End Source File # Begin Source File @@ -261,7 +261,7 @@ SOURCE=.\CMakeSetupDialog.h # End Source File # Begin Source File -SOURCE=..\cmAuxSourceDirectoryRule.h +SOURCE=..\cmAuxSourceDirectoryCommand.h # End Source File # Begin Source File @@ -289,35 +289,35 @@ SOURCE=..\cmDSWMakefile.h # End Source File # Begin Source File -SOURCE=..\cmExecutablesRule.h +SOURCE=..\cmExecutablesCommand.h # End Source File # Begin Source File -SOURCE=..\cmFindIncludeRule.h +SOURCE=..\cmFindIncludeCommand.h # End Source File # Begin Source File -SOURCE=..\cmFindLibraryRule.h +SOURCE=..\cmFindLibraryCommand.h # End Source File # Begin Source File -SOURCE=..\cmFindProgramRule.h +SOURCE=..\cmFindProgramCommand.h # End Source File # Begin Source File -SOURCE=..\cmIncludeDirectoryRule.h +SOURCE=..\cmIncludeDirectoryCommand.h # End Source File # Begin Source File -SOURCE=..\cmLibraryRule.h +SOURCE=..\cmLibraryCommand.h # End Source File # Begin Source File -SOURCE=..\cmLinkDirectoriesRule.h +SOURCE=..\cmLinkDirectoriesCommand.h # End Source File # Begin Source File -SOURCE=..\cmLinkLibrariesRule.h +SOURCE=..\cmLinkLibrariesCommand.h # End Source File # Begin Source File @@ -341,7 +341,7 @@ SOURCE=..\cmMSProjectGenerator.h # End Source File # Begin Source File -SOURCE=..\cmProjectRule.h +SOURCE=..\cmProjectCommand.h # End Source File # Begin Source File @@ -349,15 +349,15 @@ SOURCE=..\cmRegularExpression.h # End Source File # Begin Source File -SOURCE=..\cmRuleMaker.h +SOURCE=..\cmCommandMaker.h # End Source File # Begin Source File -SOURCE=..\cmSourceFilesRequireRule.h +SOURCE=..\cmSourceFilesRequireCommand.h # End Source File # Begin Source File -SOURCE=..\cmSourceFilesRule.h +SOURCE=..\cmSourceFilesCommand.h # End Source File # Begin Source File @@ -365,7 +365,7 @@ SOURCE=..\cmStandardIncludes.h # End Source File # Begin Source File -SOURCE=..\cmSubdirRule.h +SOURCE=..\cmSubdirCommand.h # End Source File # Begin Source File @@ -373,23 +373,23 @@ SOURCE=..\cmSystemTools.h # End Source File # Begin Source File -SOURCE=..\cmTestsRule.h +SOURCE=..\cmTestsCommand.h # End Source File # Begin Source File -SOURCE=..\cmUnixDefinesRule.h +SOURCE=..\cmUnixDefinesCommand.h # End Source File # Begin Source File -SOURCE=..\cmUnixLibrariesRule.h +SOURCE=..\cmUnixLibrariesCommand.h # End Source File # Begin Source File -SOURCE=..\cmWin32DefinesRule.h +SOURCE=..\cmWin32DefinesCommand.h # End Source File # Begin Source File -SOURCE=..\cmWin32LibrariesRule.h +SOURCE=..\cmWin32LibrariesCommand.h # End Source File # Begin Source File diff --git a/Source/Makefile.in b/Source/Makefile.in index b40179575..babdaeedb 100644 --- a/Source/Makefile.in +++ b/Source/Makefile.in @@ -4,73 +4,73 @@ VPATH = @srcdir@ # DO NOT INCLUDE CMakeMaster.make here! # This will cause an infinite loop as it will add the -# rule for changing into this directory +# command for changing into this directory @MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_CONFIG_DIR@/CMake/CMakeVariables.make@MAKEQUOTE@ -@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_CONFIG_DIR@/CMake/CMakeSimpleRules.make@MAKEQUOTE@ +@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_CONFIG_DIR@/CMake/CMakeSimpleCommands.make@MAKEQUOTE@ OBJS = \ CMakeBuildTargets.o \ cmMakeDepend.o \ cmMakefile.o \ -cmAbstractFilesRule.o \ +cmAbstractFilesCommand.o \ cmMakefileGenerator.o \ -cmAddTargetRule.o \ -cmProjectRule.o \ -cmAuxSourceDirectoryRule.o \ +cmAddTargetCommand.o \ +cmProjectCommand.o \ +cmAuxSourceDirectoryCommand.o \ cmRegularExpression.o \ cmClassFile.o \ -cmSourceFilesRule.o \ -cmSourceFilesRequireRule.o \ -cmSubdirRule.o \ +cmSourceFilesCommand.o \ +cmSourceFilesRequireCommand.o \ +cmSubdirCommand.o \ cmSystemTools.o \ cmDirectory.o \ -cmUnixDefinesRule.o \ -cmExecutablesRule.o \ -cmTestsRule.o \ -cmUnixLibrariesRule.o \ -cmFindIncludeRule.o \ -cmFindLibraryRule.o \ +cmUnixDefinesCommand.o \ +cmExecutablesCommand.o \ +cmTestsCommand.o \ +cmUnixLibrariesCommand.o \ +cmFindIncludeCommand.o \ +cmFindLibraryCommand.o \ cmUnixMakefileGenerator.o \ -cmFindProgramRule.o \ -cmIncludeDirectoryRule.o \ -cmWin32DefinesRule.o \ -cmLibraryRule.o \ -cmWin32LibrariesRule.o \ -cmLinkDirectoriesRule.o \ -cmLinkLibrariesRule.o +cmFindProgramCommand.o \ +cmIncludeDirectoryCommand.o \ +cmWin32DefinesCommand.o \ +cmLibraryCommand.o \ +cmWin32LibrariesCommand.o \ +cmLinkDirectoriesCommand.o \ +cmLinkLibrariesCommand.o cmCollectFlags.o : $(srcdir)/*.h CMakeBuildTargets.o : $(srcdir)/*.h cmMakeDepend.o : $(srcdir)/*.h cmMakefile.o : $(srcdir)/*.h -cmAbstractFilesRule.o : $(srcdir)/*.h +cmAbstractFilesCommand.o : $(srcdir)/*.h cmMakefileGenerator.o : $(srcdir)/*.h -cmAddTargetRule.o : $(srcdir)/*.h -cmProjectRule.o : $(srcdir)/*.h -cmAuxSourceDirectoryRule.o : $(srcdir)/*.h +cmAddTargetCommand.o : $(srcdir)/*.h +cmProjectCommand.o : $(srcdir)/*.h +cmAuxSourceDirectoryCommand.o : $(srcdir)/*.h cmRegularExpression.o : $(srcdir)/*.h cmClassFile.o : $(srcdir)/*.h -cmSourceFilesRule.o : $(srcdir)/*.h -cmSourceFilesRequireRule.o : $(srcdir)/*.h -cmSubdirRule.o : $(srcdir)/*.h +cmSourceFilesCommand.o : $(srcdir)/*.h +cmSourceFilesRequireCommand.o : $(srcdir)/*.h +cmSubdirCommand.o : $(srcdir)/*.h cmSystemTools.o : $(srcdir)/*.h cmDirectory.o : $(srcdir)/*.h -cmUnixDefinesRule.o : $(srcdir)/*.h -cmExecutablesRule.o : $(srcdir)/*.h -cmTestsRule.o : $(srcdir)/*.h -cmUnixLibrariesRule.o : $(srcdir)/*.h -cmFindIncludeRule.o : $(srcdir)/*.h -cmFindLibraryRule.o : $(srcdir)/*.h +cmUnixDefinesCommand.o : $(srcdir)/*.h +cmExecutablesCommand.o : $(srcdir)/*.h +cmTestsCommand.o : $(srcdir)/*.h +cmUnixLibrariesCommand.o : $(srcdir)/*.h +cmFindIncludeCommand.o : $(srcdir)/*.h +cmFindLibraryCommand.o : $(srcdir)/*.h cmUnixMakefileGenerator.o : $(srcdir)/*.h -cmFindProgramRule.o : $(srcdir)/*.h -cmIncludeDirectoryRule.o : $(srcdir)/*.h -cmWin32DefinesRule.o : $(srcdir)/*.h -cmLibraryRule.o : $(srcdir)/*.h -cmWin32LibrariesRule.o : $(srcdir)/*.h -cmLinkDirectoriesRule.o : $(srcdir)/*.h -cmLinkLibrariesRule.o : $(srcdir)/*.h +cmFindProgramCommand.o : $(srcdir)/*.h +cmIncludeDirectoryCommand.o : $(srcdir)/*.h +cmWin32DefinesCommand.o : $(srcdir)/*.h +cmLibraryCommand.o : $(srcdir)/*.h +cmWin32LibrariesCommand.o : $(srcdir)/*.h +cmLinkDirectoriesCommand.o : $(srcdir)/*.h +cmLinkLibrariesCommand.o : $(srcdir)/*.h CMakeBuildTargets: ${OBJS} diff --git a/Source/cmAbstractFilesRule.cxx b/Source/cmAbstractFilesCommand.cxx similarity index 87% rename from Source/cmAbstractFilesRule.cxx rename to Source/cmAbstractFilesCommand.cxx index 39634b9f3..2e8ed2f3e 100644 --- a/Source/cmAbstractFilesRule.cxx +++ b/Source/cmAbstractFilesCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmAbstractFilesRule.h" +#include "cmAbstractFilesCommand.h" -// cmAbstractFilesRule -bool cmAbstractFilesRule::Invoke(std::vector& args) +// cmAbstractFilesCommand +bool cmAbstractFilesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmAbstractFilesRule.h b/Source/cmAbstractFilesCommand.h similarity index 67% rename from Source/cmAbstractFilesRule.h rename to Source/cmAbstractFilesCommand.h index 5eb51fca1..6e7f73e49 100644 --- a/Source/cmAbstractFilesRule.h +++ b/Source/cmAbstractFilesCommand.h @@ -13,34 +13,28 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmAbstractFilesRule_h -#define cmAbstractFilesRule_h +#ifndef cmAbstractFilesCommand_h +#define cmAbstractFilesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -class cmAbstractFilesRule : public cmRuleMaker +class cmAbstractFilesCommand : public cmCommand { public: - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmAbstractFilesRule; + return new cmAbstractFilesCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the input file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "ABSTRACT_FILES";} diff --git a/Source/cmAddTargetRule.cxx b/Source/cmAddTargetCommand.cxx similarity index 85% rename from Source/cmAddTargetRule.cxx rename to Source/cmAddTargetCommand.cxx index c115e758b..089f971fb 100644 --- a/Source/cmAddTargetRule.cxx +++ b/Source/cmAddTargetCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmAddTargetRule.h" +#include "cmAddTargetCommand.h" -// cmAddTargetRule -bool cmAddTargetRule::Invoke(std::vector& args) +// cmAddTargetCommand +bool cmAddTargetCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmAddTargetRule.h b/Source/cmAddTargetCommand.h similarity index 63% rename from Source/cmAddTargetRule.h rename to Source/cmAddTargetCommand.h index 65d57e8c9..01653e625 100644 --- a/Source/cmAddTargetRule.h +++ b/Source/cmAddTargetCommand.h @@ -13,44 +13,38 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmAddTargetRule_h -#define cmAddTargetRule_h +#ifndef cmAddTargetCommand_h +#define cmAddTargetCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmAddTargetRule - * \brief Rule that adds a target to the build system. +/** \class cmAddTargetCommand + * \brief Command that adds a target to the build system. * - * cmAddTargetRule adds an extra target to the build system. + * cmAddTargetCommand adds an extra target to the build system. * This is useful when you would like to add special * targets like "install,", "clean," and so on. */ -class cmAddTargetRule : public cmRuleMaker +class cmAddTargetCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmAddTargetRule; + return new cmAddTargetCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() {} - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() {return "ADD_TARGET";} diff --git a/Source/cmAuxSourceDirectoryRule.cxx b/Source/cmAuxSourceDirectoryCommand.cxx similarity index 91% rename from Source/cmAuxSourceDirectoryRule.cxx rename to Source/cmAuxSourceDirectoryCommand.cxx index 1b7f45a54..64aa7d247 100644 --- a/Source/cmAuxSourceDirectoryRule.cxx +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -13,11 +13,11 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmAuxSourceDirectoryRule.h" +#include "cmAuxSourceDirectoryCommand.h" #include "cmDirectory.h" -// cmAuxSourceDirectoryRule -bool cmAuxSourceDirectoryRule::Invoke(std::vector& args) +// cmAuxSourceDirectoryCommand +bool cmAuxSourceDirectoryCommand::Invoke(std::vector& args) { if(args.size() < 1 || args.size() > 1) { diff --git a/Source/cmAuxSourceDirectoryRule.h b/Source/cmAuxSourceDirectoryCommand.h similarity index 60% rename from Source/cmAuxSourceDirectoryRule.h rename to Source/cmAuxSourceDirectoryCommand.h index 199e5bc7c..c830a769a 100644 --- a/Source/cmAuxSourceDirectoryRule.h +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -13,46 +13,40 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmAuxSourceDirectoryRule_h -#define cmAuxSourceDirectoryRule_h +#ifndef cmAuxSourceDirectoryCommand_h +#define cmAuxSourceDirectoryCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmAuxSourceDirectoryRule +/** \class cmAuxSourceDirectoryCommand * \brief Specify auxiliary source code directories. * - * cmAuxSourceDirectoryRule specifies source code directories + * cmAuxSourceDirectoryCommand specifies source code directories * that must be built as part of this build process. This directories - * are not recursively processed like the SUBDIR rule (cmSubdirRule). - * A side effect of this rule is to create a subdirectory in the build + * are not recursively processed like the SUBDIR command (cmSubdirCommand). + * A side effect of this command is to create a subdirectory in the build * directory structure. */ -class cmAuxSourceDirectoryRule : public cmRuleMaker +class cmAuxSourceDirectoryCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmAuxSourceDirectoryRule; + return new cmAuxSourceDirectoryCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "AUX_SOURCE_DIRECTORY";} diff --git a/Source/cmRuleMaker.h b/Source/cmCommand.h similarity index 55% rename from Source/cmRuleMaker.h rename to Source/cmCommand.h index b653c38d6..7051d3e66 100644 --- a/Source/cmRuleMaker.h +++ b/Source/cmCommand.h @@ -1,4 +1,4 @@ -/*========================================================================= + /*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile$ @@ -13,27 +13,29 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmRuleMaker_h -#define cmRuleMaker_h +#ifndef cmCommand_h +#define cmCommand_h #include "cmStandardIncludes.h" #include "cmMakefile.h" -/** \class cmRuleMaker - * \brief Superclass for all rules in CMake. +/** \class cmCommand + * \brief Superclass for all commands in CMake. * - * cmRuleMaker is the base class for all rules in CMake. - * cmRuleMaker defines the API for rules with such features - * as enable/disable, inheritance, documentation, and construction. + * cmCommand is the base class for all commands in CMake. A command + * manifests as an entry in CMakeLists.txt and produces one or + * more makefile rules. Commands are associated with a particular + * makefile. This base class cmCommand defines the API for commands + * to support such features as enable/disable, inheritance, + * documentation, and construction. */ -class cmRuleMaker +class cmCommand { public: /** - * Construct the rule enabled with no makefile. - * the input file. + * Construct the command. By default it is enabled with no makefile. */ - cmRuleMaker() + cmCommand() {m_Makefile = 0; m_Enabled = true;} /** @@ -43,29 +45,30 @@ public: {m_Makefile = m; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args) = 0; /** * This is called at the end after all the information - * specified by the rules is accumulated. + * specified by the command is accumulated. Most commands do + * not implement this method. */ - virtual void FinalPass() = 0; + virtual void FinalPass() {}; /** - * This is called to let the rule check the cache. + * This is called to let the command check the cache. */ virtual void LoadCache() {} /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() = 0; + virtual cmCommand* Clone() = 0; /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() @@ -74,7 +77,7 @@ public: } /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() = 0; @@ -89,23 +92,29 @@ public: virtual const char* GetFullDocumentation() = 0; /** - * Enable the rule. + * Enable the command. */ void EnabledOn() {m_Enabled = true;} /** - * Disable the rule. + * Disable the command. */ void EnabledOff() {m_Enabled = false;} /** - * Query whether the rule is enabled. + * Query whether the command is enabled. */ bool GetEnabled() {return m_Enabled;} + /** + * Disable or enable the command. + */ + void SetEnabled(bool enabled) + {m_Enabled = enabled;} + /** * Return the last error string. */ diff --git a/Source/cmDumpDocumentation.cxx b/Source/cmDumpDocumentation.cxx index 7034e03f0..51db267ad 100644 --- a/Source/cmDumpDocumentation.cxx +++ b/Source/cmDumpDocumentation.cxx @@ -1,4 +1,4 @@ -// Program extracts documentation describing rules from +// Program extracts documentation describing commands from // the CMake system. // #include "cmMakefile.h" diff --git a/Source/cmExecutablesRule.cxx b/Source/cmExecutablesCommand.cxx similarity index 86% rename from Source/cmExecutablesRule.cxx rename to Source/cmExecutablesCommand.cxx index f00e0808a..748705d05 100644 --- a/Source/cmExecutablesRule.cxx +++ b/Source/cmExecutablesCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmExecutablesRule.h" +#include "cmExecutablesCommand.h" -// cmExecutableRule -bool cmExecutablesRule::Invoke(std::vector& args) +// cmExecutableCommand +bool cmExecutablesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmExecutablesRule.h b/Source/cmExecutablesCommand.h similarity index 63% rename from Source/cmExecutablesRule.h rename to Source/cmExecutablesCommand.h index 8026a33fd..c420a878c 100644 --- a/Source/cmExecutablesRule.h +++ b/Source/cmExecutablesCommand.h @@ -13,43 +13,37 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmExecutablesRule_h -#define cmExecutablesRule_h +#ifndef cmExecutablesCommand_h +#define cmExecutablesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmExecutablesRule +/** \class cmExecutablesCommand * \brief Defines a list of executables to build. * - * cmExecutablesRule defines a list of executable (i.e., test) + * cmExecutablesCommand defines a list of executable (i.e., test) * programs to create. */ -class cmExecutablesRule : public cmRuleMaker +class cmExecutablesCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmExecutablesRule; + return new cmExecutablesCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "EXECUTABLES";} diff --git a/Source/cmFindLibraryRule.cxx b/Source/cmFindIncludeCommand.cxx similarity index 84% rename from Source/cmFindLibraryRule.cxx rename to Source/cmFindIncludeCommand.cxx index 4c0776dc0..2b4160dc8 100644 --- a/Source/cmFindLibraryRule.cxx +++ b/Source/cmFindIncludeCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmFindLibraryRule.h" +#include "cmFindIncludeCommand.h" -// cmFindLibraryRule -bool cmFindLibraryRule::Invoke(std::vector& args) +// cmFindIncludeCommand +bool cmFindIncludeCommand::Invoke(std::vector& args) { return false; if(args.size() < 1 ) diff --git a/Source/cmFindIncludeRule.h b/Source/cmFindIncludeCommand.h similarity index 61% rename from Source/cmFindIncludeRule.h rename to Source/cmFindIncludeCommand.h index f9cd40e51..4b2cd4a68 100644 --- a/Source/cmFindIncludeRule.h +++ b/Source/cmFindIncludeCommand.h @@ -13,50 +13,44 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmFindIncludeRule_h -#define cmFindIncludeRule_h +#ifndef cmFindIncludeCommand_h +#define cmFindIncludeCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmFindIncludeRule - * \brief Define a rule that searches for an include file. +/** \class cmFindIncludeCommand + * \brief Define a command that searches for an include file. * - * cmFindIncludeRule is used to define a CMake variable include + * cmFindIncludeCommand is used to define a CMake variable include * path location by specifying a file and list of directories. */ -class cmFindIncludeRule : public cmRuleMaker +class cmFindIncludeCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmFindIncludeRule; + return new cmFindIncludeCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() {return true;} /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "FIND_INCLUDE";} diff --git a/Source/cmFindIncludeRule.cxx b/Source/cmFindLibraryCommand.cxx similarity index 84% rename from Source/cmFindIncludeRule.cxx rename to Source/cmFindLibraryCommand.cxx index 44a4c90d9..1eb2a5d10 100644 --- a/Source/cmFindIncludeRule.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmFindIncludeRule.h" +#include "cmFindLibraryCommand.h" -// cmFindIncludeRule -bool cmFindIncludeRule::Invoke(std::vector& args) +// cmFindLibraryCommand +bool cmFindLibraryCommand::Invoke(std::vector& args) { return false; if(args.size() < 1 ) diff --git a/Source/cmFindLibraryRule.h b/Source/cmFindLibraryCommand.h similarity index 59% rename from Source/cmFindLibraryRule.h rename to Source/cmFindLibraryCommand.h index f8dc66e60..a10640928 100644 --- a/Source/cmFindLibraryRule.h +++ b/Source/cmFindLibraryCommand.h @@ -13,51 +13,45 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmFindLibraryRule_h -#define cmFindLibraryRule_h +#ifndef cmFindLibraryCommand_h +#define cmFindLibraryCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmFindLibraryRule - * \brief Define a rule to search for a library. +/** \class cmFindLibraryCommand + * \brief Define a command to search for a library. * - * cmFindLibraryRule is used to define a CMake variable - * that specifies a library. The rule searches for a given + * cmFindLibraryCommand is used to define a CMake variable + * that specifies a library. The command searches for a given * file in a list of directories. */ -class cmFindLibraryRule : public cmRuleMaker +class cmFindLibraryCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmFindLibraryRule; + return new cmFindLibraryCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() {return true;} /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() {return "FIND_LIBRARY";} diff --git a/Source/cmFindProgramRule.cxx b/Source/cmFindProgramCommand.cxx similarity index 93% rename from Source/cmFindProgramRule.cxx rename to Source/cmFindProgramCommand.cxx index f8abba1bd..1c0d6e16f 100644 --- a/Source/cmFindProgramRule.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -13,7 +13,7 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmFindProgramRule.h" +#include "cmFindProgramCommand.h" #include #include @@ -44,8 +44,8 @@ static void GetPath(std::vector& path) -// cmFindProgramRule -bool cmFindProgramRule::Invoke(std::vector& args) +// cmFindProgramCommand +bool cmFindProgramCommand::Invoke(std::vector& args) { if(args.size() < 2 ) { diff --git a/Source/cmFindProgramRule.h b/Source/cmFindProgramCommand.h similarity index 61% rename from Source/cmFindProgramRule.h rename to Source/cmFindProgramCommand.h index 97b954ac3..8aa7ee9ce 100644 --- a/Source/cmFindProgramRule.h +++ b/Source/cmFindProgramCommand.h @@ -13,51 +13,45 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmFindProgramRule_h -#define cmFindProgramRule_h +#ifndef cmFindProgramCommand_h +#define cmFindProgramCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmFindProgramRule - * \brief Define a rule to search for an executable program. +/** \class cmFindProgramCommand + * \brief Define a command to search for an executable program. * - * cmFindProgramRule is used to define a CMake variable - * that specifies an executable program. The rule searches + * cmFindProgramCommand is used to define a CMake variable + * that specifies an executable program. The command searches * in the current path (e.g., PATH environment variable) for * an executable that matches one of the supplied names. */ -class cmFindProgramRule : public cmRuleMaker +class cmFindProgramCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmFindProgramRule; + return new cmFindProgramCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() { return true; } /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "FIND_PROGRARM";} diff --git a/Source/cmIncludeDirectoryRule.cxx b/Source/cmIncludeDirectoryCommand.cxx similarity index 83% rename from Source/cmIncludeDirectoryRule.cxx rename to Source/cmIncludeDirectoryCommand.cxx index 5b65272c6..6c6f21d17 100644 --- a/Source/cmIncludeDirectoryRule.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmIncludeDirectoryRule.h" +#include "cmIncludeDirectoryCommand.h" -// cmIncludeDirectoryRule -bool cmIncludeDirectoryRule::Invoke(std::vector& args) +// cmIncludeDirectoryCommand +bool cmIncludeDirectoryCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmIncludeDirectoryRule.h b/Source/cmIncludeDirectoryCommand.h similarity index 63% rename from Source/cmIncludeDirectoryRule.h rename to Source/cmIncludeDirectoryCommand.h index ad7ce7ba8..4236880c0 100644 --- a/Source/cmIncludeDirectoryRule.h +++ b/Source/cmIncludeDirectoryCommand.h @@ -13,49 +13,43 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmIncludeDirectoryRule_h -#define cmIncludeDirectoryRule_h +#ifndef cmIncludeDirectoryCommand_h +#define cmIncludeDirectoryCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmIncludeDirectoryRule +/** \class cmIncludeDirectoryCommand * \brief Add include directories to the build. * - * cmIncludeDirectoryRule is used to specify directory locations + * cmIncludeDirectoryCommand is used to specify directory locations * to search for included files. */ -class cmIncludeDirectoryRule : public cmRuleMaker +class cmIncludeDirectoryCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmIncludeDirectoryRule; + return new cmIncludeDirectoryCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() {return true;} /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "INCLUDE_DIRECTORIES";} diff --git a/Source/cmLibraryRule.cxx b/Source/cmLibraryCommand.cxx similarity index 84% rename from Source/cmLibraryRule.cxx rename to Source/cmLibraryCommand.cxx index c090b5a66..02e5dc815 100644 --- a/Source/cmLibraryRule.cxx +++ b/Source/cmLibraryCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmLibraryRule.h" +#include "cmLibraryCommand.h" -// cmLibraryRule -bool cmLibraryRule::Invoke(std::vector& args) +// cmLibraryCommand +bool cmLibraryCommand::Invoke(std::vector& args) { if(args.size() < 1 || args.size() > 1) { diff --git a/Source/cmLibraryRule.h b/Source/cmLibraryCommand.h similarity index 63% rename from Source/cmLibraryRule.h rename to Source/cmLibraryCommand.h index 7bde5c083..74957cb66 100644 --- a/Source/cmLibraryRule.h +++ b/Source/cmLibraryCommand.h @@ -13,44 +13,38 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmLibraryRule_h -#define cmLibraryRule_h +#ifndef cmLibraryCommand_h +#define cmLibraryCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmLibraryRule +/** \class cmLibraryCommand * \brief Specify a name for a library. * - * cmLibraryRule is used to specify the name of a library to be + * cmLibraryCommand is used to specify the name of a library to be * generated by the build process. */ -class cmLibraryRule : public cmRuleMaker +class cmLibraryCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmLibraryRule; + return new cmLibraryCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "LIBRARY";} diff --git a/Source/cmLinkDirectoriesRule.cxx b/Source/cmLinkDirectoriesCommand.cxx similarity index 83% rename from Source/cmLinkDirectoriesRule.cxx rename to Source/cmLinkDirectoriesCommand.cxx index 136c7bc6c..eee892353 100644 --- a/Source/cmLinkDirectoriesRule.cxx +++ b/Source/cmLinkDirectoriesCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmLinkDirectoriesRule.h" +#include "cmLinkDirectoriesCommand.h" -// cmLinkDirectoriesRule -bool cmLinkDirectoriesRule::Invoke(std::vector& args) +// cmLinkDirectoriesCommand +bool cmLinkDirectoriesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmLinkDirectoriesRule.h b/Source/cmLinkDirectoriesCommand.h similarity index 66% rename from Source/cmLinkDirectoriesRule.h rename to Source/cmLinkDirectoriesCommand.h index a46c39517..783c8802f 100644 --- a/Source/cmLinkDirectoriesRule.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -13,51 +13,45 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmLinkDirectoriesRule_h -#define cmLinkDirectoriesRule_h +#ifndef cmLinkDirectoriesCommand_h +#define cmLinkDirectoriesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmLinkDirectoriesRule +/** \class cmLinkDirectoriesCommand * \brief Define a list of directories containing files to link. * - * cmLinkDirectoriesRule is used to specify a list + * cmLinkDirectoriesCommand is used to specify a list * of directories containing files to link into executable(s). - * Note that the rule supports the use of CMake built-in variables + * Note that the command supports the use of CMake built-in variables * such as CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR. */ -class cmLinkDirectoriesRule : public cmRuleMaker +class cmLinkDirectoriesCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmLinkDirectoriesRule; + return new cmLinkDirectoriesCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() { return true; } /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "LINK_DIRECTORIES";} diff --git a/Source/cmLinkLibrariesRule.cxx b/Source/cmLinkLibrariesCommand.cxx similarity index 84% rename from Source/cmLinkLibrariesRule.cxx rename to Source/cmLinkLibrariesCommand.cxx index 714a4abc1..4215147d0 100644 --- a/Source/cmLinkLibrariesRule.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmLinkLibrariesRule.h" +#include "cmLinkLibrariesCommand.h" -// cmLinkLibrariesRule -bool cmLinkLibrariesRule::Invoke(std::vector& args) +// cmLinkLibrariesCommand +bool cmLinkLibrariesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmLinkLibrariesRule.h b/Source/cmLinkLibrariesCommand.h similarity index 59% rename from Source/cmLinkLibrariesRule.h rename to Source/cmLinkLibrariesCommand.h index 5a80b899e..31e931031 100644 --- a/Source/cmLinkLibrariesRule.h +++ b/Source/cmLinkLibrariesCommand.h @@ -13,50 +13,44 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmLinkLibrariesRule_h -#define cmLinkLibrariesRule_h +#ifndef cmLinkLibrariesCommand_h +#define cmLinkLibrariesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmLinkLibrariesRule +/** \class cmLinkLibrariesCommand * \brief Specify a list of libraries to link into executables. * - * cmLinkLibrariesRule is used to specify a list of libraries to link + * cmLinkLibrariesCommand is used to specify a list of libraries to link * into executable(s) or shared objects. The names of the libraries - * should be those defined by the LIBRARY(library) rule(s). + * should be those defined by the LIBRARY(library) command(s). */ -class cmLinkLibrariesRule : public cmRuleMaker +class cmLinkLibrariesCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmLinkLibrariesRule; + return new cmLinkLibrariesCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() {return true;} /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "LINK_LIBRARIES";} @@ -78,9 +72,9 @@ public: return "LINK_LIBRARIES(library1 library2)\n" "Specify a list of libraries to be linked into\n" - "executables or shared objects. This rule is passed\n" - "down to all other rules. The library name should be\n" - "the same as the name used in the LIBRARY(library) rule."; + "executables or shared objects. This command is passed\n" + "down to all other commands. The library name should be\n" + "the same as the name used in the LIBRARY(library) command."; } }; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 2ecab86b6..eea43f472 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -14,33 +14,33 @@ =========================================================================*/ #include "cmMakefile.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" #include "cmStandardIncludes.h" #include "cmClassFile.h" #include "cmDirectory.h" #include "cmSystemTools.h" #include "cmMakefileGenerator.h" -#include "cmAbstractFilesRule.h" -#include "cmAddTargetRule.h" -#include "cmAuxSourceDirectoryRule.h" -#include "cmExecutablesRule.h" -#include "cmFindIncludeRule.h" -#include "cmFindLibraryRule.h" -#include "cmFindProgramRule.h" -#include "cmIncludeDirectoryRule.h" -#include "cmLibraryRule.h" -#include "cmLinkDirectoriesRule.h" -#include "cmLinkLibrariesRule.h" -#include "cmProjectRule.h" -#include "cmSourceFilesRule.h" -#include "cmSourceFilesRequireRule.h" -#include "cmSubdirRule.h" -#include "cmUnixDefinesRule.h" -#include "cmUnixLibrariesRule.h" -#include "cmWin32DefinesRule.h" -#include "cmWin32LibrariesRule.h" -#include "cmTestsRule.h" +#include "cmAbstractFilesCommand.h" +#include "cmAddTargetCommand.h" +#include "cmAuxSourceDirectoryCommand.h" +#include "cmExecutablesCommand.h" +#include "cmFindIncludeCommand.h" +#include "cmFindLibraryCommand.h" +#include "cmFindProgramCommand.h" +#include "cmIncludeDirectoryCommand.h" +#include "cmLibraryCommand.h" +#include "cmLinkDirectoriesCommand.h" +#include "cmLinkLibrariesCommand.h" +#include "cmProjectCommand.h" +#include "cmSourceFilesCommand.h" +#include "cmSourceFilesRequireCommand.h" +#include "cmSubdirCommand.h" +#include "cmUnixDefinesCommand.h" +#include "cmUnixLibrariesCommand.h" +#include "cmWin32DefinesCommand.h" +#include "cmWin32LibrariesCommand.h" +#include "cmTestsCommand.h" // default is not to be building executables cmMakefile::cmMakefile() @@ -48,37 +48,37 @@ cmMakefile::cmMakefile() m_DefineFlags = " "; m_Executables = false; m_MakefileGenerator = 0; - this->AddDefaultRules(); + this->AddDefaultCommands(); } -void cmMakefile::AddDefaultRules() +void cmMakefile::AddDefaultCommands() { - this->AddRuleMaker(new cmAbstractFilesRule); - this->AddRuleMaker(new cmAddTargetRule); - this->AddRuleMaker(new cmAuxSourceDirectoryRule); - this->AddRuleMaker(new cmExecutablesRule); - this->AddRuleMaker(new cmFindIncludeRule); - this->AddRuleMaker(new cmFindLibraryRule); - this->AddRuleMaker(new cmFindProgramRule); - this->AddRuleMaker(new cmIncludeDirectoryRule); - this->AddRuleMaker(new cmLibraryRule); - this->AddRuleMaker(new cmLinkDirectoriesRule); - this->AddRuleMaker(new cmLinkLibrariesRule); - this->AddRuleMaker(new cmProjectRule); - this->AddRuleMaker(new cmSourceFilesRule); - this->AddRuleMaker(new cmSourceFilesRequireRule); - this->AddRuleMaker(new cmSubdirRule); - this->AddRuleMaker(new cmUnixLibrariesRule); - this->AddRuleMaker(new cmUnixDefinesRule); - this->AddRuleMaker(new cmWin32LibrariesRule); - this->AddRuleMaker(new cmWin32DefinesRule); - this->AddRuleMaker(new cmTestsRule); + this->AddCommand(new cmAbstractFilesCommand); + this->AddCommand(new cmAddTargetCommand); + this->AddCommand(new cmAuxSourceDirectoryCommand); + this->AddCommand(new cmExecutablesCommand); + this->AddCommand(new cmFindIncludeCommand); + this->AddCommand(new cmFindLibraryCommand); + this->AddCommand(new cmFindProgramCommand); + this->AddCommand(new cmIncludeDirectoryCommand); + this->AddCommand(new cmLibraryCommand); + this->AddCommand(new cmLinkDirectoriesCommand); + this->AddCommand(new cmLinkLibrariesCommand); + this->AddCommand(new cmProjectCommand); + this->AddCommand(new cmSourceFilesCommand); + this->AddCommand(new cmSourceFilesRequireCommand); + this->AddCommand(new cmSubdirCommand); + this->AddCommand(new cmUnixLibrariesCommand); + this->AddCommand(new cmUnixDefinesCommand); + this->AddCommand(new cmWin32LibrariesCommand); + this->AddCommand(new cmWin32DefinesCommand); + this->AddCommand(new cmTestsCommand); #ifdef _WIN32 this->AddDefinition("WIN32", "1"); #else this->AddDefinition("UNIX", "1"); #endif - // Cygwin is more like unix so enable the unix rules + // Cygwin is more like unix so enable the unix commands #if defined(__CYGWIN__) this->AddDefinition("UNIX", "1"); #endif @@ -87,12 +87,12 @@ void cmMakefile::AddDefaultRules() cmMakefile::~cmMakefile() { - for(int i=0; i < m_UsedRuleMakers.size(); i++) + for(int i=0; i < m_UsedCommands.size(); i++) { - delete m_UsedRuleMakers[i]; + delete m_UsedCommands[i]; } - for(StringRuleMakerMap::iterator j = m_RuleMakers.begin(); - j != m_RuleMakers.end(); ++j) + for(RegisteredCommandsMap::iterator j = m_Commands.begin(); + j != m_Commands.end(); ++j) { delete (*j).second; } @@ -162,8 +162,8 @@ bool cmMakefile::ReadMakefile(const char* filename, bool inheriting) { if(cmSystemTools::ParseFunction(fin, name, arguments) ) { - // Special rule that needs to be removed when - // ADD_RULE is implemented + // Special command that needs to be removed when + // ADD_COMMAND is implemented if(name == "VERBATIM") { if(!inheriting) @@ -173,23 +173,23 @@ bool cmMakefile::ReadMakefile(const char* filename, bool inheriting) } else { - StringRuleMakerMap::iterator pos = m_RuleMakers.find(name); - if(pos != m_RuleMakers.end()) + RegisteredCommandsMap::iterator pos = m_Commands.find(name); + if(pos != m_Commands.end()) { - cmRuleMaker* rm = (*pos).second; - cmRuleMaker* usedMaker = rm->Clone(); - usedMaker->SetMakefile(this); - usedMaker->LoadCache(); - m_UsedRuleMakers.push_back(usedMaker); - if(usedMaker->GetEnabled()) + cmCommand* rm = (*pos).second; + cmCommand* usedCommand = rm->Clone(); + usedCommand->SetMakefile(this); + usedCommand->LoadCache(); + m_UsedCommands.push_back(usedCommand); + if(usedCommand->GetEnabled()) { // if not running in inherit mode or - // if the rule is inherited then Invoke it. - if(!inheriting || usedMaker->IsInherited()) + // if the command is inherited then Invoke it. + if(!inheriting || usedCommand->IsInherited()) { - if(!usedMaker->Invoke(arguments)) + if(!usedCommand->Invoke(arguments)) { - cmSystemTools::Error(usedMaker->GetError()); + cmSystemTools::Error(usedCommand->GetError()); } } } @@ -205,10 +205,10 @@ bool cmMakefile::ReadMakefile(const char* filename, bool inheriting) } -void cmMakefile::AddRuleMaker(cmRuleMaker* wg) +void cmMakefile::AddCommand(cmCommand* wg) { std::string name = wg->GetName(); - m_RuleMakers.insert( StringRuleMakerMap::value_type(name, wg)); + m_Commands.insert( RegisteredCommandsMap::value_type(name, wg)); } // Set the make file @@ -225,10 +225,10 @@ void cmMakefile::GenerateMakefile() this->ExpandVaribles(); // set the makefile on the generator m_MakefileGenerator->SetMakefile(this); - // give all the rules a chance to do something + // give all the commands a chance to do something // after the file has been parsed before generation - for(std::vector::iterator i = m_UsedRuleMakers.begin(); - i != m_UsedRuleMakers.end(); ++i) + for(std::vector::iterator i = m_UsedCommands.begin(); + i != m_UsedCommands.end(); ++i) { (*i)->FinalPass(); } @@ -243,17 +243,17 @@ void cmMakefile::AddClass(cmClassFile& cmfile) -void cmMakefile::AddCustomRule(const char* source, +void cmMakefile::AddCustomCommand(const char* source, const char* result, const char* command, std::vector& depends) { - cmMakefile::customRule rule; - rule.m_Source = source; - rule.m_Result = result; - rule.m_Command = command; - rule.m_Depends = depends; - m_CustomRules.push_back(rule); + cmMakefile::customCommand customCommand; + customCommand.m_Source = source; + customCommand.m_Result = result; + customCommand.m_Command = command; + customCommand.m_Depends = depends; + m_CustomCommands.push_back(customCommand); } void cmMakefile::AddDefineFlag(const char* flag) @@ -384,13 +384,13 @@ int cmMakefile::DumpDocumentationToFile(const char *fileName) return 0; } - // Loop over all registered rules and print out documentation + // Loop over all registered commands and print out documentation const char *name; const char *terse; const char *full; - for(StringRuleMakerMap::iterator j = m_RuleMakers.begin(); - j != m_RuleMakers.end(); ++j) + for(RegisteredCommandsMap::iterator j = m_Commands.begin(); + j != m_Commands.end(); ++j) { name = (*j).second->GetName(); terse = (*j).second->GetTerseDocumentation(); diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 6a444b470..c1a698068 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -20,14 +20,14 @@ #include "cmClassFile.h" #include "cmSystemTools.h" -class cmRuleMaker; +class cmCommand; class cmMakefileGenerator; /** \class cmMakefile * \brief Process the input CMakeLists.txt file. * * Process and store into memory the input CMakeLists.txt file. - * Each CMakeLists.txt file is parsed and the rules found there + * Each CMakeLists.txt file is parsed and the commands found there * are added into the build process. */ class cmMakefile @@ -51,7 +51,7 @@ public: /** * Add a wrapper generator. */ - void AddRuleMaker(cmRuleMaker* ); + void AddCommand(cmCommand* ); /** * Specify the makefile generator. This is platform/compiler @@ -71,9 +71,9 @@ public: void Print(); /** - * Add a custom rule to the build. + * Add a custom command to the build. */ - void AddCustomRule(const char* source, + void AddCustomCommand(const char* source, const char* result, const char* command, std::vector& depends); @@ -326,19 +326,19 @@ protected: std::vector m_LinkLibrariesUnix; std::string m_DefineFlags; std::string m_SourceHomeDirectory; - struct customRule + struct customCommand { std::string m_Source; std::string m_Result; std::string m_Command; std::vector m_Depends; }; - std::vector m_CustomRules; - typedef std::map StringRuleMakerMap; + std::vector m_CustomCommands; + typedef std::map RegisteredCommandsMap; typedef std::map DefinitionMap; DefinitionMap m_Definitions; - StringRuleMakerMap m_RuleMakers; - std::vector m_UsedRuleMakers; + RegisteredCommandsMap m_Commands; + std::vector m_UsedCommands; cmMakefileGenerator* m_MakefileGenerator; private: @@ -358,7 +358,7 @@ private: friend class cmMakeDepend; // make depend needs direct access // to the m_Classes array void PrintStringVector(const char* s, std::vector& v); - void AddDefaultRules(); + void AddDefaultCommands(); }; diff --git a/Source/cmMakefileGenerator.h b/Source/cmMakefileGenerator.h index 2ab50e441..974e98c05 100644 --- a/Source/cmMakefileGenerator.h +++ b/Source/cmMakefileGenerator.h @@ -36,7 +36,7 @@ public: void SetMakefile(cmMakefile*); /** - * Generate the makefile using the m_Makefile, m_CustomRules, + * Generate the makefile using the m_Makefile, m_CustomCommands, * and m_ExtraSourceFiles. All subclasses of cmMakefileGenerator * must implement this method. */ diff --git a/Source/cmProjectRule.cxx b/Source/cmProjectCommand.cxx similarity index 84% rename from Source/cmProjectRule.cxx rename to Source/cmProjectCommand.cxx index b1a88c2d6..b35e15d0e 100644 --- a/Source/cmProjectRule.cxx +++ b/Source/cmProjectCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmProjectRule.h" +#include "cmProjectCommand.h" -// cmProjectRule -bool cmProjectRule::Invoke(std::vector& args) +// cmProjectCommand +bool cmProjectCommand::Invoke(std::vector& args) { if(args.size() < 1 || args.size() > 1) { diff --git a/Source/cmProjectRule.h b/Source/cmProjectCommand.h similarity index 65% rename from Source/cmProjectRule.h rename to Source/cmProjectCommand.h index 304bcb332..3a705e8dd 100644 --- a/Source/cmProjectRule.h +++ b/Source/cmProjectCommand.h @@ -13,44 +13,38 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmProjectRule_h -#define cmProjectRule_h +#ifndef cmProjectCommand_h +#define cmProjectCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmProjectRule +/** \class cmProjectCommand * \brief Specify the name for this build project. * - * cmProjectRule is used to specify a name for this build project. + * cmProjectCommand is used to specify a name for this build project. * It is defined once per set of CMakeList.txt files (including * all subdirectories). */ -class cmProjectRule : public cmRuleMaker +class cmProjectCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmProjectRule; + return new cmProjectCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() {return "PROJECT";} diff --git a/Source/cmSourceFilesRule.cxx b/Source/cmSourceFilesCommand.cxx similarity index 86% rename from Source/cmSourceFilesRule.cxx rename to Source/cmSourceFilesCommand.cxx index 11eec2d73..0e08de18b 100644 --- a/Source/cmSourceFilesRule.cxx +++ b/Source/cmSourceFilesCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmSourceFilesRule.h" +#include "cmSourceFilesCommand.h" -// cmSourceFilesRule -bool cmSourceFilesRule::Invoke(std::vector& args) +// cmSourceFilesCommand +bool cmSourceFilesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmSourceFilesRule.h b/Source/cmSourceFilesCommand.h similarity index 62% rename from Source/cmSourceFilesRule.h rename to Source/cmSourceFilesCommand.h index 36fe3b912..f53433982 100644 --- a/Source/cmSourceFilesRule.h +++ b/Source/cmSourceFilesCommand.h @@ -13,48 +13,42 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmSourceFilesRule_h -#define cmSourceFilesRule_h +#ifndef cmSourceFilesCommand_h +#define cmSourceFilesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmSourceFilesRule +/** \class cmSourceFilesCommand * \brief Add source files to the build. * - * cmSourceFilesRule adds source files to the build. The source + * cmSourceFilesCommand adds source files to the build. The source * files will be added to the current library (if defined by the - * LIBRARY(library) rule. Use this rule to add source files not + * LIBRARY(library) command. Use this command to add source files not * dependent on other packages (use SOURCE_FILES_REQUIRED() to add * dependent source files). * - * \sa cmSourceFilesRequireRule + * \sa cmSourceFilesRequireCommand */ -class cmSourceFilesRule : public cmRuleMaker +class cmSourceFilesCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmSourceFilesRule; + return new cmSourceFilesCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "SOURCE_FILES";} diff --git a/Source/cmSourceFilesRequireRule.cxx b/Source/cmSourceFilesRequireCommand.cxx similarity index 89% rename from Source/cmSourceFilesRequireRule.cxx rename to Source/cmSourceFilesRequireCommand.cxx index 27552050f..a48968989 100644 --- a/Source/cmSourceFilesRequireRule.cxx +++ b/Source/cmSourceFilesRequireCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmSourceFilesRequireRule.h" +#include "cmSourceFilesRequireCommand.h" -// cmSourceFilesRequireRule -bool cmSourceFilesRequireRule::Invoke(std::vector& args) +// cmSourceFilesRequireCommand +bool cmSourceFilesRequireCommand::Invoke(std::vector& args) { if(args.size() < 3 ) { diff --git a/Source/cmSourceFilesRequireRule.h b/Source/cmSourceFilesRequireCommand.h similarity index 64% rename from Source/cmSourceFilesRequireRule.h rename to Source/cmSourceFilesRequireCommand.h index ba8b2e398..e84c21e22 100644 --- a/Source/cmSourceFilesRequireRule.h +++ b/Source/cmSourceFilesRequireCommand.h @@ -13,46 +13,40 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmSourceFilesRequireRule_h -#define cmSourceFilesRequireRule_h +#ifndef cmSourceFilesRequireCommand_h +#define cmSourceFilesRequireCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmSourceFilesRequireRule +/** \class cmSourceFilesRequireCommand * \brief Add additional sources to the build if certain required files * or CMake variables are defined. * - * cmSourceFilesRequireRule conditionally adds source files to the + * cmSourceFilesRequireCommand conditionally adds source files to the * build if the specified files of CMake variables are defined. - * This rule can be used to add source files that depend on external + * This command can be used to add source files that depend on external * packages or operating system features. */ -class cmSourceFilesRequireRule : public cmRuleMaker +class cmSourceFilesRequireCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmSourceFilesRequireRule; + return new cmSourceFilesRequireCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "SOURCE_FILES_REQUIRE";} diff --git a/Source/cmSubdirRule.cxx b/Source/cmSubdirCommand.cxx similarity index 86% rename from Source/cmSubdirRule.cxx rename to Source/cmSubdirCommand.cxx index e0f640276..943b8b92a 100644 --- a/Source/cmSubdirRule.cxx +++ b/Source/cmSubdirCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmSubdirRule.h" +#include "cmSubdirCommand.h" -// cmSubdirRule -bool cmSubdirRule::Invoke(std::vector& args) +// cmSubdirCommand +bool cmSubdirCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmSubdirRule.h b/Source/cmSubdirCommand.h similarity index 69% rename from Source/cmSubdirRule.h rename to Source/cmSubdirCommand.h index 5b708c6a6..43a501e0b 100644 --- a/Source/cmSubdirRule.h +++ b/Source/cmSubdirCommand.h @@ -13,44 +13,38 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmSubdirRule_h -#define cmSubdirRule_h +#ifndef cmSubdirCommand_h +#define cmSubdirCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmSubdirRule +/** \class cmSubdirCommand * \brief Specify a list of subdirectories to build. * - * cmSubdirRule specifies a list of subdirectories to process + * cmSubdirCommand specifies a list of subdirectories to process * by CMake. For each subdirectory listed, CMake will descend * into that subdirectory and process any CMakeLists.txt found. */ -class cmSubdirRule : public cmRuleMaker +class cmSubdirCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmSubdirRule; + return new cmSubdirCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "SUBDIRS";} diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 199d29c70..cabdac05c 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -65,7 +65,7 @@ public: static void ConvertCygwinPath(std::string& pathname); /** - * Read a CMake rule (or function) from an input file. This + * Read a CMake command (or function) from an input file. This * returns the name of the function and a list of its * arguments. */ diff --git a/Source/cmTestsRule.cxx b/Source/cmTestsCommand.cxx similarity index 87% rename from Source/cmTestsRule.cxx rename to Source/cmTestsCommand.cxx index 7bf66e066..4707ab938 100644 --- a/Source/cmTestsRule.cxx +++ b/Source/cmTestsCommand.cxx @@ -13,10 +13,10 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmTestsRule.h" +#include "cmTestsCommand.h" -// cmExecutableRule -bool cmTestsRule::Invoke(std::vector& args) +// cmExecutableCommand +bool cmTestsCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmTestsRule.h b/Source/cmTestsCommand.h similarity index 60% rename from Source/cmTestsRule.h rename to Source/cmTestsCommand.h index cc1686c19..ec001b3c3 100644 --- a/Source/cmTestsRule.h +++ b/Source/cmTestsCommand.h @@ -13,47 +13,41 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmTestsRule_h -#define cmTestsRule_h +#ifndef cmTestsCommand_h +#define cmTestsCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmTestsRule +/** \class cmTestsCommand * \brief Specify a list of executables to build and which are * identified as tests. * - * cmTestsRule specifies a list of executables to be built by CMake. - * These executables are identified as tests. This rule is similar to - * the EXECUTABLES() rule. + * cmTestsCommand specifies a list of executables to be built by CMake. + * These executables are identified as tests. This command is similar to + * the EXECUTABLES() command. * - * \sa cmExecutablesRule + * \sa cmExecutablesCommand */ -class cmTestsRule : public cmRuleMaker +class cmTestsCommand : public cmCommand { public: /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmTestsRule; + return new cmTestsCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() {return "TESTS";} diff --git a/Source/cmUnixDefinesRule.cxx b/Source/cmUnixDefinesCommand.cxx similarity index 82% rename from Source/cmUnixDefinesRule.cxx rename to Source/cmUnixDefinesCommand.cxx index 05ec4ca87..00f9a9a06 100644 --- a/Source/cmUnixDefinesRule.cxx +++ b/Source/cmUnixDefinesCommand.cxx @@ -13,17 +13,17 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmUnixDefinesRule.h" +#include "cmUnixDefinesCommand.h" -cmUnixDefinesRule::cmUnixDefinesRule() +cmUnixDefinesCommand::cmUnixDefinesCommand() { #if defined(_WIN32) && !defined(__CYGWIN__) this->EnabledOff(); #endif } -// cmUNIXDefinesRule -bool cmUnixDefinesRule::Invoke(std::vector& args) +// cmUNIXDefinesCommand +bool cmUnixDefinesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmUnixDefinesRule.h b/Source/cmUnixDefinesCommand.h similarity index 65% rename from Source/cmUnixDefinesRule.h rename to Source/cmUnixDefinesCommand.h index aa2e28101..f912ff4da 100644 --- a/Source/cmUnixDefinesRule.h +++ b/Source/cmUnixDefinesCommand.h @@ -13,54 +13,48 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmUnixDefinesRule_h -#define cmUnixDefinesRule_h +#ifndef cmUnixDefinesCommand_h +#define cmUnixDefinesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmUnixDefinesRule +/** \class cmUnixDefinesCommand * \brief Specify a list of compiler defines for Unix platforms. * - * cmUnixDefinesRule specifies a list of compiler defines for Unix platforms + * cmUnixDefinesCommand specifies a list of compiler defines for Unix platforms * only. This defines will be added to the compile command. */ -class cmUnixDefinesRule : public cmRuleMaker +class cmUnixDefinesCommand : public cmCommand { public: /** * Constructor. */ - cmUnixDefinesRule(); + cmUnixDefinesCommand(); /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmUnixDefinesRule; + return new cmUnixDefinesCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() {return true;} /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "UNIX_DEFINES";} diff --git a/Source/cmUnixLibrariesRule.cxx b/Source/cmUnixLibrariesCommand.cxx similarity index 81% rename from Source/cmUnixLibrariesRule.cxx rename to Source/cmUnixLibrariesCommand.cxx index 48e04170e..a32529ce5 100644 --- a/Source/cmUnixLibrariesRule.cxx +++ b/Source/cmUnixLibrariesCommand.cxx @@ -13,17 +13,17 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmUnixLibrariesRule.h" +#include "cmUnixLibrariesCommand.h" -cmUnixLibrariesRule::cmUnixLibrariesRule() +cmUnixLibrariesCommand::cmUnixLibrariesCommand() { #if defined(_WIN32) && !defined(__CYGWIN__) this->EnabledOff(); #endif } -// cmUnixLibrariesRule -bool cmUnixLibrariesRule::Invoke(std::vector& args) +// cmUnixLibrariesCommand +bool cmUnixLibrariesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmUnixLibrariesRule.h b/Source/cmUnixLibrariesCommand.h similarity index 64% rename from Source/cmUnixLibrariesRule.h rename to Source/cmUnixLibrariesCommand.h index 41b6e4c2a..80a77a482 100644 --- a/Source/cmUnixLibrariesRule.h +++ b/Source/cmUnixLibrariesCommand.h @@ -13,54 +13,48 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmUnixLibrariesRule_h -#define cmUnixLibrariesRule_h +#ifndef cmUnixLibrariesCommand_h +#define cmUnixLibrariesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmUnixLibrariesRule +/** \class cmUnixLibrariesCommand * \brief Specify a list of libraries for Unix platforms. * - * cmUnixLibrariesRule specifies a list of libraries for Unix platforms + * cmUnixLibrariesCommand specifies a list of libraries for Unix platforms * only. Both user and system libraries can be listed. */ -class cmUnixLibrariesRule : public cmRuleMaker +class cmUnixLibrariesCommand : public cmCommand { public: /** * Constructor. */ - cmUnixLibrariesRule(); + cmUnixLibrariesCommand(); /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmUnixLibrariesRule; + return new cmUnixLibrariesCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() {return true;} /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() {return "UNIX_LIBRARIES";} diff --git a/Source/cmWin32DefinesRule.cxx b/Source/cmWin32DefinesCommand.cxx similarity index 81% rename from Source/cmWin32DefinesRule.cxx rename to Source/cmWin32DefinesCommand.cxx index 43ed63660..4821b86e1 100644 --- a/Source/cmWin32DefinesRule.cxx +++ b/Source/cmWin32DefinesCommand.cxx @@ -13,17 +13,17 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmWin32DefinesRule.h" +#include "cmWin32DefinesCommand.h" -cmWin32DefinesRule::cmWin32DefinesRule() +cmWin32DefinesCommand::cmWin32DefinesCommand() { #ifndef _WIN32 this->EnabledOff(); #endif } -// cmWin32DefinesRule -bool cmWin32DefinesRule::Invoke(std::vector& args) +// cmWin32DefinesCommand +bool cmWin32DefinesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmWin32DefinesRule.h b/Source/cmWin32DefinesCommand.h similarity index 65% rename from Source/cmWin32DefinesRule.h rename to Source/cmWin32DefinesCommand.h index 4268a8ed6..a8e0da89f 100644 --- a/Source/cmWin32DefinesRule.h +++ b/Source/cmWin32DefinesCommand.h @@ -13,54 +13,48 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmWin32DefinesRule_h -#define cmWin32DefinesRule_h +#ifndef cmWin32DefinesCommand_h +#define cmWin32DefinesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmWin32DefinesRule +/** \class cmWin32DefinesCommand * \brief Specify a list of compiler defines for Win32 platforms. * - * cmWin32DefinesRule specifies a list of compiler defines for Win32 platforms + * cmWin32DefinesCommand specifies a list of compiler defines for Win32 platforms * only. This defines will be added to the compile command. */ -class cmWin32DefinesRule : public cmRuleMaker +class cmWin32DefinesCommand : public cmCommand { public: /** * Constructor. */ - cmWin32DefinesRule(); + cmWin32DefinesCommand(); /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmWin32DefinesRule; + return new cmWin32DefinesCommand; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() {return true;} /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() {return "WIN32_DEFINES";} diff --git a/Source/cmWin32LibrariesRule.cxx b/Source/cmWin32LibrariesCommand.cxx similarity index 80% rename from Source/cmWin32LibrariesRule.cxx rename to Source/cmWin32LibrariesCommand.cxx index b8e082db5..a3e02b182 100644 --- a/Source/cmWin32LibrariesRule.cxx +++ b/Source/cmWin32LibrariesCommand.cxx @@ -13,9 +13,9 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#include "cmWin32LibrariesRule.h" +#include "cmWin32LibrariesCommand.h" -cmWin32LibrariesRule::cmWin32LibrariesRule() +cmWin32LibrariesCommand::cmWin32LibrariesCommand() { #ifndef _WIN32 this->EnabledOff(); @@ -23,8 +23,8 @@ cmWin32LibrariesRule::cmWin32LibrariesRule() } -// cmWin32LibrariesRule -bool cmWin32LibrariesRule::Invoke(std::vector& args) +// cmWin32LibrariesCommand +bool cmWin32LibrariesCommand::Invoke(std::vector& args) { if(args.size() < 1 ) { diff --git a/Source/cmWin32LibrariesRule.h b/Source/cmWin32LibrariesCommand.h similarity index 63% rename from Source/cmWin32LibrariesRule.h rename to Source/cmWin32LibrariesCommand.h index 038295faf..61d7b189d 100644 --- a/Source/cmWin32LibrariesRule.h +++ b/Source/cmWin32LibrariesCommand.h @@ -13,54 +13,48 @@ See COPYRIGHT.txt for copyright details. =========================================================================*/ -#ifndef cmWin32LibrariesRule_h -#define cmWin32LibrariesRule_h +#ifndef cmWin32LibrariesCommand_h +#define cmWin32LibrariesCommand_h #include "cmStandardIncludes.h" -#include "cmRuleMaker.h" +#include "cmCommand.h" -/** \class cmWin32LibrariesRule +/** \class cmWin32LibrariesCommand * \brief Specify a list of libraries for Win32 platforms. * - * cmWin32LibrariesRule specifies a list of libraries for Win32 platforms + * cmWin32LibrariesCommand specifies a list of libraries for Win32 platforms * only. Both user and system libraries can be listed. */ -class cmWin32LibrariesRule : public cmRuleMaker +class cmWin32LibrariesCommand : public cmCommand { public: /** * Constructor. */ - cmWin32LibrariesRule(); + cmWin32LibrariesCommand(); /** - * This is a virtual constructor for the rule. + * This is a virtual constructor for the command. */ - virtual cmRuleMaker* Clone() + virtual cmCommand* Clone() { - return new cmWin32LibrariesRule ; + return new cmWin32LibrariesCommand ; } /** - * This is called when the rule is first encountered in + * This is called when the command is first encountered in * the CMakeLists.txt file. */ virtual bool Invoke(std::vector& args); /** - * This is called at the end after all the information - * specified by the rules is accumulated. - */ - virtual void FinalPass() { } - - /** - * This determines if the rule gets propagated down + * This determines if the command gets propagated down * to makefiles located in subdirectories. */ virtual bool IsInherited() {return true;} /** - * The name of the rule as specified in CMakeList.txt. + * The name of the command as specified in CMakeList.txt. */ virtual const char* GetName() { return "WIN32_LIBRARIES";}