Let me now turn the call over to Earl Lewis, Chairman and CEO of FLIR Systems. Earl?
Earl R. Lewis
Yes, thank you, Wit. And welcome, everyone, and thank you for joining us this morning. As we indicated last week, our second quarter 2012 performance was below our expectations. Global fiscal uncertainty caused by weakness in our maritime predictive maintenance and building markets and our cores business within Commercial Systems was negatively impacted by order delays from several key customers.
The Government Systems divisions have better order flow but revenue and earnings were down compared with last year. In response to lower earnings, we made operational changes during the quarter that resulted in a pretax restructuring charge of approximately $7 million. The restructuring should reduce cost by approximately $17 million per year beginning in the fourth quarter of this year.
We generated $77 million of cash from operations in the second quarter and utilized some of that cash to repurchase 3 million shares of our stock. We also increased our backlog by over $40 million from the end of Q1. Our Commercial business generated about half of this increase and Government, the other half. Our unit volumes continue to grow and many of our systems markets did well, reflecting continuing progress on our strategy to continually lower the cost of ownership of infrared technology.
Given the results for the first half of the year and our re-forecast of the remainder of the year, we've adjusted our outlook for 2012 revenue to between $1 -- or between $1.4 billion and $1.5 billion, and earnings per diluted share between $1.40 and $1.50.
Our current order pipeline backlog and our efforts to streamline our operations indicate a return to growth in our fourth quarter. While there remains some significant unknowns in our markets, such as sequestration softness in Europe in the building markets, we believe this represents an attainable results.