2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2001-01-11 22:55:47 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2001-01-11 22:55:47 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2001-04-25 00:49:12 +04:00
|
|
|
#include "cmSourceFile.h"
|
2000-08-29 23:26:29 +04:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
#include "cmGlobalGenerator.h"
|
2006-12-13 20:19:59 +03:00
|
|
|
#include "cmMakefile.h"
|
2007-06-18 19:59:23 +04:00
|
|
|
#include "cmSystemTools.h"
|
|
|
|
#include "cmake.h"
|
2000-08-29 23:26:29 +04:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
cmSourceFile::cmSourceFile(cmMakefile* mf, const std::string& name)
|
|
|
|
: Location(mf, name)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2016-06-27 23:44:16 +03:00
|
|
|
this->CustomCommand = CM_NULLPTR;
|
2007-06-18 19:59:23 +04:00
|
|
|
this->FindFullPathFailed = false;
|
2016-05-16 17:34:04 +03:00
|
|
|
this->IsUiFile = (".ui" == cmSystemTools::GetFilenameLastExtension(
|
|
|
|
this->Location.GetName()));
|
2007-06-18 19:59:23 +04:00
|
|
|
}
|
2004-04-27 01:32:56 +04:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
cmSourceFile::~cmSourceFile()
|
|
|
|
{
|
2016-06-27 23:44:16 +03:00
|
|
|
this->SetCustomCommand(CM_NULLPTR);
|
2007-06-18 19:59:23 +04:00
|
|
|
}
|
2001-05-09 16:51:54 +04:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
std::string const& cmSourceFile::GetExtension() const
|
|
|
|
{
|
|
|
|
return this->Extension;
|
|
|
|
}
|
2004-04-27 01:32:56 +04:00
|
|
|
|
2014-03-11 08:22:02 +04:00
|
|
|
const std::string cmSourceFile::propLANGUAGE = "LANGUAGE";
|
|
|
|
|
2014-02-26 18:59:18 +04:00
|
|
|
void cmSourceFile::SetObjectLibrary(std::string const& objlib)
|
|
|
|
{
|
|
|
|
this->ObjectLibrary = objlib;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string cmSourceFile::GetObjectLibrary() const
|
|
|
|
{
|
|
|
|
return this->ObjectLibrary;
|
|
|
|
}
|
|
|
|
|
2014-02-04 06:20:56 +04:00
|
|
|
std::string cmSourceFile::GetLanguage()
|
2007-06-18 19:59:23 +04:00
|
|
|
{
|
2008-04-29 22:17:42 +04:00
|
|
|
// If the language was set explicitly by the user then use it.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (const char* lang = this->GetProperty(propLANGUAGE)) {
|
2008-04-29 22:17:42 +04:00
|
|
|
return lang;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2008-04-29 22:17:42 +04:00
|
|
|
|
|
|
|
// Perform computation needed to get the language if necessary.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->FullPath.empty() && this->Language.empty()) {
|
2008-05-27 21:10:09 +04:00
|
|
|
// If a known extension is given or a known full path is given
|
|
|
|
// then trust that the current extension is sufficient to
|
|
|
|
// determine the language. This will fail only if the user
|
|
|
|
// specifies a full path to the source but leaves off the
|
|
|
|
// extension, which is kind of weird.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->Location.ExtensionIsAmbiguous() &&
|
|
|
|
this->Location.DirectoryIsAmbiguous()) {
|
2008-04-29 22:17:42 +04:00
|
|
|
// Finalize the file location to get the extension and set the
|
|
|
|
// language.
|
|
|
|
this->GetFullPath();
|
2016-05-16 17:34:04 +03:00
|
|
|
} else {
|
2008-04-29 22:17:42 +04:00
|
|
|
// Use the known extension to get the language if possible.
|
|
|
|
std::string ext =
|
|
|
|
cmSystemTools::GetFilenameLastExtension(this->Location.GetName());
|
|
|
|
this->CheckLanguage(ext);
|
2007-06-18 19:59:23 +04:00
|
|
|
}
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2007-06-18 19:59:23 +04:00
|
|
|
|
|
|
|
// Now try to determine the language.
|
|
|
|
return static_cast<cmSourceFile const*>(this)->GetLanguage();
|
|
|
|
}
|
2001-05-09 16:51:54 +04:00
|
|
|
|
2014-02-04 06:20:56 +04:00
|
|
|
std::string cmSourceFile::GetLanguage() const
|
2007-06-18 19:59:23 +04:00
|
|
|
{
|
|
|
|
// If the language was set explicitly by the user then use it.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (const char* lang = this->GetProperty(propLANGUAGE)) {
|
2007-06-18 19:59:23 +04:00
|
|
|
return lang;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2001-12-28 23:54:05 +03:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
// If the language was determined from the source file extension use it.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!this->Language.empty()) {
|
2014-02-04 06:20:56 +04:00
|
|
|
return this->Language;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2005-11-17 21:49:10 +03:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
// The language is not known.
|
2014-02-04 06:20:56 +04:00
|
|
|
return "";
|
2007-06-18 19:59:23 +04:00
|
|
|
}
|
|
|
|
|
2007-12-17 18:12:19 +03:00
|
|
|
cmSourceFileLocation const& cmSourceFile::GetLocation() const
|
|
|
|
{
|
2016-05-16 17:34:04 +03:00
|
|
|
return this->Location;
|
2007-12-17 18:12:19 +03:00
|
|
|
}
|
|
|
|
|
2010-09-13 23:56:06 +04:00
|
|
|
std::string const& cmSourceFile::GetFullPath(std::string* error)
|
2007-06-18 19:59:23 +04:00
|
|
|
{
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->FullPath.empty()) {
|
|
|
|
if (this->FindFullPath(error)) {
|
2007-06-18 19:59:23 +04:00
|
|
|
this->CheckExtension();
|
2000-11-02 18:24:59 +03:00
|
|
|
}
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2007-06-18 19:59:23 +04:00
|
|
|
return this->FullPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string const& cmSourceFile::GetFullPath() const
|
|
|
|
{
|
|
|
|
return this->FullPath;
|
|
|
|
}
|
|
|
|
|
2010-09-13 23:56:06 +04:00
|
|
|
bool cmSourceFile::FindFullPath(std::string* error)
|
2007-06-18 19:59:23 +04:00
|
|
|
{
|
|
|
|
// If thie method has already failed once do not try again.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->FindFullPathFailed) {
|
2007-06-18 19:59:23 +04:00
|
|
|
return false;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2007-06-18 19:59:23 +04:00
|
|
|
|
|
|
|
// If the file is generated compute the location without checking on
|
|
|
|
// disk.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->GetPropertyAsBool("GENERATED")) {
|
2007-06-18 19:59:23 +04:00
|
|
|
// The file is either already a full path or is relative to the
|
|
|
|
// build directory for the target.
|
|
|
|
this->Location.DirectoryUseBinary();
|
|
|
|
this->FullPath = this->Location.GetDirectory();
|
|
|
|
this->FullPath += "/";
|
|
|
|
this->FullPath += this->Location.GetName();
|
|
|
|
return true;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2001-06-15 01:06:10 +04:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
// The file is not generated. It must exist on disk.
|
2014-01-21 20:09:14 +04:00
|
|
|
cmMakefile const* mf = this->Location.GetMakefile();
|
2016-06-27 23:44:16 +03:00
|
|
|
const char* tryDirs[3] = { CM_NULLPTR, CM_NULLPTR, CM_NULLPTR };
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->Location.DirectoryIsAmbiguous()) {
|
2015-04-16 22:17:41 +03:00
|
|
|
tryDirs[0] = mf->GetCurrentSourceDirectory();
|
2015-04-16 22:33:09 +03:00
|
|
|
tryDirs[1] = mf->GetCurrentBinaryDirectory();
|
2016-05-16 17:34:04 +03:00
|
|
|
} else {
|
2007-06-18 19:59:23 +04:00
|
|
|
tryDirs[0] = "";
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2015-10-24 15:58:23 +03:00
|
|
|
const std::vector<std::string>& srcExts =
|
2016-05-16 17:34:04 +03:00
|
|
|
mf->GetCMakeInstance()->GetSourceExtensions();
|
2015-10-24 15:58:23 +03:00
|
|
|
std::vector<std::string> hdrExts =
|
2016-05-16 17:34:04 +03:00
|
|
|
mf->GetCMakeInstance()->GetHeaderExtensions();
|
|
|
|
for (const char* const* di = tryDirs; *di; ++di) {
|
2007-06-18 19:59:23 +04:00
|
|
|
std::string tryPath = this->Location.GetDirectory();
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!tryPath.empty()) {
|
2007-06-18 19:59:23 +04:00
|
|
|
tryPath += "/";
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2007-06-18 19:59:23 +04:00
|
|
|
tryPath += this->Location.GetName();
|
2014-10-15 16:54:05 +04:00
|
|
|
tryPath = cmSystemTools::CollapseFullPath(tryPath, *di);
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->TryFullPath(tryPath, "")) {
|
2006-05-05 19:46:20 +04:00
|
|
|
return true;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
|
|
|
for (std::vector<std::string>::const_iterator ei = srcExts.begin();
|
|
|
|
ei != srcExts.end(); ++ei) {
|
|
|
|
if (this->TryFullPath(tryPath, *ei)) {
|
2007-06-18 19:59:23 +04:00
|
|
|
return true;
|
|
|
|
}
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
|
|
|
for (std::vector<std::string>::const_iterator ei = hdrExts.begin();
|
|
|
|
ei != hdrExts.end(); ++ei) {
|
|
|
|
if (this->TryFullPath(tryPath, *ei)) {
|
2007-06-18 19:59:23 +04:00
|
|
|
return true;
|
|
|
|
}
|
2001-07-16 18:14:41 +04:00
|
|
|
}
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2001-07-16 18:14:41 +04:00
|
|
|
|
2015-01-05 22:31:31 +03:00
|
|
|
std::ostringstream e;
|
2011-01-15 16:00:11 +03:00
|
|
|
std::string missing = this->Location.GetDirectory();
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!missing.empty()) {
|
2011-01-15 16:00:11 +03:00
|
|
|
missing += "/";
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2011-01-15 16:00:11 +03:00
|
|
|
missing += this->Location.GetName();
|
|
|
|
e << "Cannot find source file:\n " << missing << "\nTried extensions";
|
2016-05-16 17:34:04 +03:00
|
|
|
for (std::vector<std::string>::const_iterator ext = srcExts.begin();
|
|
|
|
ext != srcExts.end(); ++ext) {
|
2006-05-05 19:46:20 +04:00
|
|
|
e << " ." << *ext;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
|
|
|
for (std::vector<std::string>::const_iterator ext = hdrExts.begin();
|
|
|
|
ext != hdrExts.end(); ++ext) {
|
2006-05-05 19:46:20 +04:00
|
|
|
e << " ." << *ext;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
|
|
|
if (error) {
|
2010-09-13 23:56:06 +04:00
|
|
|
*error = e.str();
|
2016-05-16 17:34:04 +03:00
|
|
|
} else {
|
2010-09-13 23:56:06 +04:00
|
|
|
this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str());
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2007-06-18 19:59:23 +04:00
|
|
|
this->FindFullPathFailed = true;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
bool cmSourceFile::TryFullPath(const std::string& path, const std::string& ext)
|
2007-06-18 19:59:23 +04:00
|
|
|
{
|
2014-02-04 02:00:21 +04:00
|
|
|
std::string tryPath = path;
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!ext.empty()) {
|
2007-06-18 19:59:23 +04:00
|
|
|
tryPath += ".";
|
|
|
|
tryPath += ext;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
|
|
|
if (cmSystemTools::FileExists(tryPath.c_str())) {
|
2007-06-18 19:59:23 +04:00
|
|
|
this->FullPath = tryPath;
|
|
|
|
return true;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2006-05-05 19:46:20 +04:00
|
|
|
return false;
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
void cmSourceFile::CheckExtension()
|
2001-02-27 01:15:44 +03:00
|
|
|
{
|
2007-06-18 19:59:23 +04:00
|
|
|
// Compute the extension.
|
|
|
|
std::string realExt =
|
|
|
|
cmSystemTools::GetFilenameLastExtension(this->FullPath);
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!realExt.empty()) {
|
2007-06-18 19:59:23 +04:00
|
|
|
// Store the extension without the leading '.'.
|
|
|
|
this->Extension = realExt.substr(1);
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2007-06-18 19:59:23 +04:00
|
|
|
|
|
|
|
// Look for object files.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->Extension == "obj" || this->Extension == "o" ||
|
|
|
|
this->Extension == "lo") {
|
2005-11-17 21:49:10 +03:00
|
|
|
this->SetProperty("EXTERNAL_OBJECT", "1");
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2007-06-18 19:59:23 +04:00
|
|
|
|
|
|
|
// Try to identify the source file language from the extension.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->Language.empty()) {
|
2008-04-29 22:17:42 +04:00
|
|
|
this->CheckLanguage(this->Extension);
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2008-04-29 22:17:42 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
void cmSourceFile::CheckLanguage(std::string const& ext)
|
|
|
|
{
|
|
|
|
// Try to identify the source file language from the extension.
|
2014-01-21 20:09:14 +04:00
|
|
|
cmMakefile const* mf = this->Location.GetMakefile();
|
2015-05-03 12:10:30 +03:00
|
|
|
cmGlobalGenerator* gg = mf->GetGlobalGenerator();
|
2014-02-04 06:20:56 +04:00
|
|
|
std::string l = gg->GetLanguageFromExtension(ext.c_str());
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!l.empty()) {
|
2007-06-18 19:59:23 +04:00
|
|
|
this->Language = l;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2001-02-27 01:15:44 +03:00
|
|
|
}
|
2000-08-29 23:26:29 +04:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
bool cmSourceFile::Matches(cmSourceFileLocation const& loc)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2007-06-18 19:59:23 +04:00
|
|
|
return this->Location.Matches(loc);
|
2002-08-16 19:20:18 +04:00
|
|
|
}
|
|
|
|
|
2013-09-03 00:27:32 +04:00
|
|
|
void cmSourceFile::SetProperty(const std::string& prop, const char* value)
|
2002-08-16 19:20:18 +04:00
|
|
|
{
|
2015-06-06 10:41:15 +03:00
|
|
|
this->Properties.SetProperty(prop, value);
|
2013-07-25 11:24:53 +04:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->IsUiFile) {
|
2014-01-21 20:09:14 +04:00
|
|
|
cmMakefile const* mf = this->Location.GetMakefile();
|
2016-05-16 17:34:04 +03:00
|
|
|
if (prop == "AUTOUIC_OPTIONS") {
|
2014-01-21 20:09:14 +04:00
|
|
|
const_cast<cmMakefile*>(mf)->AddQtUiFileWithOptions(this);
|
2013-07-25 11:24:53 +04:00
|
|
|
}
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2002-08-16 19:20:18 +04:00
|
|
|
}
|
|
|
|
|
2013-09-03 00:27:32 +04:00
|
|
|
void cmSourceFile::AppendProperty(const std::string& prop, const char* value,
|
2011-07-14 01:14:41 +04:00
|
|
|
bool asString)
|
2008-01-18 02:13:55 +03:00
|
|
|
{
|
2015-06-06 10:41:15 +03:00
|
|
|
this->Properties.AppendProperty(prop, value, asString);
|
2008-01-18 02:13:55 +03:00
|
|
|
}
|
|
|
|
|
2013-09-03 00:27:32 +04:00
|
|
|
const char* cmSourceFile::GetPropertyForUser(const std::string& prop)
|
2008-01-30 19:21:54 +03:00
|
|
|
{
|
|
|
|
// This method is a consequence of design history and backwards
|
|
|
|
// compatibility. GetProperty is (and should be) a const method.
|
|
|
|
// Computed properties should not be stored back in the property map
|
|
|
|
// but instead reference information already known. If they need to
|
|
|
|
// cache information in a mutable ivar to provide the return string
|
|
|
|
// safely then so be it.
|
|
|
|
//
|
|
|
|
// The LOCATION property is particularly problematic. The CMake
|
|
|
|
// language has very loose restrictions on the names that will match
|
|
|
|
// a given source file (for historical reasons). Implementing
|
|
|
|
// lookups correctly with such loose naming requires the
|
|
|
|
// cmSourceFileLocation class to commit to a particular full path to
|
|
|
|
// the source file as late as possible. If the users requests the
|
|
|
|
// LOCATION property we must commit now.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (prop == "LOCATION") {
|
2008-01-30 19:21:54 +03:00
|
|
|
// Commit to a location.
|
|
|
|
this->GetFullPath();
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2008-01-30 19:21:54 +03:00
|
|
|
|
|
|
|
// Perform the normal property lookup.
|
|
|
|
return this->GetProperty(prop);
|
|
|
|
}
|
|
|
|
|
2013-09-03 00:27:32 +04:00
|
|
|
const char* cmSourceFile::GetProperty(const std::string& prop) const
|
2002-08-16 19:20:18 +04:00
|
|
|
{
|
2007-06-18 19:59:23 +04:00
|
|
|
// Check for computed properties.
|
2016-05-16 17:34:04 +03:00
|
|
|
if (prop == "LOCATION") {
|
|
|
|
if (this->FullPath.empty()) {
|
2016-06-27 23:44:16 +03:00
|
|
|
return CM_NULLPTR;
|
2006-03-22 22:06:52 +03:00
|
|
|
}
|
2016-08-18 21:36:29 +03:00
|
|
|
return this->FullPath.c_str();
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2006-03-22 22:06:52 +03:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
const char* retVal = this->Properties.GetPropertyValue(prop);
|
|
|
|
if (!retVal) {
|
2014-01-21 20:09:14 +04:00
|
|
|
cmMakefile const* mf = this->Location.GetMakefile();
|
2016-05-16 17:34:04 +03:00
|
|
|
const bool chain =
|
|
|
|
mf->GetState()->IsPropertyChained(prop, cmProperty::SOURCE_FILE);
|
|
|
|
if (chain) {
|
2015-06-06 10:41:30 +03:00
|
|
|
return mf->GetProperty(prop, chain);
|
2006-12-13 20:19:59 +03:00
|
|
|
}
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2006-12-13 20:19:59 +03:00
|
|
|
|
2012-08-13 21:42:58 +04:00
|
|
|
return retVal;
|
2002-08-16 19:20:18 +04:00
|
|
|
}
|
|
|
|
|
2013-09-03 00:27:32 +04:00
|
|
|
bool cmSourceFile::GetPropertyAsBool(const std::string& prop) const
|
2002-08-16 19:20:18 +04:00
|
|
|
{
|
2006-12-07 17:45:32 +03:00
|
|
|
return cmSystemTools::IsOn(this->GetProperty(prop));
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
2005-02-19 00:19:09 +03:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
cmCustomCommand* cmSourceFile::GetCustomCommand()
|
2005-04-14 00:35:26 +04:00
|
|
|
{
|
2007-06-18 19:59:23 +04:00
|
|
|
return this->CustomCommand;
|
2005-04-14 00:35:26 +04:00
|
|
|
}
|
2006-12-07 17:45:32 +03:00
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
cmCustomCommand const* cmSourceFile::GetCustomCommand() const
|
2006-12-07 17:45:32 +03:00
|
|
|
{
|
2007-06-18 19:59:23 +04:00
|
|
|
return this->CustomCommand;
|
2006-12-07 17:45:32 +03:00
|
|
|
}
|
|
|
|
|
2007-06-18 19:59:23 +04:00
|
|
|
void cmSourceFile::SetCustomCommand(cmCustomCommand* cc)
|
2006-12-13 20:19:59 +03:00
|
|
|
{
|
2007-06-18 19:59:23 +04:00
|
|
|
cmCustomCommand* old = this->CustomCommand;
|
|
|
|
this->CustomCommand = cc;
|
|
|
|
delete old;
|
2006-12-13 20:19:59 +03:00
|
|
|
}
|