2001-01-11 13:04:28 +00:00
|
|
|
/*=========================================================================
|
|
|
|
|
2002-10-23 22:03:27 +00:00
|
|
|
Program: CMake - Cross-Platform Makefile Generator
|
2001-01-11 13:04:28 +00:00
|
|
|
Module: $RCSfile$
|
|
|
|
Language: C++
|
|
|
|
Date: $Date$
|
|
|
|
Version: $Revision$
|
|
|
|
|
2002-10-23 22:03:27 +00:00
|
|
|
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
|
|
|
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
2001-01-11 13:04:28 +00:00
|
|
|
|
2002-01-21 20:30:43 +00:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
PURPOSE. See the above copyright notices for more information.
|
2001-01-11 13:04:28 +00:00
|
|
|
|
|
|
|
=========================================================================*/
|
2001-01-18 16:20:24 +00:00
|
|
|
#ifndef cmSubdirCommand_h
|
|
|
|
#define cmSubdirCommand_h
|
2001-01-05 16:41:20 +00:00
|
|
|
|
2001-01-18 16:20:24 +00:00
|
|
|
#include "cmCommand.h"
|
2001-01-05 16:41:20 +00:00
|
|
|
|
2001-01-18 16:20:24 +00:00
|
|
|
/** \class cmSubdirCommand
|
2001-01-11 13:04:28 +00:00
|
|
|
* \brief Specify a list of subdirectories to build.
|
|
|
|
*
|
2001-01-18 16:20:24 +00:00
|
|
|
* cmSubdirCommand specifies a list of subdirectories to process
|
2001-01-11 13:04:28 +00:00
|
|
|
* by CMake. For each subdirectory listed, CMake will descend
|
|
|
|
* into that subdirectory and process any CMakeLists.txt found.
|
|
|
|
*/
|
2001-01-18 16:20:24 +00:00
|
|
|
class cmSubdirCommand : public cmCommand
|
2001-01-05 16:41:20 +00:00
|
|
|
{
|
|
|
|
public:
|
2001-01-11 13:04:28 +00:00
|
|
|
/**
|
2001-01-18 16:20:24 +00:00
|
|
|
* This is a virtual constructor for the command.
|
2001-01-11 13:04:28 +00:00
|
|
|
*/
|
2001-01-18 16:20:24 +00:00
|
|
|
virtual cmCommand* Clone()
|
2001-01-05 16:41:20 +00:00
|
|
|
{
|
2001-01-18 16:20:24 +00:00
|
|
|
return new cmSubdirCommand;
|
2001-01-05 16:41:20 +00:00
|
|
|
}
|
2001-01-11 13:04:28 +00:00
|
|
|
|
|
|
|
/**
|
2001-01-18 16:20:24 +00:00
|
|
|
* This is called when the command is first encountered in
|
2001-01-11 13:04:28 +00:00
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2001-09-20 19:08:30 +00:00
|
|
|
virtual bool InitialPass(std::vector<std::string> const& args);
|
2001-01-11 13:04:28 +00:00
|
|
|
|
|
|
|
/**
|
2001-01-18 16:20:24 +00:00
|
|
|
* The name of the command as specified in CMakeList.txt.
|
2001-01-11 13:04:28 +00:00
|
|
|
*/
|
2001-01-05 16:41:20 +00:00
|
|
|
virtual const char* GetName() { return "SUBDIRS";}
|
2001-01-11 13:04:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Succinct documentation.
|
|
|
|
*/
|
2001-01-12 19:35:15 +00:00
|
|
|
virtual const char* GetTerseDocumentation()
|
2001-01-05 16:41:20 +00:00
|
|
|
{
|
2007-01-24 18:45:42 +00:00
|
|
|
return "Deprecated. Use the ADD_SUBDIRECTORY() command instead.";
|
2001-01-05 16:41:20 +00:00
|
|
|
}
|
|
|
|
|
2001-01-11 13:04:28 +00:00
|
|
|
/**
|
|
|
|
* More documentation.
|
|
|
|
*/
|
2001-01-12 19:35:15 +00:00
|
|
|
virtual const char* GetFullDocumentation()
|
2001-01-05 16:41:20 +00:00
|
|
|
{
|
2001-01-11 13:04:28 +00:00
|
|
|
return
|
2007-01-25 22:05:55 +00:00
|
|
|
"Add a list of subdirectories to the build.\n"
|
2006-05-12 17:53:21 +00:00
|
|
|
" SUBDIRS(dir1 dir2 ..."
|
|
|
|
"[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...] [PREORDER] )\n"
|
2005-11-17 16:20:51 +00:00
|
|
|
"Add a list of subdirectories to the build. The ADD_SUBDIRECTORY "
|
|
|
|
"command should be used instead of SUBDIRS although SUBDIRS will "
|
|
|
|
"still work. "
|
2001-06-27 17:14:34 +00:00
|
|
|
"This will cause any CMakeLists.txt files in the sub directories "
|
2004-06-16 13:45:16 +00:00
|
|
|
"to be processed by CMake. Any directories after the PREORDER flag "
|
2005-11-17 16:20:51 +00:00
|
|
|
"are traversed first by makefile builds, the PREORDER flag has no "
|
|
|
|
"effect on IDE projects. "
|
2004-06-16 13:45:16 +00:00
|
|
|
" Any directories after the EXCLUDE_FROM_ALL marker "
|
2005-11-17 16:20:51 +00:00
|
|
|
"will not be included in the top level makefile or project file. "
|
|
|
|
"This is useful for having CMake create makefiles or projects for "
|
|
|
|
"a set of examples in a project. You would want CMake to "
|
|
|
|
"generate makefiles or project files for all the examples at "
|
|
|
|
"the same time, but you would not want them to show up in the "
|
|
|
|
"top level project or be built each time make is run from the top.";
|
2001-01-05 16:41:20 +00:00
|
|
|
}
|
2001-02-26 17:07:53 +00:00
|
|
|
|
2006-09-01 13:51:28 +00:00
|
|
|
/** This command is kept for compatibility with older CMake versions. */
|
2006-08-31 17:20:12 +00:00
|
|
|
virtual bool IsDiscouraged()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2001-02-26 17:07:53 +00:00
|
|
|
cmTypeMacro(cmSubdirCommand, cmCommand);
|
2001-01-05 16:41:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|