summaryrefslogtreecommitdiffstats
path: root/Source/cmAddCustomCommandCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-08-08 16:00:42 (GMT)
committerBrad King <brad.king@kitware.com>2005-08-08 16:00:42 (GMT)
commitbb043289d06c333ab4c53ed77b19a1e56c1171ce (patch)
tree121ebc510815564ba07df7550b07ba7a739cb29d /Source/cmAddCustomCommandCommand.cxx
parent2c658a6300d1f90cd922aa35e97d248942aced54 (diff)
downloadCMake-bb043289d06c333ab4c53ed77b19a1e56c1171ce.zip
CMake-bb043289d06c333ab4c53ed77b19a1e56c1171ce.tar.gz
CMake-bb043289d06c333ab4c53ed77b19a1e56c1171ce.tar.bz2
BUG: Do not convert SOURCE argument from relative to full path. It breaks the old-style SOURCE==TARGET trick and the SOURCE argument is only present for old-style commands anyway. This addresses bug#2120.
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index a4905dd..185c0de 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -120,7 +120,6 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
std::string filename;
switch (doing)
{
- case doing_source:
case doing_output:
case doing_outputs:
if (!cmSystemTools::FileIsFullPath(copy.c_str()))
@@ -130,6 +129,12 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
}
filename += copy;
break;
+ case doing_source:
+ // We do not want to convert the argument to SOURCE because
+ // that option is only available for backward compatibility.
+ // Old-style use of this command may use the SOURCE==TARGET
+ // trick which we must preserve. If we convert the source
+ // to a full path then it will no longer equal the target.
default:
break;
}