ENH:Reworked CMake for consistency
This commit is contained in:
parent
cacd6d1604
commit
658614ff6a
|
@ -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
|
|
@ -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@
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmAbstractFilesRule.h"
|
||||
#include "cmAbstractFilesCommand.h"
|
||||
|
||||
// cmAbstractFilesRule
|
||||
bool cmAbstractFilesRule::Invoke(std::vector<std::string>& args)
|
||||
// cmAbstractFilesCommand
|
||||
bool cmAbstractFilesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmAddTargetRule.h"
|
||||
#include "cmAddTargetCommand.h"
|
||||
|
||||
// cmAddTargetRule
|
||||
bool cmAddTargetRule::Invoke(std::vector<std::string>& args)
|
||||
// cmAddTargetCommand
|
||||
bool cmAddTargetCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
|
@ -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<std::string>& args)
|
||||
// cmAuxSourceDirectoryCommand
|
||||
bool cmAuxSourceDirectoryCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 || args.size() > 1)
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -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<std::string>& 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.
|
||||
*/
|
|
@ -1,4 +1,4 @@
|
|||
// Program extracts documentation describing rules from
|
||||
// Program extracts documentation describing commands from
|
||||
// the CMake system.
|
||||
//
|
||||
#include "cmMakefile.h"
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmExecutablesRule.h"
|
||||
#include "cmExecutablesCommand.h"
|
||||
|
||||
// cmExecutableRule
|
||||
bool cmExecutablesRule::Invoke(std::vector<std::string>& args)
|
||||
// cmExecutableCommand
|
||||
bool cmExecutablesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmFindLibraryRule.h"
|
||||
#include "cmFindIncludeCommand.h"
|
||||
|
||||
// cmFindLibraryRule
|
||||
bool cmFindLibraryRule::Invoke(std::vector<std::string>& args)
|
||||
// cmFindIncludeCommand
|
||||
bool cmFindIncludeCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
return false;
|
||||
if(args.size() < 1 )
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmFindIncludeRule.h"
|
||||
#include "cmFindLibraryCommand.h"
|
||||
|
||||
// cmFindIncludeRule
|
||||
bool cmFindIncludeRule::Invoke(std::vector<std::string>& args)
|
||||
// cmFindLibraryCommand
|
||||
bool cmFindLibraryCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
return false;
|
||||
if(args.size() < 1 )
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmFindProgramRule.h"
|
||||
#include "cmFindProgramCommand.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -44,8 +44,8 @@ static void GetPath(std::vector<std::string>& path)
|
|||
|
||||
|
||||
|
||||
// cmFindProgramRule
|
||||
bool cmFindProgramRule::Invoke(std::vector<std::string>& args)
|
||||
// cmFindProgramCommand
|
||||
bool cmFindProgramCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 2 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmIncludeDirectoryRule.h"
|
||||
#include "cmIncludeDirectoryCommand.h"
|
||||
|
||||
// cmIncludeDirectoryRule
|
||||
bool cmIncludeDirectoryRule::Invoke(std::vector<std::string>& args)
|
||||
// cmIncludeDirectoryCommand
|
||||
bool cmIncludeDirectoryCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmLibraryRule.h"
|
||||
#include "cmLibraryCommand.h"
|
||||
|
||||
// cmLibraryRule
|
||||
bool cmLibraryRule::Invoke(std::vector<std::string>& args)
|
||||
// cmLibraryCommand
|
||||
bool cmLibraryCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 || args.size() > 1)
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmLinkDirectoriesRule.h"
|
||||
#include "cmLinkDirectoriesCommand.h"
|
||||
|
||||
// cmLinkDirectoriesRule
|
||||
bool cmLinkDirectoriesRule::Invoke(std::vector<std::string>& args)
|
||||
// cmLinkDirectoriesCommand
|
||||
bool cmLinkDirectoriesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmLinkLibrariesRule.h"
|
||||
#include "cmLinkLibrariesCommand.h"
|
||||
|
||||
// cmLinkLibrariesRule
|
||||
bool cmLinkLibrariesRule::Invoke(std::vector<std::string>& args)
|
||||
// cmLinkLibrariesCommand
|
||||
bool cmLinkLibrariesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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.";
|
||||
}
|
||||
};
|
||||
|
|
@ -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<cmRuleMaker*>::iterator i = m_UsedRuleMakers.begin();
|
||||
i != m_UsedRuleMakers.end(); ++i)
|
||||
for(std::vector<cmCommand*>::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<std::string>& 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();
|
||||
|
|
|
@ -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<std::string>& depends);
|
||||
|
@ -326,19 +326,19 @@ protected:
|
|||
std::vector<std::string> 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<std::string> m_Depends;
|
||||
};
|
||||
std::vector<customRule> m_CustomRules;
|
||||
typedef std::map<std::string, cmRuleMaker*> StringRuleMakerMap;
|
||||
std::vector<customCommand> m_CustomCommands;
|
||||
typedef std::map<std::string, cmCommand*> RegisteredCommandsMap;
|
||||
typedef std::map<std::string, std::string> DefinitionMap;
|
||||
DefinitionMap m_Definitions;
|
||||
StringRuleMakerMap m_RuleMakers;
|
||||
std::vector<cmRuleMaker*> m_UsedRuleMakers;
|
||||
RegisteredCommandsMap m_Commands;
|
||||
std::vector<cmCommand*> 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<std::string>& v);
|
||||
void AddDefaultRules();
|
||||
void AddDefaultCommands();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmProjectRule.h"
|
||||
#include "cmProjectCommand.h"
|
||||
|
||||
// cmProjectRule
|
||||
bool cmProjectRule::Invoke(std::vector<std::string>& args)
|
||||
// cmProjectCommand
|
||||
bool cmProjectCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 || args.size() > 1)
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmSourceFilesRule.h"
|
||||
#include "cmSourceFilesCommand.h"
|
||||
|
||||
// cmSourceFilesRule
|
||||
bool cmSourceFilesRule::Invoke(std::vector<std::string>& args)
|
||||
// cmSourceFilesCommand
|
||||
bool cmSourceFilesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmSourceFilesRequireRule.h"
|
||||
#include "cmSourceFilesRequireCommand.h"
|
||||
|
||||
// cmSourceFilesRequireRule
|
||||
bool cmSourceFilesRequireRule::Invoke(std::vector<std::string>& args)
|
||||
// cmSourceFilesRequireCommand
|
||||
bool cmSourceFilesRequireCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 3 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmSubdirRule.h"
|
||||
#include "cmSubdirCommand.h"
|
||||
|
||||
// cmSubdirRule
|
||||
bool cmSubdirRule::Invoke(std::vector<std::string>& args)
|
||||
// cmSubdirCommand
|
||||
bool cmSubdirCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
See COPYRIGHT.txt for copyright details.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmTestsRule.h"
|
||||
#include "cmTestsCommand.h"
|
||||
|
||||
// cmExecutableRule
|
||||
bool cmTestsRule::Invoke(std::vector<std::string>& args)
|
||||
// cmExecutableCommand
|
||||
bool cmTestsCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -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<std::string>& args)
|
||||
// cmUNIXDefinesCommand
|
||||
bool cmUnixDefinesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -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<std::string>& args)
|
||||
// cmUnixLibrariesCommand
|
||||
bool cmUnixLibrariesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -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<std::string>& args)
|
||||
// cmWin32DefinesCommand
|
||||
bool cmWin32DefinesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
|
@ -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<std::string>& args)
|
||||
// cmWin32LibrariesCommand
|
||||
bool cmWin32LibrariesCommand::Invoke(std::vector<std::string>& args)
|
||||
{
|
||||
if(args.size() < 1 )
|
||||
{
|
|
@ -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<std::string>& 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";}
|
||||
|
Loading…
Reference in New Issue