diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-08 20:46:08 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-11-08 20:46:08 (GMT) |
commit | f5d95fb078ec48755762931fe2882ed1cbe1171e (patch) | |
tree | 945dca55d34b543db452c586aba0de863cf25cec /Source/cmExecProgramCommand.cxx | |
parent | c72462ffb1c75573e0d67a7101438a62bfc2fda1 (diff) | |
download | CMake-f5d95fb078ec48755762931fe2882ed1cbe1171e.zip CMake-f5d95fb078ec48755762931fe2882ed1cbe1171e.tar.gz CMake-f5d95fb078ec48755762931fe2882ed1cbe1171e.tar.bz2 |
Complete rework of makefile generators expect trouble
Diffstat (limited to 'Source/cmExecProgramCommand.cxx')
-rw-r--r-- | Source/cmExecProgramCommand.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx index 82a5672..b6159ea 100644 --- a/Source/cmExecProgramCommand.cxx +++ b/Source/cmExecProgramCommand.cxx @@ -118,6 +118,15 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args) { std::string::size_type first = output.find_first_not_of(" \n\t\r"); std::string::size_type last = output.find_last_not_of(" \n\t\r"); + if(first == std::string::npos) + { + first = 0; + } + if(last == std::string::npos) + { + last = output.size()-1; + } + std::string coutput = std::string(output, first, last-first+1); m_Makefile->AddDefinition(output_variable.c_str(), coutput.c_str()); } |