[llvm-commits] CMake flag for turning on exceptions

Óscar Fuentes ofv at wanadoo.es
Wed Sep 15 12:21:36 PDT 2010


Garrison Venn <gvenn.cfe.dev at gmail.com>
writes:

> When using REQUIRES_EH = 1 in a Makefile for a LLVM directory target, is the
> equivalent: set(LLVM_REQUIRES_EH 1), in the analogous CMakeLists.txt?

At least on the LLVM part, the variable LLVM_REQUIRES_EH (if it exists)
has no effect. The cmake build uses the default RTTI and exception
settings of the compiler (which is ON on all cases, AFAIK)

> I just noticed that I did not set this, and don't have time right this
> second to generate a CMake build structure, though I thought I did
> this when I initially inserted code into the repository. I'm a little
> concerned about the use of two build systems becoming out of whack for
> infrequently used subsections of LLVM.

Although there was some effort to implement the most popular features of
the traditional build on the cmake build, a total one-to-one match was
not a goal. On this case, I dind't perceive too much interest on
RTTI-less, exception-less builds. This can change at any moment,
though. Do you *need* it? Anyone else using cmake needs that?

> It would be nice if we could generate one from the other;

CMake can generate makefiles, no problem. But the traditional build
doesn't work outside of autoconf&&gmake, so it can't be used on
environments like MSVC++. That was the main motivation for creating the
CMake build.

> or just use one.

It is not up to me to decide that, but if the project leaders want that
to happen, I'm willing to contribute the necessary time to implement
whatever extra requirements required by the switch.

[snip]




More information about the llvm-commits mailing list