[cmake-commits] hoffman committed cmElseIfCommand.cxx NONE 1.1.2.1 cmElseIfCommand.h NONE 1.1.2.1 cmEndMacroCommand.cxx NONE 1.1.2.1 cmEndMacroCommand.h NONE 1.1.2.1 cmInstallDirectoryGenerator.cxx NONE 1.2.2.1 cmInstallDirectoryGenerator.h NONE 1.2.2.1 cmStandardLexer.h NONE 1.4.2.1

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 13 10:58:13 EDT 2006


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv5047/Source

Added Files:
      Tag: CMake-2-4
	cmElseIfCommand.cxx cmElseIfCommand.h cmEndMacroCommand.cxx 
	cmEndMacroCommand.h cmInstallDirectoryGenerator.cxx 
	cmInstallDirectoryGenerator.h cmStandardLexer.h 
Log Message:
ENH: merge files from main tree to 2.4


--- NEW FILE: cmStandardLexer.h ---
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile: cmStandardLexer.h,v $
  Language:  C++
  Date:      $Date: 2006/10/13 14:58:11 $
  Version:   $Revision: 1.4.2.1 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     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.

=========================================================================*/
#ifndef cmStandardLexer_h
#define cmStandardLexer_h

/* Disable some warnings.  */
#if defined(_MSC_VER)
# pragma warning ( disable : 4127 )
# pragma warning ( disable : 4131 )
# pragma warning ( disable : 4244 )
# pragma warning ( disable : 4251 )
# pragma warning ( disable : 4267 )
# pragma warning ( disable : 4305 )
# pragma warning ( disable : 4309 )
# pragma warning ( disable : 4706 )
# pragma warning ( disable : 4786 )
#endif

#if defined(__BORLANDC__)
# pragma warn -8008 /* condition always returns true */
# pragma warn -8066 /* unreachable code */
#endif

/* Borland system header defines these macros without first undef-ing them. */
#if defined(__BORLANDC__) && __BORLANDC__ >= 0x580
# undef INT8_MIN
# undef INT16_MIN
# undef INT32_MIN
# undef INT8_MAX
# undef INT16_MAX
# undef INT32_MAX
# undef UINT8_MAX
# undef UINT16_MAX
# undef UINT32_MAX
# include <stdint.h>
#endif

/* Make sure SGI termios does not define ECHO differently.  */
#if defined(__sgi) && !defined(__GNUC__)
# include <sys/termios.h>
# undef ECHO
#endif

/* Define isatty on windows.  */
#if defined(_WIN32) && !defined(__CYGWIN__)
# include <io.h>
# if defined( _MSC_VER )
#  define isatty _isatty
# endif
# define YY_NO_UNISTD_H 1
#endif

/* Make sure malloc and free are available on QNX.  */
#ifdef __QNX__
# include <malloc.h>
#endif

/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_INPUT 1
#define YY_NO_UNPUT 1
#define ECHO

#endif

--- NEW FILE: cmEndMacroCommand.cxx ---
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile: cmEndMacroCommand.cxx,v $
  Language:  C++
  Date:      $Date: 2006/10/13 14:58:11 $
  Version:   $Revision: 1.1.2.1 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     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.

=========================================================================*/
#include "cmEndMacroCommand.h"

bool cmEndMacroCommand
::InvokeInitialPass(std::vector<cmListFileArgument> const&)
{
  this->SetError("An ENDMACRO command was found outside of a proper "
                 "MACRO ENDMACRO structure. Or its arguments did not "
                 "match the opening MACRO command.");
  return false;
}


--- NEW FILE: cmInstallDirectoryGenerator.h ---
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile: cmInstallDirectoryGenerator.h,v $
  Language:  C++
  Date:      $Date: 2006/10/13 14:58:11 $
  Version:   $Revision: 1.2.2.1 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     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.

=========================================================================*/
#ifndef cmInstallDirectoryGenerator_h
#define cmInstallDirectoryGenerator_h

#include "cmInstallGenerator.h"

/** \class cmInstallDirectoryGenerator
 * \brief Generate directory installation rules.
 */
class cmInstallDirectoryGenerator: public cmInstallGenerator
{
public:
  cmInstallDirectoryGenerator(std::vector<std::string> const& dirs,
                              const char* dest,
                              const char* file_permissions,
                              const char* dir_permissions,
                              std::vector<std::string> const& configurations,
                              const char* component,
                              const char* literal_args);
  virtual ~cmInstallDirectoryGenerator();

protected:
  virtual void GenerateScript(std::ostream& os);
  std::vector<std::string> Directories;
  std::string Destination;
  std::string FilePermissions;
  std::string DirPermissions;
  std::vector<std::string> Configurations;
  std::string Component;
  std::string LiteralArguments;
};

#endif

--- NEW FILE: cmEndMacroCommand.h ---
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile: cmEndMacroCommand.h,v $
  Language:  C++
  Date:      $Date: 2006/10/13 14:58:11 $
  Version:   $Revision: 1.1.2.1 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     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.

=========================================================================*/
#ifndef cmEndMacroCommand_h
#define cmEndMacroCommand_h

#include "cmCommand.h"

