mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-27 11:18:35 -06:00
Add boolean generator expressions
Add generator expressions that combine and use boolean test results: $<0:...> = empty string (ignores "...") $<1:...> = content of "..." $<AND:?[,?]...> = '1' if all '?' are '1', else '0' $<OR:?[,?]...> = '0' if all '?' are '0', else '1' $<NOT:?> = '0' if '?' is '1', else '1' These will be useful to evaluate (future) boolean query expressions and condition content on the results. Include tests and documentation.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
"Generator expressions are evaluted during build system generation " \
|
||||
"to produce information specific to each build configuration. " \
|
||||
"Valid expressions are:\n" \
|
||||
" $<0:...> = empty string (ignores \"...\")\n" \
|
||||
" $<1:...> = content of \"...\"\n" \
|
||||
" $<CONFIGURATION> = configuration name\n" \
|
||||
" $<TARGET_FILE:tgt> = main file (.exe, .so.1.2, .a)\n" \
|
||||
" $<TARGET_LINKER_FILE:tgt> = file used to link (.a, .lib, .so)\n" \
|
||||
@@ -25,6 +27,12 @@
|
||||
"versions can produce the directory and file name components:\n" \
|
||||
" $<TARGET_FILE_DIR:tgt>/$<TARGET_FILE_NAME:tgt>\n" \
|
||||
" $<TARGET_LINKER_FILE_DIR:tgt>/$<TARGET_LINKER_FILE_NAME:tgt>\n" \
|
||||
" $<TARGET_SONAME_FILE_DIR:tgt>/$<TARGET_SONAME_FILE_NAME:tgt>\n"
|
||||
" $<TARGET_SONAME_FILE_DIR:tgt>/$<TARGET_SONAME_FILE_NAME:tgt>\n" \
|
||||
"Boolean expressions:\n" \
|
||||
" $<AND:?[,?]...> = '1' if all '?' are '1', else '0'\n" \
|
||||
" $<OR:?[,?]...> = '0' if all '?' are '0', else '1'\n" \
|
||||
" $<NOT:?> = '0' if '?' is '1', else '1'\n" \
|
||||
"where '?' is always either '0' or '1'.\n" \
|
||||
""
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user