[LLVMdev] [RFC] Raise minimum required CMake version to 3.0
Zachary Turner
zturner at google.com
Wed Mar 11 10:10:49 PDT 2015
On Tue, Mar 10, 2015 at 9:16 PM Chandler Carruth <chandlerc at google.com>
wrote:
>
> Maybe Zach is ready to use some features. I'll let him make the case if so.
>
I went and looked over the feature list of 3.0, 3.1, and 3.2. Here's my
thoughts. It would be nice if someone else with a different perspective
could do the same thing.
*CMake 3.0*
* The $<UPPER_CASE> and $<LOWER_CASE> generator expressions seem useful for
cleaning up string comparisons. No real other killer features I could find.
*CMake 3.1*
* A project generator for Visual Studio 2015 was added. We don't need to
require this yet, but keep this in mind for when it's time to bump the
minimum MSVC version again.
* $<LINK_ONLY> generator expression looks useful for speeding up builds.
Right now target_link_libraries(A B) will create a dependency from A to B,
so it will force A to build after B is finished. If A and B are both
static libraries and B doesn't generate code, they could build in parallel.
$<LINK_ONLY> target_link_libraries(A $<LINK_ONLY:B>) appears to solve this
and allow A and B to be build in parallel.
* A new $<COMPILE_FEATURES> generator expression appears useful for
cleaning up some existing CMake code we have to detect available compile
features.
*CMake 3.2*
* add_custom_command(BYPRODUCTS) looks very useful for specifying outputs
of custom commands. There are a number of issues in the LLDB build (not
sure about other projects) where we have a custom command which runs a
python script that generates multiple outputs, and I haven't yet found a
solution for how to get CMake to regenerate those items if you go and
delete the byproducts. This appears to solve that.
* continue() is a welcome new control flow instruction
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150311/4baf55f5/attachment.html>
More information about the llvm-dev
mailing list