[CMake] CHECK_CXX_ACCEPTS_FLAG delieverts wrong result

Fetzer, Andreas a.fetzer at Dkfz-Heidelberg.de
Tue Sep 24 02:47:59 EDT 2013


Hi,

I am using Mac OS X 10.7 with Apple clang version 3.1. At the moment our build fails due to an unknown compiler flag:

error: unknown warning option '-Wstrict-null-sentinel' [-Werror,-Wunknown-warning-option]

Although we are checking whether the flag is accepted by the selected compiler. When I use the following statement:


    CHECK_CXX_ACCEPTS_FLAG(${_cxxflag} HAS_FLAG)

    if(NOT HAS_FLAG)

      message("Flag check failure ${_cxxflag}")

    else()

      message("Flag ${_cxxflag} accepted")

    endif()

Cmake tells me that the '-Wstrict-null-sentinel' flag is accepted. Is this a bug in Cmake or am I doing something wrong?
I use Cmake 2.8.8

Thanks in advance!

Best regards
Andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130924/1fa2129f/attachment.htm>


More information about the CMake mailing list