Commit 5faa3b9f authored by Will Schroeder's avatar Will Schroeder

ENH:Added documentation; clean-up

parent be6b895a
......@@ -22,7 +22,7 @@
/** \class cmFindIncludeRule
* \brief Define a rule that searches for an include file.
*
* cmFindIncludeRule is used to define a variable include
* cmFindIncludeRule is used to define a CMake variable include
* path location by specifying a file and list of directories.
*/
class cmFindIncludeRule : public cmRuleMaker
......@@ -74,7 +74,7 @@ public:
virtual const char* FullDocumentation()
{
return
"FIND_INCLUDE(DEFINE try1 try2 ...);";
"FIND_INCLUDE(DEFINE try1 try2 ...)";
}
};
......
/*=========================================================================
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 cmFindLibraryRule_h
#define cmFindLibraryRule_h
......@@ -5,31 +20,62 @@
#include "cmRuleMaker.h"
/** \class cmFindLibraryRule
* \brief Define a rule to search for a library.
*
* cmFindLibraryRule is used to define a CMake variable
* that specifies a library. The rule searches for a given
* file in a list of directories.
*/
class cmFindLibraryRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmFindLibraryRule;
return new cmFindLibraryRule;
}
// 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);
/**
* This is called at the end after all the information
* specified by the rules is accumulated.
*/
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
/**
* This determines if the rule gets propagated down
* to makefiles located in subdirectories.
*/
virtual bool IsInherited() {return true;}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "FIND_LIBRARY";}
// This is the name used in the input file.
virtual const char* GetName() { return "FIND_LIBRARY";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Set a name for the entire project. One argument.";
return "Find a library.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"FIND_LIBRARY(DEFINE try1 try2);";
return
"FIND_LIBRARY(DEFINE try1 try2)";
}
};
......
/*=========================================================================
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 cmFindProgramRule_h
#define cmFindProgramRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmFindProgramRule
* \brief Define a rule to search for an executable program.
*
* cmFindProgramRule is used to define a CMake variable
* that specifies an executable program. The rule searches
* for a given file in a list of directories.
*/
class cmFindProgramRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmFindProgramRule;
return new cmFindProgramRule;
}
// 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);
/**
* 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
* to makefiles located in subdirectories.
*/
virtual bool IsInherited() { return true; }
// This is the name used in the input file.
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "FIND_PROGRARM";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "not implemented.";
return "Find an executable program.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"not implemented.\n"
"FIND_PROGRARM(NAME try1 try2 ...);";
return
"FIND_PROGRAM(NAME try1 try2 ...)";
}
};
......
/*=========================================================================
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 cmIncludeDirectoryRule_h
#define cmIncludeDirectoryRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmIncludeDirectoryRule
* \brief Add include directories to the build.
*
* cmIncludeDirectoryRule is used to specify directory locations
* to search for included files.
*/
class cmIncludeDirectoryRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmIncludeDirectoryRule;
return new cmIncludeDirectoryRule;
}
// 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);
/**
* This is called at the end after all the information
* specified by the rules is accumulated.
*/
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
// This is the name used in the input file.
/**
* This determines if the rule gets propagated down
* to makefiles located in subdirectories.
*/
virtual bool IsInherited() {return true;}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "INCLUDE_DIRECTORIES";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Add include directories to the build.";
return "Add include directories to the build.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"INCLUDE_DIRECTORIES(dir1 dir2 ...).\n";
return
"INCLUDE_DIRECTORIES(dir1 dir2 ...).\n";
}
};
......
/*=========================================================================
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 cmLibraryRule_h
#define cmLibraryRule_h
......@@ -5,30 +20,55 @@
#include "cmRuleMaker.h"
/** \class cmLibraryRule
* \brief Specify a name for a library.
*
* cmLibraryRule is used to specify the name of a library to be
* generated by the build process.
*/
class cmLibraryRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmLibraryRule;
return new cmLibraryRule;
}
// 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);
/**
* 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 "LIBRARY";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Set a name for the Library.";
return "Set a name for a library.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"LIBRARY(libraryname);";
return
"LIBRARY(libraryname)";
}
};
......
/*=========================================================================
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 cmLinkDirectoriesRule_h
#define cmLinkDirectoriesRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmLinkDirectoriesRule
* \brief Define a list of directories containing files to link.
*
* cmLinkDirectoriesRule 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
* such as CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.
*/
class cmLinkDirectoriesRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmLinkDirectoriesRule;
return new cmLinkDirectoriesRule;
}
// 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);
/**
* 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
* to makefiles located in subdirectories.
*/
virtual bool IsInherited() { return true; }
// This is the name used in the input file.
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "LINK_DIRECTORIES";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Specify link directories.";
return "Specify link directories.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"Specify the paths to the libraries that will be linked in.\n"
"LINK_DIRECTORIES(directory1 directory2 ...);\n"
"The directories can use built in definitions like \n"
"CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.";
return
"Specify the paths to the libraries that will be linked in.\n"
"LINK_DIRECTORIES(directory1 directory2 ...)\n"
"The directories can use built in definitions like \n"
"CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR.";
}
};
......
/*=========================================================================
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 cmLinkLibrariesRule_h
#define cmLinkLibrariesRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmLinkLibrariesRule
* \brief Specify a list of libraries to link into executables.
*
* cmLinkLibrariesRule 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).
*/
class cmLinkLibrariesRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmLinkLibrariesRule;
return new cmLinkLibrariesRule;
}
// 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);
/**
* This is called at the end after all the information
* specified by the rules is accumulated.
*/
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
/**
* This determines if the rule gets propagated down
* to makefiles located in subdirectories.
*/
virtual bool IsInherited() {return true;}
// This is the name used in the input file.
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "LINK_LIBRARIES";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return
"Specify a list of libraries to be linked into executables or \n"
"shared objects.";
return
"Specify a list of libraries to be linked into executables or \n"
"shared objects.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"Specify a list of libraries to be linked into executables or \n"
"shared objects. This rule is passed down to all other rules."
"LINK_LIBRARIES(library1 library2).\n"
"The library name should be the same as the name used in the\n"
"LIBRARY(library) rule.";
return
"Specify a list of libraries to be linked into executables or \n"
"shared objects. This rule is passed down to all other rules."
"LINK_LIBRARIES(library1 library2).\n"
"The library name should be the same as the name used in the\n"
"LIBRARY(library) rule.";
}
};
......
/*=========================================================================
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 cmProjectRule_h
#define cmProjectRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmProjectRule
* \brief Specify the name for this build project.
*
* cmProjectRule 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
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmProjectRule;
return new cmProjectRule;
}
// 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);
/**
* 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.
virtual const char* GetName() { return "PROJECT";}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "PROJECT";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Set a name for the entire project. One argument.";
return "Set a name for the entire project. One argument.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"Set the name for the entire project. This takes one argument.\n"
"PROJECT(projectname);";
return
"Set the name for the entire project. This takes one argument.\n"
"PROJECT(projectname)";
}
};
......
/*=========================================================================
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 cmSourceFilesRequireRule_h
#define cmSourceFilesRequireRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmSourceFilesRequireRule
* \brief Add additional sources to the build if certain required files
* or CMake variables are defined.
*
* cmSourceFilesRequireRule 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
* packages or operating system features.
*/
class cmSourceFilesRequireRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmSourceFilesRequireRule;
return new cmSourceFilesRequireRule;
}
// 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);
/**
* 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 "SOURCE_FILES_REQUIRE";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Add a list of source files.";
return "Add a list of source files if the required variables are set.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"SOURCE_FILES(file1 file2 ...)";
return
"SOURCE_FILES_REQUIRE(var1 var2 ... SOURCES_BEGIN file1 file2 ...)";
}
};