ENH:Added documentation; clean-up

This commit is contained in:
Will Schroeder 2001-01-11 08:04:28 -05:00
parent be6b895a3a
commit 5faa3b9f28
16 changed files with 840 additions and 179 deletions

View File

@ -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 ...)";
}
};

View File

@ -1,3 +1,18 @@
/*=========================================================================
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
virtual bool Invoke(std::vector<std::string>& args);
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
// This is the name used in the input file.
virtual const char* GetName() { return "FIND_LIBRARY";}
/**
* 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;}
/**
* The name of the rule as specified in CMakeList.txt.
*/
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)";
}
};

View File

@ -1,36 +1,80 @@
/*=========================================================================
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 ...)";
}
};

View File

@ -1,35 +1,79 @@
/*=========================================================================
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
virtual bool Invoke(std::vector<std::string>& args);
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
// This is the name used 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;}
/**
* 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";
}
};

View File

@ -1,3 +1,18 @@
/*=========================================================================
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)";
}
};

View File

@ -1,39 +1,84 @@
/*=========================================================================
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.";
}
};

View File

@ -1,42 +1,86 @@
/*=========================================================================
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.";
}
};

View File

@ -1,35 +1,75 @@
/*=========================================================================
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)";
}
};

View File

@ -1,37 +1,78 @@
/*=========================================================================
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 ...)";
}
};
#endif

View File

@ -1,34 +1,78 @@
/*=========================================================================
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 cmSourceFilesRule_h
#define cmSourceFilesRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmSourceFilesRule
* \brief Add source files to the build.
*
* cmSourceFilesRule 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
* dependent on other packages (use SOURCE_FILES_REQUIRED() to add
* dependent source files).
*
* \sa cmSourceFilesRequireRule
*/
class cmSourceFilesRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmSourceFilesRule;
return new cmSourceFilesRule;
}
// 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";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Add a list of source files.";
return "Add a list of source files.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"SOURCE_FILES(file1 file2 ...)";
return
"SOURCE_FILES(file1 file2 ...)";
}
};

View File

@ -1,37 +1,77 @@
/*=========================================================================
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 cmSubdirRule_h
#define cmSubdirRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmSubdirRule
* \brief Specify a list of subdirectories to build.
*
* cmSubdirRule 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
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmSubdirRule;
return new cmSubdirRule;
}
// 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 "SUBDIRS";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Add a list of subdirectories to the build.";
return "Add a list of subdirectories to the build.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"Add a list of subdirectories to the build.\n"
"SUBDIRS(dir1 dir2 ...)\n"
"This will cause any CMakeLists.txt files in the sub directories\n"
"to be parsed by cmake.";
return
"Add a list of subdirectories to the build.\n"
"SUBDIRS(dir1 dir2 ...)\n"
"This will cause any CMakeLists.txt files in the sub directories\n"
"to be processed by CMake.";
}
};

View File

@ -1,34 +1,77 @@
/*=========================================================================
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 cmTestsRule_h
#define cmTestsRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmTestsRule
* \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.
*
* \sa cmExecutablesRule
*/
class cmTestsRule : public cmRuleMaker
{
public:
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmTestsRule;
return new cmTestsRule;
}
// 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 "TESTS";}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "TESTS";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Add a list of executables files that are run as tests.";
return "Add a list of executables files that are run as tests.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"TESTS(file1 file2 ...)";
return
"TESTS(file1 file2 ...)";
}
};

View File

@ -1,37 +1,85 @@
/*=========================================================================
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 cmUnixDefinesRule_h
#define cmUnixDefinesRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmUnixDefinesRule
* \brief Specify a list of compiler defines for Unix platforms.
*
* cmUnixDefinesRule specifies a list of compiler defines for Unix platforms
* only. This defines will be added to the compile command.
*/
class cmUnixDefinesRule : public cmRuleMaker
{
public:
/**
* Constructor.
*/
cmUnixDefinesRule();
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmUnixDefinesRule;
return new cmUnixDefinesRule;
}
// This is called when the rule is firt encountered in
// the input file
virtual bool Invoke(std::vector<std::string>& args);
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
// This is the name used 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;}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "UNIX_DEFINES";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Add -D flags to the command line for unix only.";
return "Add -D flags to the command line for Unix only.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"Add -D flags to the command line for unix only.\n"
"UNIX_DEFINES(-DFOO -DBAR);";
return
"Add -D flags to the command line for Unix only.\n"
"UNIX_DEFINES(-DFOO -DBAR)";
}
};

