[CMake] Portable "treat warnings as errors"?

Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA artur.kedzierski at navy.mil
Tue Sep 19 08:00:39 EDT 2006


	I thought about doing it this way. However, then I thought
that there might be some portable way of doing that which would save me
all the IF/ENDIF's. Sounds like something relatively easy to implement.
Should I add that to CMake's bug tracker?
	Anyway, thank You for the code snippet. I don't have to look up 
the right variables.

--
Artur Kedzierski


-----Original Message-----
From: Sylvain Benner [mailto:benner at virtools.com] 
Sent: Tuesday, September 19, 2006 3:52
To: Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA; CMake Mailing List
Subject: Re: [CMake] Portable "treat warnings as errors"?

If there is no such variable, you can still add the flag by yourself within 
an IF statement.

IF(CMAKE_COMPILER_IS_GNUCXX)
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

Sylvain


----- Original Message ----- 
From: "Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA" 
<artur.kedzierski at navy.mil>
To: "CMake Mailing List" <cmake at cmake.org>
Sent: Tuesday, September 19, 2006 12:15 PM
Subject: [CMake] Portable "treat warnings as errors"?


> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4670 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060919/baec5de8/smime-0001.bin


More information about the CMake mailing list