[PATCH] cmake: Error on invalid CMAKE_BUILD_TYPE

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 8 00:10:19 PDT 2015


Apparently if you make a typo in the argument to CMAKE_BUILD_TYPE, cmake
silently accepts this but doesn't apply any particular build type to
your build. For LLVM, this means you get a build that doesn't really
make any sense - it's sort of a debug build with asserts disabled.

I'm not really sure why cmake allows this at all and the attached patch
is basically a horrible hack to avoid the issue, but I just spent an
obscene amount of time debugging some bizarre behaviour I ran into
because I set the build type to RelWithDebugInfo instead of
RelWithDebInfo.

Better suggestions welcome.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-has-no-error-handling.patch
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150808/0f059628/attachment.bin>


More information about the llvm-commits mailing list