diff options
author | Brad King <brad.king@kitware.com> | 2005-03-22 13:36:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-03-22 13:36:40 (GMT) |
commit | 289429cd006f5a2c2e9f4d5ae590b3bf7b5598b6 (patch) | |
tree | b24b352a577b4a44268d2e4c563dcf383c05860d /Source/cmAddCustomTargetCommand.cxx | |
parent | e0fab29395a7798c53a1e12a2aa7a246ed98b036 (diff) | |
download | CMake-289429cd006f5a2c2e9f4d5ae590b3bf7b5598b6.zip CMake-289429cd006f5a2c2e9f4d5ae590b3bf7b5598b6.tar.gz CMake-289429cd006f5a2c2e9f4d5ae590b3bf7b5598b6.tar.bz2 |
ENH: Added check for invalid characters in output name.
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r-- | Source/cmAddCustomTargetCommand.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index ceb5241..02ae161 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -90,6 +90,16 @@ bool cmAddCustomTargetCommand::InitialPass(std::vector<std::string> const& args) } } + std::string::size_type pos = args[0].find_first_of("#<>"); + if(pos != args[0].npos) + { + cmOStringStream msg; + msg << "called with target name containing a \"" << args[0][pos] + << "\". This character is not allowed."; + this->SetError(msg.str().c_str()); + return false; + } + // Store the last command line finished. if(!currentLine.empty()) { |