summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-05 15:03:35 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-05 15:03:35 (GMT)
commit8aa2182806a05d3f3eba6fcbc17a7f921e7a24ac (patch)
treecb26e44126df3ef490d0c00596facc11fdd32406
parente126954393c945b71c4bd243090076dc24c0ec7d (diff)
downloadCMake-8aa2182806a05d3f3eba6fcbc17a7f921e7a24ac.zip
CMake-8aa2182806a05d3f3eba6fcbc17a7f921e7a24ac.tar.gz
CMake-8aa2182806a05d3f3eba6fcbc17a7f921e7a24ac.tar.bz2
BUG: add removed command, and sort the order in cmCommands.cxx
-rw-r--r--Source/cmAddTargetCommand.cxx66
-rw-r--r--Source/cmAddTargetCommand.h98
-rw-r--r--Source/cmCableInstantiateClassCommand.h2
-rw-r--r--Source/cmCableInstantiateCommand.h2
-rw-r--r--Source/cmCommands.cxx127
-rw-r--r--Source/cmLibraryCommand.cxx54
6 files changed, 67 insertions, 282 deletions
diff --git a/Source/cmAddTargetCommand.cxx b/Source/cmAddTargetCommand.cxx
deleted file mode 100644
index 25f0797..0000000
--- a/Source/cmAddTargetCommand.cxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/*=========================================================================
-
- Program: Insight Segmentation & Registration Toolkit
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
-
-Copyright (c) 2001 Insight Consortium
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * The name of the Insight Consortium, nor the names of any consortium members,
- nor of any contributors, may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- * Modified source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=========================================================================*/
-#include "cmAddTargetCommand.h"
-
-// cmAddTargetCommand
-bool cmAddTargetCommand::Invoke(std::vector<std::string>& args)
-{
- bool all = false;
- if(args.size() < 2 )
- {
- this->SetError("called with incorrect number of arguments");
- return false;
- }
-
- // all target option
- if (args.size() >= 3)
- {
- if (args[2] == "ALL")
- {
- all = true;
- }
- }
- std::vector<std::string> dep;
- m_Makefile->AddUtilityCommand(args[0].c_str(),
- args[1].c_str(), all);
- return true;
-}
-
diff --git a/Source/cmAddTargetCommand.h b/Source/cmAddTargetCommand.h
deleted file mode 100644
index e52e24f..0000000
--- a/Source/cmAddTargetCommand.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*=========================================================================
-
- Program: Insight Segmentation & Registration Toolkit
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
-
-Copyright (c) 2001 Insight Consortium
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * The name of the Insight Consortium, nor the names of any consortium members,
- nor of any contributors, may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- * Modified source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=========================================================================*/
-#ifndef cmAddTargetCommand_h
-#define cmAddTargetCommand_h
-
-#include "cmStandardIncludes.h"
-#include "cmCommand.h"
-
-/** \class cmAddTargetCommand
- * \brief Command that adds a 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 cmAddTargetCommand : public cmCommand
-{
-public:
- /**
- * This is a virtual constructor for the command.
- */
- virtual cmCommand* Clone()
- {
- return new cmAddTargetCommand;
- }
-
- /**
- * This is called when the command is first encountered in
- * the CMakeLists.txt file.
- */
- virtual bool Invoke(std::vector<std::string>& args);
-
- /**
- * The name of the command as specified in CMakeList.txt.
- */
- virtual const char* GetName()
- {return "ADD_TARGET";}
-
- /**
- * Succinct documentation.
- */
- virtual const char* GetTerseDocumentation()
- {
- return "Add an extra target to the build system.";
- }
-
- /**
- * More documentation.
- */
- virtual const char* GetFullDocumentation()
- {
- return
- "ADD_TARGET(Name \"command to run\" ALL)\n"
- "Add a target to the make process. The third argument ALL is optional. If it is specified then the target will be added to the all target." ;
- }
-
- cmTypeMacro(cmAddTargetCommand, cmCommand);
-};
-
-#endif
diff --git a/Source/cmCableInstantiateClassCommand.h b/Source/cmCableInstantiateClassCommand.h
index 1d54e6a..7701124 100644
--- a/Source/cmCableInstantiateClassCommand.h
+++ b/Source/cmCableInstantiateClassCommand.h
@@ -90,7 +90,7 @@ public:
virtual void WriteConfiguration() const;
- cmTypeMacro(cmCableInstantiateClassCommand, cmCableInstantiateCommand);
+ cmTypeMacro(cmCableInstantiateClassCommand, cmCablePackageEntryCommand);
protected:
typedef cmCablePackageEntryCommand::Entries Entries;
};
diff --git a/Source/cmCableInstantiateCommand.h b/Source/cmCableInstantiateCommand.h
index eb173eb..8539956 100644
--- a/Source/cmCableInstantiateCommand.h
+++ b/Source/cmCableInstantiateCommand.h
@@ -89,7 +89,7 @@ public:
virtual void WriteConfiguration() const;
- cmTypeMacro(cmCableInstantiateCommand, cmCablePackageCommand);
+ cmTypeMacro(cmCableInstantiateCommand, cmCablePackageEntryCommand);
protected:
typedef cmCablePackageEntryCommand::Entries Entries;
};
diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx
index d65a679..3da08aa 100644
--- a/Source/cmCommands.cxx
+++ b/Source/cmCommands.cxx
@@ -4,103 +4,106 @@
// like to have CMake to build CMake.
#include "cmCommands.h"
#include "cmAbstractFilesCommand.cxx"
+#include "cmAddCustomTargetCommand.cxx"
+#include "cmAddDefinitionsCommand.cxx"
#include "cmAddExecutableCommand.cxx"
#include "cmAddLibraryCommand.cxx"
-#include "cmAddCustomTargetCommand.cxx"
#include "cmAuxSourceDirectoryCommand.cxx"
-#include "cmFindLibraryCommand.cxx"
-#include "cmFindProgramCommand.cxx"
-#include "cmIncludeDirectoryCommand.cxx"
-#include "cmLinkDirectoriesCommand.cxx"
-#include "cmLinkLibrariesCommand.cxx"
-#include "cmTargetLinkLibrariesCommand.cxx"
-#include "cmProjectCommand.cxx"
-#include "cmSourceFilesCommand.cxx"
-#include "cmSubdirCommand.cxx"
-#include "cmTestsCommand.cxx"
-#include "cmConfigureFile.cxx"
-#include "cmConfigureFileNoAutoconf.cxx"
+#include "cmBuildCommand.cxx"
+#include "cmBuildNameCommand.cxx"
+#include "cmBuildSharedLibrariesCommand.cxx"
+#include "cmCableCloseNamespaceCommand.cxx"
#include "cmCableCommand.cxx"
#include "cmCableData.cxx"
#include "cmCableDefineSetCommand.cxx"
+#include "cmCableInstantiateClassCommand.cxx"
+#include "cmCableInstantiateCommand.cxx"
#include "cmCableOpenNamespaceCommand.cxx"
-#include "cmCableCloseNamespaceCommand.cxx"
#include "cmCablePackageCommand.cxx"
#include "cmCablePackageEntryCommand.cxx"
#include "cmCableSourceFilesCommand.cxx"
#include "cmCableWrapCommand.cxx"
-#include "cmCableInstantiateCommand.cxx"
-#include "cmCableInstantiateClassCommand.cxx"
+#include "cmConfigureFile.cxx"
+#include "cmConfigureFileNoAutoconf.cxx"
+#include "cmElseCommand.cxx"
+#include "cmEndIfCommand.cxx"
+#include "cmExecProgram.cxx"
#include "cmFindFileCommand.cxx"
+#include "cmFindIncludeCommand.cxx"
+#include "cmFindLibraryCommand.cxx"
#include "cmFindPathCommand.cxx"
-#include "cmWrapExcludeFilesCommand.cxx"
-#include "cmVTKWrapJavaCommand.cxx"
-#include "cmVTKWrapPythonCommand.cxx"
-#include "cmVTKWrapTclCommand.cxx"
-#include "cmBuildSharedLibrariesCommand.cxx"
-#include "cmUtilitySourceCommand.cxx"
-#include "cmIncludeRegularExpressionCommand.cxx"
-#include "cmSourceGroupCommand.cxx"
+#include "cmFindProgramCommand.cxx"
#include "cmIfCommand.cxx"
-#include "cmElseCommand.cxx"
-#include "cmEndIfCommand.cxx"
-#include "cmSetCommand.cxx"
-#include "cmAddDefinitionsCommand.cxx"
-#include "cmOptionCommand.cxx"
#include "cmIncludeCommand.cxx"
+#include "cmIncludeDirectoryCommand.cxx"
+#include "cmIncludeRegularExpressionCommand.cxx"
+#include "cmLinkDirectoriesCommand.cxx"
+#include "cmLinkLibrariesCommand.cxx"
+#include "cmOptionCommand.cxx"
+#include "cmProjectCommand.cxx"
+#include "cmSetCommand.cxx"
#include "cmSiteNameCommand.cxx"
-#include "cmBuildNameCommand.cxx"
-#include "cmExecProgram.cxx"
-#include "cmBuildCommand.cxx"
+#include "cmSourceFilesCommand.cxx"
+#include "cmSourceGroupCommand.cxx"
+#include "cmSubdirCommand.cxx"
+#include "cmTargetLinkLibrariesCommand.cxx"
+#include "cmTestsCommand.cxx"
+#include "cmUtilitySourceCommand.cxx"
+#include "cmVTKWrapJavaCommand.cxx"
+#include "cmVTKWrapPythonCommand.cxx"
+#include "cmVTKWrapTclCommand.cxx"
+#include "cmWrapExcludeFilesCommand.cxx"
+
void GetPredefinedCommands(std::list<cmCommand*>& commands)
{
- commands.push_back(new cmBuildCommand);
- commands.push_back(new cmExecProgram);
- commands.push_back(new cmBuildNameCommand);
- commands.push_back(new cmSiteNameCommand);
commands.push_back(new cmAbstractFilesCommand);
+ commands.push_back(new cmAddCustomTargetCommand);
+ commands.push_back(new cmAddDefinitionsCommand);
commands.push_back(new cmAddExecutableCommand);
commands.push_back(new cmAddLibraryCommand);
- commands.push_back(new cmAddCustomTargetCommand);
commands.push_back(new cmAuxSourceDirectoryCommand);
+ commands.push_back(new cmBuildCommand);
+ commands.push_back(new cmBuildNameCommand);
+ commands.push_back(new cmBuildSharedLibrariesCommand);
+ commands.push_back(new cmCableCloseNamespaceCommand);
+ commands.push_back(new cmCableDefineSetCommand);
+ commands.push_back(new cmCableInstantiateCommand);
+ commands.push_back(new cmCableInstantiateClassCommand);
+ commands.push_back(new cmCableOpenNamespaceCommand);
+ commands.push_back(new cmCablePackageCommand);
+ commands.push_back(new cmCableSourceFilesCommand);
+ commands.push_back(new cmCableWrapCommand);
+ commands.push_back(new cmConfigureFile);
+ commands.push_back(new cmConfigureFileNoAutoconf);
+ commands.push_back(new cmElseCommand);
+ commands.push_back(new cmEndIfCommand);
+ commands.push_back(new cmExecProgram);
+ commands.push_back(new cmFindFileCommand);
+ commands.push_back(new cmFindIncludeCommand);
commands.push_back(new cmFindLibraryCommand);
+ commands.push_back(new cmFindPathCommand);
commands.push_back(new cmFindProgramCommand);
+ commands.push_back(new cmIfCommand);
+ commands.push_back(new cmIncludeCommand);
commands.push_back(new cmIncludeDirectoryCommand);
+ commands.push_back(new cmIncludeRegularExpressionCommand);
commands.push_back(new cmLinkDirectoriesCommand);
commands.push_back(new cmLinkLibrariesCommand);
- commands.push_back(new cmTargetLinkLibrariesCommand);
+ commands.push_back(new cmOptionCommand);
commands.push_back(new cmProjectCommand);
+ commands.push_back(new cmSetCommand);
+ commands.push_back(new cmSiteNameCommand);
commands.push_back(new cmSourceFilesCommand);
+ commands.push_back(new cmSourceGroupCommand);
commands.push_back(new cmSubdirCommand);
+ commands.push_back(new cmTargetLinkLibrariesCommand);
commands.push_back(new cmTestsCommand);
- commands.push_back(new cmConfigureFile);
- commands.push_back(new cmConfigureFileNoAutoconf);
- commands.push_back(new cmCableDefineSetCommand);
- commands.push_back(new cmCableOpenNamespaceCommand);
- commands.push_back(new cmCableCloseNamespaceCommand);
- commands.push_back(new cmCablePackageCommand);
- commands.push_back(new cmCableSourceFilesCommand);
- commands.push_back(new cmCableWrapCommand);
- commands.push_back(new cmCableInstantiateCommand);
- commands.push_back(new cmCableInstantiateClassCommand);
- commands.push_back(new cmFindFileCommand);
- commands.push_back(new cmFindPathCommand);
- commands.push_back(new cmWrapExcludeFilesCommand);
+ commands.push_back(new cmUtilitySourceCommand);
commands.push_back(new cmVTKWrapJavaCommand);
commands.push_back(new cmVTKWrapPythonCommand);
commands.push_back(new cmVTKWrapTclCommand);
- commands.push_back(new cmBuildSharedLibrariesCommand);
- commands.push_back(new cmUtilitySourceCommand);
- commands.push_back(new cmIncludeRegularExpressionCommand);
- commands.push_back(new cmSourceGroupCommand);
- commands.push_back(new cmIfCommand);
- commands.push_back(new cmElseCommand);
- commands.push_back(new cmEndIfCommand);
- commands.push_back(new cmSetCommand);
- commands.push_back(new cmAddDefinitionsCommand);
- commands.push_back(new cmOptionCommand);
- commands.push_back(new cmIncludeCommand);
+ commands.push_back(new cmWrapExcludeFilesCommand);
}
diff --git a/Source/cmLibraryCommand.cxx b/Source/cmLibraryCommand.cxx
deleted file mode 100644
index 7d96921..0000000
--- a/Source/cmLibraryCommand.cxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/*=========================================================================
-
- Program: Insight Segmentation & Registration Toolkit
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
-
-Copyright (c) 2001 Insight Consortium
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * The name of the Insight Consortium, nor the names of any consortium members,
- nor of any contributors, may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- * Modified source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=========================================================================*/
-#include "cmLibraryCommand.h"
-
-// cmLibraryCommand
-bool cmLibraryCommand::Invoke(std::vector<std::string>& args)
-{
- if(args.size() < 1 || args.size() > 1)
- {
- this->SetError("PROJECT called with incorrect number of arguments");
- return false;
- }
- m_Makefile->SetLibraryName(args[0].c_str());
- return true;
-}
-