[cmake-commits] martink committed cmCMakePolicyCommand.cxx NONE 1.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Feb 29 15:42:16 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv17266
Added Files:
cmCMakePolicyCommand.cxx
Log Message:
ENH: just getting somethng checked in, still work to do
--- NEW FILE: cmCMakePolicyCommand.cxx ---
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCMakePolicyCommand.cxx,v $
Language: C++
Date: $Date: 2008/02/29 20:42:14 $
Version: $Revision: 1.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 "cmCMakePolicyCommand.h"
#include "cmVersion.h"
// cmCMakePolicyCommand
bool cmCMakePolicyCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if (args.size() < 1)
{
this->SetError("cmake_policy requires at least one argument.");
return false;
}
if (args[0] == "OLD" && args.size() == 2)
{
return this->Makefile->SetPolicy(args[1].c_str(),cmPolicies::OLD);
}
if (args[0] == "NEW" && args.size() == 2)
{
return this->Makefile->SetPolicy(args[1].c_str(),cmPolicies::NEW);
}
if (args[0] == "VERSION" && args.size() == 2)
{
return this->Makefile->SetPolicyVersion(args[1].c_str());
}
if (args[0] == "PUSH" && args.size() == 1)
{
return this->Makefile->PushPolicy();
}
if (args[0] == "POP" && args.size() == 1)
{
return this->Makefile->PopPolicy();
}
this->SetError("incorrect arguments for cmake_policy.");
return false;
}
More information about the Cmake-commits
mailing list