[PATCH] Expose LLVM build flags in LLVMConfig.cmake

Stephen Kelly steveire at gmail.com
Mon Jul 21 06:58:55 PDT 2014


On 07/21/2014 03:28 PM, Dan Liew wrote:
> I had another quick look at this. It seems there are
>
> - INTERFACE_COMPILE_OPTIONS
> - INTERFACE_COMPILE_DEFINITIONS
>
> properties on Targets. Am I right in understanding that if these were
> set on targets and then exported that these properties would persist?

I don't know what you mean by 'persist'.

> Am I also right in thinking that if someone imports that target then
> something like INTERFACE_COMPILE_OPTIONS are not automatically added
> and that a client of LLVM would have to do something like...

The new documentation in CMake 3.0 also apply to earlier versions,
insofar as the properties and commands exist:

http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html#build-specification-and-usage-requirements

"The contents of the INTERFACE_COMPILE_OPTIONS
<http://www.cmake.org/cmake/help/v3.0/prop_tgt/INTERFACE_COMPILE_OPTIONS.html#prop_tgt:INTERFACE_COMPILE_OPTIONS>
target properties are /Usage Requirements/ – they specify content which
consumers must use to correctly compile and link with the target they
appear on. For any binary target, the contents of each INTERFACE_
property on each target specified in a target_link_libraries()
<http://www.cmake.org/cmake/help/v3.0/command/target_link_libraries.html#command:target_link_libraries>
command is consumed"

So, further user action is not necessary beyond use of
target_link_libraries, if the targets have such properties populated.

Some information in

 http://www.kdab.com/modern-cmake-with-qt-and-boost/

might also be useful to you.

Thanks,

Steve.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140721/f2ef2e73/attachment.html>


More information about the llvm-commits mailing list