OS X 10.10 update
Iproved regex in cmake script for os x support