This commit cherry-picks and squashes the following commits:
4685872 "FortranCInterface: Fix PathScale detection..." (2010-02-16)
b39fe94 "Fix problem with ExternalProject test..." (2010-02-17)
70290e1 "Add support for QtDeclartive module" (2010-02-17)
282ba89 "Clarify CMAKE_MODULE_PATH documentation" (2010-02-18)
4eba05d "Suppress GNU flag -fPIC on Windows" (2010-02-19)
57efb4a "BUG: We shouldn't be setting the HideWindow..." (2010-02-19)
The cmProcess::Buffer class derives from std::vector. We were using
local variable 'data' in the GetLine method but this name shadowed a
member of vector with GNU. This renames it to 'text'.
When we clear the buffer for an output pipe after returning the last
partial line (without a newline) we need to set the partial line range
to empty. Otherwise the buffer object is left in an inconsistent state.
This commit fixes cmCTestRunTest and cmProcess to more efficiently
handle child output. We now use the buffer for each child output pipe
to hold at most a partial line plus one new block of data at a time.
All complete lines are scanned in-place, and then only the partial line
at the end of the buffer is moved back to the beginning before appending
new data.
We also simplify the cmProcess interface by making GetNextOutputLine the
only method that needs to be called while the process is running. This
simplifies cmCTestRunTest so that CheckOutput can be called until it
returns false when the process is done.