View File

@ -1,36 +1,84 @@
/*=========================================================================
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 cmUnixLibrariesRule_h
#define cmUnixLibrariesRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmUnixLibrariesRule
* \brief Specify a list of libraries for Unix platforms.
*
* cmUnixLibrariesRule specifies a list of libraries for Unix platforms
* only. Both user and system libraries can be listed.
*/
class cmUnixLibrariesRule : public cmRuleMaker
{
public:
/**
* Constructor.
*/
cmUnixLibrariesRule();
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmUnixLibrariesRule;
return new cmUnixLibrariesRule;
}
// This is called when the rule is firt encountered in
// the input file
virtual bool Invoke(std::vector<std::string>& args);
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
// This is the name used in the input file.
virtual const char* GetName() { return "UNIX_LIBRARIES";}
/**
* 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;}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "UNIX_LIBRARIES";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Add libraries that are only used for unix programs.";
return "Add libraries that are only used for Unix programs.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"UNIX_LIBRARIES(library -lm ...);";
return
"UNIX_LIBRARIES(library -lm ...)";
}
};

View File

@ -1,36 +1,85 @@
/*=========================================================================
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 cmWin32DefinesRule_h
#define cmWin32DefinesRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmWin32DefinesRule
* \brief Specify a list of compiler defines for Win32 platforms.
*
* cmWin32DefinesRule specifies a list of compiler defines for Win32 platforms
* only. This defines will be added to the compile command.
*/
class cmWin32DefinesRule : public cmRuleMaker
{
public:
/**
* Constructor.
*/
cmWin32DefinesRule();
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmWin32DefinesRule;
}
// This is called when the rule is firt encountered in
// the input file
virtual bool Invoke(std::vector<std::string>& args);
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
// This is the name used in the input file.
virtual const char* GetName() { return "WIN32_DEFINES";}
virtual const char* TerseDocumentation()
{
return "Add -D define flags to command line for win32 environments.";
return new cmWin32DefinesRule;
}
// Return full documentation for the rule
/**
* 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;}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() {return "WIN32_DEFINES";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Add -D define flags to command line for Win32 environments.";
}
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"Add -D define flags to command line for win32 environments.\n"
"WIN32_DEFINES(-DFOO -DBAR ...);";
return
"Add -D define flags to command line for Win32 environments.\n"
"WIN32_DEFINES(-DFOO -DBAR ...)";
}
};

View File

@ -1,39 +1,84 @@
/*=========================================================================
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 cmWin32LibrariesRule_h
#define cmWin32LibrariesRule_h
#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"
/** \class cmWin32LibrariesRule
* \brief Specify a list of libraries for Win32 platforms.
*
* cmWin32LibrariesRule specifies a list of libraries for Win32 platforms
* only. Both user and system libraries can be listed.
*/
class cmWin32LibrariesRule : public cmRuleMaker
{
public:
/**
* Constructor.
*/
cmWin32LibrariesRule();
/**
* This is a virtual constructor for the rule.
*/
virtual cmRuleMaker* Clone()
{
return new cmWin32LibrariesRule ;
return new cmWin32LibrariesRule ;
}
// This is called when the rule is firt encountered in
// the input file
virtual bool Invoke(std::vector<std::string>& args);
virtual void FinalPass() { }
virtual bool IsInherited() { return true; }
// This is the name used 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;}
/**
* The name of the rule as specified in CMakeList.txt.
*/
virtual const char* GetName() { return "WIN32_LIBRARIES";}
/**
* Succinct documentation.
*/
virtual const char* TerseDocumentation()
{
return "Set a name for the library to be built. One argument.";
return "Add libraries that are only used for Win32 programs.";
}
// Return full documentation for the rule
/**
* More documentation.
*/
virtual const char* FullDocumentation()
{
return
"Set the name for the library in this makefile. \n"
"This takes one argument.\n"
"LIBRARY(libraryname);\n"
"There can be only one library per CMakeLists.txt file.\n";
return
"WIN32_LIBRARIES(library -lm ...)";
}
};