[PATCH] Add LLVM_REQUIRES_EH and LLVM_REQUIRES_RTTI as options in CMake

Brad King brad.king at kitware.com
Mon Jul 21 09:53:04 PDT 2014


On 07/21/2014 11:53 AM, Dan Liew wrote:
> +if(LLVM_ENABLE_EH AND NOT LLVM_ENABLE_RTTI)
> +  set(LLVM_ENABLE_RTTI ON CACHE BOOL "Enable run time type information" FORCE)
> +  message(WARNING "Exception handling requires RTTI. Enabling RTTI")
> +endif()

I don't think we should force the option here.  We don't know which
option as set/unset by mistake.  Also if the options are set wrong
by a script the warning might go unnoticed and the build may do
something not intended by the user.  Instead use message(FATAL_ERROR)
and ask the user to fix one of the options.

Thanks,
-Brad




More information about the llvm-commits mailing list