[cmake-developers] Enabling more compiler warnings

Brad King brad.king at kitware.com
Wed Nov 7 09:58:11 EST 2012


On 11/07/2012 09:40 AM, Stephen Kelly wrote:
> I've removed that one. I'm not sure what it caused specifically. Was it all 
> of these? http://open.cdash.org/viewBuildError.php?buildid=2650259

Yes.

> Does the cmake regex system have a way to match word boundaries? I need to 
> be able to match '-W\b' such that '-Wall' is not matched.

No, but you can do

 if(NOT " ${CMAKE_C_FLAGS} " MATCHES " -W ")

Note the space on the left side.  That allows the right side
to match even at the beginning or end.

-Brad



More information about the cmake-developers mailing list