Let’s have a brief look at each of these. Most notably it can be one of the following: The part between the angle brackets can vary quite widely. In its most general form a generator expression is specified with a dollar-sign and a pair of angle brackets: $ Now that you know where generator expressions can be used, let’s see how to use them. You’ll develop a feel for it with time, just consult the documentation for specifics as you go. There are exceptions to this of course – if a variable is later used by cmake to initialize properties on targets, then you’ll get the desired effect. On the other hand if you try using generator-expressions on plain variables you’re bound to have a bad time. Expect generator-expressions to be usable with all of the commands prefixed with target_ ( target_include_directories etc.) and commands that operate on properties directly ( set_target_properties, etc.). Well, broadly speaking generator-expressions, much like most of modern CMake, work with targets and properties – if a command deals with a target and modifies its properties in some way, chances are you’ll be able to use generator-expressions with that command. That’s great, but what does this actually mean in practical terms? With which specific commands can I, or can I not use generator-expressions? build – generator-expressions are OK here.generation – generator-expressions are OK here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |