[PATCH] D26579: [cmake] Allow CMAKE_BUILD_TYPE=Gentoo

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 14:32:45 PST 2016


beanz added a subscriber: gottesmm.
beanz added a comment.

Replacing the code we have where we check `CMAKE_BUILD_TYPE` with more robust and sane checks, is a great idea that I wholly support. Defining custom build types isn't.

From @rnk's example we should be able to translate the conditional:

  if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )

Into something more like:

  if(CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE} MATCHES "-DNDEBUG")

This check instead checks to see if the configuration-specific flags contain "-DNDEBUG", which is really what we care about. I had a conversation with @gottesmm about this a while back.


https://reviews.llvm.org/D26579





More information about the llvm-commits mailing list