[LLVMdev] CMake-generated llvm-config.

Óscar Fuentes ofv at wanadoo.es
Thu Jan 27 04:50:46 PST 2011


[cc-ing llvm-dev]

arrowdodger <6yearold at gmail.com> writes:

> Hello. I've found that CMake-generated llvm-config contains -pedantic flag,
> if LLVM_ENABLE_PEDANTIC was ON during cmake configuration.
> This forces all llvm-config clients to build their sources with -pedantic,
> which, i think, is kind of wrong.
> For example, it's not possible to build LDC (LLVM D frontend), because it's
> sources can't be compiled with -pedantic flag.
>
> What do you think about this? Should this be fixed?

How do they build their frontend? Do they use LLVM as an external
library? In that case, LLVM_ENABLE_PEDANTIC should not affect them at
all. If their frontend is integrated on the LLVM cmake build system,
they can switch off -pedantic (on svn LLVM) putting this at the top of
their CMakeLists.txt:

llvm_replace_compiler_option(CMAKE_CXX_FLAGS, "-pedantic" "")
llvm_replace_compiler_option(CMAKE_C_FLAGS, "-pedantic" "")



More information about the llvm-dev mailing list