cmake: actually test -Wcomment
authorDylan Noblesmith <nobled@dreamwidth.org>
Sat, 23 Aug 2014 21:10:58 +0000 (21:10 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Sat, 23 Aug 2014 21:10:58 +0000 (21:10 +0000)
commita2a6fa2fd58b55af59e8cf0a6112115586c6bae3
tree4d39985d9858386ea45d8f875ef2351688dcb4c2
parent136fd4c7e245447783fb49b430d3dc6ee2a7d65e
cmake: actually test -Wcomment

This test was testing nothing, as only -Werror was ever
being added to the compiler flags.

You can see the final nitty-gritty compiler invocation in
CMakeFiles/CMakeOutput.log (for successful tests) and
CMakeFiles/CMakeError.log (for failed tests).

Before:
Building C object CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o
/usr/bin/clang   -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default  -DC_WCOMMENT_ALLOWS_LINE_WRAP  -Werror   -o CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o   -c /home/nobled/code/llvm-b9/CMakeFiles/CMakeTmp/src.c

After:
Building C object CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o
/usr/bin/clang   -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default  -DC_WCOMMENT_ALLOWS_LINE_WRAP  -Werror -Wcomment   -o CMakeFiles/cmTryCompileExec3385359576.dir/src.c.o   -c /home/nobled/code/llvm-b9/CMakeFiles/CMakeTmp/src.c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216328 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/HandleLLVMOptions.cmake