/** \class cmEndMacroCommand
 * \brief ends an if block
 *
 * cmEndMacroCommand ends an if block
 */
class cmEndMacroCommand : public cmCommand
{
public:
  /**
   * This is a virtual constructor for the command.
   */
  virtual cmCommand* Clone() 
    {
    return new cmEndMacroCommand;
    }

  /**
   * Override cmCommand::InvokeInitialPass to get arguments before
   * expansion.
   */
  virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const&);
  
  /**
   * This is called when the command is first encountered in
   * the CMakeLists.txt file.
   */
  virtual bool InitialPass(std::vector<std::string> const&) {return false;}

  /**
   * This determines if the command is invoked when in script mode.
   */
  virtual bool IsScriptable() { return true; }

  /**
   * The name of the command as specified in CMakeList.txt.
   */
  virtual const char* GetName() { return "ENDMACRO";}

  /**
   * Succinct documentation.
   */
  virtual const char* GetTerseDocumentation() 
    {
    return "Ends a list of commands in a MACRO block.";
    }
  
  /**
   * More documentation.
   */
  virtual const char* GetFullDocumentation()
    {
    return
      "  ENDMACRO(expression)\n"
      "See the MACRO command.";
    }
  
  cmTypeMacro(cmEndMacroCommand, cmCommand);
};


#endif

--- NEW FILE: cmInstallDirectoryGenerator.cxx ---
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile: cmInstallDirectoryGenerator.cxx,v $
  Language:  C++
  Date:      $Date: 2006/10/13 14:58:11 $
  Version:   $Revision: 1.2.2.1 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     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.

=========================================================================*/
#include "cmInstallDirectoryGenerator.h"

#include "cmTarget.h"

//----------------------------------------------------------------------------
cmInstallDirectoryGenerator
::cmInstallDirectoryGenerator(std::vector<std::string> const& dirs,
                              const char* dest,
                              const char* file_permissions,
                              const char* dir_permissions,
                              std::vector<std::string> const& configurations,
                              const char* component,
                              const char* literal_args):
  Directories(dirs), Destination(dest),
  FilePermissions(file_permissions), DirPermissions(dir_permissions),
  Configurations(configurations), Component(component),
  LiteralArguments(literal_args)
{
}

//----------------------------------------------------------------------------
cmInstallDirectoryGenerator
::~cmInstallDirectoryGenerator()
{
}

//----------------------------------------------------------------------------
void cmInstallDirectoryGenerator::GenerateScript(std::ostream& os)
{
  // Write code to install the directories.
  for(std::vector<std::string>::const_iterator di = this->Directories.begin();
      di != this->Directories.end(); ++di)
    {
    bool not_optional = false;
    const char* no_properties = 0;
    const char* no_rename = 0;
    this->AddInstallRule(os, this->Destination.c_str(),
                         cmTarget::INSTALL_DIRECTORY, di->c_str(),
                         not_optional, no_properties,
                         this->FilePermissions.c_str(),
                         this->DirPermissions.c_str(),
                         this->Configurations, this->Component.c_str(),
                         no_rename, this->LiteralArguments.c_str());
    }
}

--- NEW FILE: cmElseIfCommand.h ---
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile: cmElseIfCommand.h,v $
  Language:  C++
  Date:      $Date: 2006/10/13 14:58:11 $
  Version:   $Revision: 1.1.2.1 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     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.

=========================================================================*/
#ifndef cmElseIfCommand_h
#define cmElseIfCommand_h

#include "cmIfCommand.h"

/** \class cmElseIfCommand
 * \brief ends an if block
 *
 * cmElseIfCommand ends an if block
 */
class cmElseIfCommand : public cmCommand
{
public:
  /**
   * This is a virtual constructor for the command.
   */
  virtual cmCommand* Clone() 
    {
    return new cmElseIfCommand;
    }

  /**
   * This is called when the command is first encountered in
   * the CMakeLists.txt file.
   */
  virtual bool InitialPass(std::vector<std::string> const& args);

  /**
   * This determines if the command is invoked when in script mode.
   */
  virtual bool IsScriptable() { return true; }

  /**
   * The name of the command as specified in CMakeList.txt.
   */
  virtual const char* GetName() { return "ELSEIF";}

  /**
   * Succinct documentation.
   */
  virtual const char* GetTerseDocumentation() 
    {
    return "Starts the ELSEIF portion of an IF block.";
    }
  
  /**
   * More documentation.
   */
  virtual const char* GetFullDocumentation()
    {
    return
      "  ELSEIF(expression)\n"
      "See the IF command.";
    }
  
  cmTypeMacro(cmElseIfCommand, cmCommand);
};


#endif

--- NEW FILE: cmElseIfCommand.cxx ---
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile: cmElseIfCommand.cxx,v $
  Language:  C++
  Date:      $Date: 2006/10/13 14:58:11 $
  Version:   $Revision: 1.1.2.1 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     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.

=========================================================================*/
#include "cmElseIfCommand.h"

bool cmElseIfCommand::InitialPass(std::vector<std::string> const&)
{
  this->SetError("An ELSEIF command was found outside of a proper "
                 "IF ENDIF structure.");
  return false;
}



More information about the Cmake-commits mailing list