Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
26dbdd46
Commit
26dbdd46
authored
Jan 10, 2001
by
Will Schroeder
Browse files
ENH:Beginning clean up; adding documentation
parent
26f072df
Changes
25
Hide whitespace changes
Inline
Side-by-side
Source/cmAbstractFilesRule.h
View file @
26dbdd46
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
#ifndef cmAbstractFilesRule_h
#define cmAbstractFilesRule_h
#include
"cmStandardIncludes.h"
#include
"cmRuleMaker.h"
class
cmAbstractFilesRule
:
public
cmRuleMaker
{
public:
...
...
@@ -12,20 +26,36 @@ public:
{
return
new
cmAbstractFilesRule
;
}
// This is called when the rule is firt encountered in
// the input file
/**
* This is called when the rule 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
()
{
}
// This is the name used in the input file.
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual
const
char
*
GetName
()
{
return
"ABSTRACT_FILES"
;}
virtual
const
char
*
TerseDocumentaion
()
/**
* Succinct documentation.
*/
virtual
const
char
*
TerseDocumentation
()
{
return
"A list of abstract classes, useful for wrappers."
;
return
"A list of abstract classes, useful for wrappers."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
/**
* Longer documentation.
*/
virtual
const
char
*
FullDocumentation
()
{
return
"ABSTRACT_FILES(file1 file2 ..)"
;
...
...
Source/cmAddTargetRule.h
View file @
26dbdd46
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
#ifndef cmAddTargetRule_h
#define cmAddTargetRule_h
#include
"cmStandardIncludes.h"
#include
"cmRuleMaker.h"
/** \class cmAddTargetRule
* \brief Rule that adds a target to the build system.
*
* cmAddTargetRule 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
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual
cmRuleMaker
*
Clone
()
{
return
new
cmAddTargetRule
;
return
new
cmAddTargetRule
;
}
// This is called when the rule is firt encountered in
// the input file
/**
* This is called when the rule is first encountered in
* the CMakeLists.txt file.
*/
virtual
bool
Invoke
(
std
::
vector
<
std
::
string
>&
args
);
virtual
void
FinalPass
()
{
}
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"ADD_TARGET"
;}
virtual
const
char
*
TerseDocumentaion
()
/**
* 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.
*/
virtual
const
char
*
GetName
()
{
return
"ADD_TARGET"
;}
/**
* Succinct documentation.
*/
virtual
const
char
*
TerseDocumentation
()
{
return
"Add an extra target to the build system."
;
return
"Add an extra target to the build system."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
/**
* More documentation.
*/
virtual
const
char
*
FullDocumentation
()
{
return
"ADD_TARGET(Name
\"
command to run
\"
);"
;
return
"ADD_TARGET(Name
\"
command to run
\"
);"
;
}
};
#endif
Source/cmAuxSourceDirectoryRule.h
View file @
26dbdd46
...
...
@@ -19,14 +19,14 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"AUX_SOURCE_DIRECTORY"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Add all the source files found in the specified directory to
\n
"
" the build."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"AUX_SOURCE_DIRECTORY(dir)"
;
...
...
Source/cmDSPMakefile.h
View file @
26dbdd46
...
...
@@ -13,33 +13,47 @@
See COPYRIGHT.txt for copyright details.
=========================================================================*/
/**
* cmDSPMakefile generate a microsoft DSP project file.
* see the *.dsptemplate files for information on the templates
* used for making the project files.
*/
#ifndef cmDSPMakefile_h
#define cmDSPMakefile_h
#include
"cmStandardIncludes.h"
#include
"cmMakefile.h"
/** \class cmDSPMakefile
* \brief Generate a Microsoft DSP project file.
*
* cmDSPMakefile generates a Microsoft DSP project file.
* See the *.dsptemplate files for information on the templates
* used for making the project files.
*/
class
cmDSPMakefile
{
public:
cmDSPMakefile
(
cmMakefile
*
);
~
cmDSPMakefile
();
void
OutputDSPFile
();
enum
BuildType
{
STATIC_LIBRARY
,
DLL
,
EXECUTABLE
};
void
SetBuildType
(
BuildType
);
// return array of created DSP names
// Each executable must have its own dsp
enum
BuildType
{
STATIC_LIBRARY
,
DLL
,
EXECUTABLE
};
/**
* Specify the type of the build: static, dll, or executable.
*/
void
SetBuildType
(
BuildType
);
/**
* Return array of created DSP names in a STL vector.
* Each executable must have its own dsp.
*/
std
::
vector
<
std
::
string
>
GetCreatedProjectNames
()
{
return
m_CreatedProjectNames
;
return
m_CreatedProjectNames
;
}
/**
* Return the makefile.
*/
cmMakefile
*
GetMakefile
()
{
return
m_Makefile
;
return
m_Makefile
;
}
private:
...
...
@@ -63,7 +77,7 @@ private:
const
char
*
source
,
const
char
*
result
,
const
char
*
command
);
private:
std
::
string
m_IncludeOptions
;
std
::
string
m_DebugLibraryOptions
;
std
::
string
m_ReleaseLibraryOptions
;
...
...
Source/cmDSPWriter.h
View file @
26dbdd46
...
...
@@ -13,33 +13,47 @@
See COPYRIGHT.txt for copyright details.
=========================================================================*/
/**
* cmDSPMakefile generate a microsoft DSP project file.
* see the *.dsptemplate files for information on the templates
* used for making the project files.
*/
#ifndef cmDSPMakefile_h
#define cmDSPMakefile_h
#include
"cmStandardIncludes.h"
#include
"cmMakefile.h"
/** \class cmDSPMakefile
* \brief Generate a Microsoft DSP project file.
*
* cmDSPMakefile generates a Microsoft DSP project file.
* See the *.dsptemplate files for information on the templates
* used for making the project files.
*/
class
cmDSPMakefile
{
public:
cmDSPMakefile
(
cmMakefile
*
);
~
cmDSPMakefile
();
void
OutputDSPFile
();
enum
BuildType
{
STATIC_LIBRARY
,
DLL
,
EXECUTABLE
};
void
SetBuildType
(
BuildType
);
// return array of created DSP names
// Each executable must have its own dsp
enum
BuildType
{
STATIC_LIBRARY
,
DLL
,
EXECUTABLE
};
/**
* Specify the type of the build: static, dll, or executable.
*/
void
SetBuildType
(
BuildType
);
/**
* Return array of created DSP names in a STL vector.
* Each executable must have its own dsp.
*/
std
::
vector
<
std
::
string
>
GetCreatedProjectNames
()
{
return
m_CreatedProjectNames
;
return
m_CreatedProjectNames
;
}
/**
* Return the makefile.
*/
cmMakefile
*
GetMakefile
()
{
return
m_Makefile
;
return
m_Makefile
;
}
private:
...
...
@@ -63,7 +77,7 @@ private:
const
char
*
source
,
const
char
*
result
,
const
char
*
command
);
private:
std
::
string
m_IncludeOptions
;
std
::
string
m_DebugLibraryOptions
;
std
::
string
m_ReleaseLibraryOptions
;
...
...
Source/cmExecutablesRule.h
View file @
26dbdd46
...
...
@@ -19,13 +19,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"EXECUTABLES"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Add a list of executables files."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"EXECUTABLES(file1 file2 ...)"
;
...
...
Source/cmFindIncludeRule.h
View file @
26dbdd46
...
...
@@ -20,13 +20,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"FIND_INCLUDE"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Find an include path."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"FIND_INCLUDE(DEFINE try1 try2 ...);"
;
...
...
Source/cmFindLibraryRule.h
View file @
26dbdd46
...
...
@@ -20,13 +20,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"FIND_LIBRARY"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Set a name for the entire project. One argument."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"FIND_LIBRARY(DEFINE try1 try2);"
;
...
...
Source/cmFindProgramRule.h
View file @
26dbdd46
...
...
@@ -20,13 +20,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"FIND_PROGRARM"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"not implemented."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"not implemented.
\n
"
...
...
Source/cmIncludeDirectoryRule.h
View file @
26dbdd46
...
...
@@ -20,13 +20,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"INCLUDE_DIRECTORIES"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Add include directories to the build."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"INCLUDE_DIRECTORIES(dir1 dir2 ...).
\n
"
;
...
...
Source/cmLibraryRule.h
View file @
26dbdd46
...
...
@@ -19,13 +19,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"LIBRARY"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Set a name for the Library."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"LIBRARY(libraryname);"
;
...
...
Source/cmLinkDirectoriesRule.h
View file @
26dbdd46
...
...
@@ -21,13 +21,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"LINK_DIRECTORIES"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Specify link directories."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"Specify the paths to the libraries that will be linked in.
\n
"
...
...
Source/cmLinkLibrariesRule.h
View file @
26dbdd46
...
...
@@ -21,7 +21,7 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"LINK_LIBRARIES"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Specify a list of libraries to be linked into executables or
\n
"
...
...
@@ -29,7 +29,7 @@ public:
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"Specify a list of libraries to be linked into executables or
\n
"
...
...
Source/cmProjectRule.h
View file @
26dbdd46
...
...
@@ -19,13 +19,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"PROJECT"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Set a name for the entire project. One argument."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()
{
return
"Set the name for the entire project. This takes one argument.
\n
"
...
...
Source/cmRuleMaker.h
View file @
26dbdd46
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile$
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2000 National Library of Medicine
All rights reserved.
See COPYRIGHT.txt for copyright details.
=========================================================================*/
#ifndef cmRuleMaker_h
#define cmRuleMaker_h
#include
"cmStandardIncludes.h"
#include
"cmMakefile.h"
/** \class cmRuleMaker
* \brief Superclass for all rules 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.
*/
class
cmRuleMaker
{
public:
cmRuleMaker
()
{
m_Makefile
=
0
;
m_Enabled
=
true
;
}
void
SetMakefile
(
cmMakefile
*
m
)
{
m_Makefile
=
m
;
}
// This is called when the rule is firt encountered in
// the input file
/**
* Construct the rule enabled with no makefile.
* the input file.
*/
cmRuleMaker
()
{
m_Makefile
=
0
;
m_Enabled
=
true
;}
/**
* Specify the makefile.
*/
void
SetMakefile
(
cmMakefile
*
m
)
{
m_Makefile
=
m
;
}
/**
* This is called when the rule is first encountered in
* the CMakeLists.txt file.
*/
virtual
bool
Invoke
(
std
::
vector
<
std
::
string
>&
args
)
=
0
;
// This is called after the entire file has been parsed.
/**
* This is called at the end after all the information
* specified by the rules is accumulated.
*/
virtual
void
FinalPass
()
=
0
;
// This is called to let the rule check the cache
virtual
void
LoadCache
()
{
}
/**
* This is called to let the rule check the cache.
*/
virtual
void
LoadCache
()
{}
/**
* This is a virtual constructor for the rule.
*/
virtual
cmRuleMaker
*
Clone
()
=
0
;
// This determines if the rule gets passed down
// to sub directory makefiles
/**
* This determines if the rule gets propagated down
* to makefiles located in subdirectories.
*/
virtual
bool
IsInherited
()
{
return
false
;
return
false
;
}
// This is the name used in the input file.
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual
const
char
*
GetName
()
=
0
;
// Return the terse documentaion for the rule
virtual
const
char
*
TerseDocumentaion
()
=
0
;
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
=
0
;
// enable or disable this rule
bool
GetEnabled
()
{
return
m_Enabled
;
}
void
SetEnableOn
()
{
m_Enabled
=
true
;
}
void
SetEnableOff
()
{
m_Enabled
=
false
;
}
const
char
*
GetError
()
{
return
m_Error
.
c_str
();}
/**
* Succinct documentation.
*/
virtual
const
char
*
TerseDocumentation
()
=
0
;
/**
* More documentation.
*/
virtual
const
char
*
FullDocumentation
()
=
0
;
/**
* Enable the rule.
*/
void
EnabledOn
()
{
m_Enabled
=
true
;}
/**
* Disable the rule.
*/
void
EnabledOff
()
{
m_Enabled
=
false
;}
/**
* Query whether the rule is enabled.
*/
bool
GetEnabled
()
{
return
m_Enabled
;}
/**
* Return the last error string.
*/
const
char
*
GetError
()
{
return
m_Error
.
c_str
();}
protected:
void
SetError
(
const
char
*
e
)
{
m_Error
=
this
->
GetName
();
m_Error
+=
" "
;
m_Error
+=
e
;
m_Error
=
this
->
GetName
();
m_Error
+=
" "
;
m_Error
+=
e
;
}
cmMakefile
*
m_Makefile
;
private:
bool
m_Enabled
;
std
::
string
m_Error
;
};
#endif
Source/cmSourceFilesRequireRule.h
View file @
26dbdd46
...
...
@@ -19,13 +19,13 @@ public:
// This is the name used in the input file.
virtual
const
char
*
GetName
()
{
return
"SOURCE_FILES_REQUIRE"
;}
virtual
const
char
*
TerseDocumentaion
()
virtual
const
char
*
TerseDocumenta
t
ion
()
{
return
"Add a list of source files."
;
}
// Return full documentation for the rule
virtual
const
char
*
FullDocumentaion
()
virtual
const
char
*
FullDocumenta
t
ion
()