| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Adds `Fortran_COMPILER_ID` and `Fortran_COMPILER_VERSION` generator
expression support to match equivalent `C_COMPILER_ID`,
`CXX_COMPILER_ID`, `C_COMPILER_VERSION`, and `CXX_COMPILER_VERSION`
support.
This is very helpful in the case where the C/C++ compiler suite is a
different type of compiler from the platform Fortran compiler and
projects use generator expressions to assign compiler flags and
definitions. (e.g. `GNU` C/C++ and `SunPro` Fortran on Linux)
|
| |
|
|
|
|
| |
This resolves #18550.
|
|
|
|
| |
This resolves #18549.
|
| |
|
| |
|
|
|
|
| |
And point out that STREQUAL is case sensitive.
|
|
|
|
|
| |
Makes things yet clearer and simpler.
Also correct remnant of "informational expression".
|
| |
|
| |
|
|
|
|
|
| |
* Consolidate examples
* Sort, and insert subsection headers
|
|
|
|
|
| |
Main classification by return type,
subclassification by dependences
|
|
|
|
|
| |
Rename Logical -> Boolean Generator Expressions.
It's the return type that helps us to sort the expression zoo.
|
|
|
|
|
|
|
|
|
| |
Before, the closely related signatures
$<condition:true_value>
$<IF:condition,true_value,false_value>
were explained in two different sections. The former section
was badly explained, with '0' and '1' in place of the formal
parameter 'condition'.
|
|
|
|
|
|
|
| |
That generator expressions enable conditional things
has not been said before.
Amended for nicer source format.
|
|
|
|
|
|
|
| |
No need to save a few characters on formal parameters.
Use this occasion to correct $<PLATFORM_ID:comp>:
the parameter is a platform_id, not a compiler_id.
|
|
|
|
|
|
| |
Expand "..." and "?", which could be mistaken as metacharacters
(and in the explanations of AND and OR actually were meant as
metacharacters).
|
|
|
|
|
|
| |
When using $<TARGET_PROPERTY:prop>, the value of prop comes from
the consuming target rather than the current target. Add a note to
clarify this.
|
| |
|
|
|
|
| |
in cmake-generator-expressions
|
| |
|
|
|
|
| |
Fixes: #17884
|
|
|
|
|
| |
Define `$<TARGET_NAME_IF_EXISTS:tgt>` to mean `tgt` if the target
exists and otherwise an empty string.
|
|
|
|
|
| |
Define `$<TARGET_EXISTS:a>` to `1` if `a` is an existed target name,
else `0`.
|
|\
| |
| |
| |
| |
| |
| | |
5089f560 Genex: Add IN_LIST logical operator
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1724
|
| |
| |
| |
| | |
Implements #17679
|
|/
|
|
|
| |
The MAKE_C_IDENTIFIER subcommand was also buried in the docs for the
TIMESTAMP subcommand, so it has been pulled out to its own subheading.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The set of compile flags used for a target's C and C++ sources is based
on the linker language. By default this is always the C++ flags if any
C++ sources appear in the target, and otherwise the C flags. Therefore
we can define the `COMPILE_LANGUAGE` generator expression in
`INCLUDE_DIRECTORIES` to match the selected language.
This is not exactly the same as for other generators, but is the best VS
and Xcode can do. It is also sufficient for many use cases since the
set of include directories for C and C++ is frequently similar but may
be distinct from those for other languages like CUDA.
Fixes: #17435
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The set of compile flags used for a target's C and C++ sources is based
on the linker language. By default this is always the C++ flags if any
C++ sources appear in the target, and otherwise the C flags. Therefore
we can define the `COMPILE_LANGUAGE` generator expression in
`COMPILE_DEFINITIONS` to match the selected language.
This is not exactly the same as for other generators, but is the best VS
and Xcode can do. It is also sufficient for many use cases since the
set of definitions for C and C++ is frequently similar but may be
distinct from those for other languages like CUDA.
Issue: #17435
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit v3.9.0-rc4~3^2~1 (VS: Fix target_compile_options for CUDA,
2017-06-21), the evaluation of `COMPILE_LANGUAGE` receives the proper
language. The set of compile flags used for a target's C and C++
sources is based on the linker language. By default this is always the
C++ flags if any C++ sources appear in the target, and otherwise the C
flags. Therefore we can define the `COMPILE_LANGUAGE` generator
expression in `COMPILE_OPTIONS` to match the selected language.
This is not exactly the same as for other generators, but is the best VS
can do. It is also sufficient for many use cases since the set of
allowed flags for C and C++ is almost the same in Visual Studio.
Furthermore, since the VS generator moves many of the flags to
declarative `.vcxproj` elements, it will automatically avoid passing
C++ flags for C sources.
Issue: #17435
|
|
|
|
|
|
|
|
|
| |
Previously the `TARGET_OBJECTS` generator expression was limited
only to use in a buildsystem context so that Xcode's placeholders
in object file paths can be evaluated. Lift this restriction so
that the expression can at least be used in most settings.
Co-Author: Brad King <brad.king@kitware.com>
|
| |
|
|
|
|
| |
Closes #16733
|
|
|
|
|
|
|
|
| |
This allows a single condition to be used to choose between two
alternatives. Without this the condition must be duplicated with
one surrounded by `NOT`.
Closes: #15585
|
|
|
|
|
| |
This adds the LESS_EQUAL, GREATER_EQUAL, and associated STR and VERSION
equivalents to use the combined <= and >= functionality.
|
|
|
|
|
| |
The Debian package checker tool (lintian) detected several typos in
CMake.
|
|
|
|
|
|
|
|
|
| |
Some commands on Windows do not understand forward slash paths and
require backslashes. In order to help projects generate shell
invocations of such commands, provide a generator expression to convert
paths to the shell-preferred path format for the current generator.
This will allow custom commands to generate paths the same way CMake
does for compiler command invocations.
|
|
|
|
|
|
|
| |
Extend sentences in other documentation linking to this manual to
say that it has a list of supported compilers.
Co-Author: Brad King <brad.king@kitware.com>
|
|
|
|
|
| |
These are not 'logical' expressions. They create output and are
often used together with the logical expressions.
|
|
|
|
| |
Issue an error if this is encountered by an IDE generator.
|
|
|
|
| |
Issue an error if this is encountered by an IDE generator.
|
|
|
|
|
|
| |
Follow-ups will allow the use of the generator expression
for compile definitions and include directories for non-IDE
generators.
|
|
|
|
| |
A latex document can have its own TOC.
|
|
|
|
|
|
| |
Update the wording of some examples to avoid long lines in code blocks.
Otherwise the formatted documentation can exceed certain column width
limitations.
|
| |
|
|
|
|
|
|
|
|
| |
Previously this generator expression was used internally by the
target_link_libraries command to honor private linking requirements of
static libraries in their INTERFACE_LINK_LIBRARIES. Remove the check
that limits $<LINK_ONLY> to this use case to make it available for
project code to use too.
|
|
|
|
|
|
| |
In the cmake-generator-expressions(7) manual, link to the variables
that correspond to the PLATFORM_ID, C_COMPILER_ID, CXX_COMPILER_ID,
C_COMPILER_VERSION, and CXX_COMPILER_VERSION generator expressions.
|
|
|
|
|
|
|
|
| |
Link to it from the documentation of related properties, variables
and commands.
Extend the cmake-developer(7) documentation with notes on
extending feature support for compilers.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow setting build properties based on the features available
for a target. The availability of features is determined at
generate-time by evaluating the link implementation.
Ensure that the <LANG>_STANDARD determined while evaluating
COMPILE_FEATURES in the link implementation is not lower than that
provided by the INTERFACE of the link implementation. This is
similar to handling of transitive properties such as
POSITION_INDEPENDENT_CODE.
|
|
|
|
|
|
|
|
|
|
| |
The output of this expression may contain macros for IDEs to replace
such as $(Configuration), $(CURRENT_ARCH) etc. To avoid generating
content which is not usable in other contexts, report an error if
there is an attempt to use it in other contexts.
This commit may be reverted in the future if a solution to the
above difference is implemented.
|