File tree 3 files changed +11
-17
lines changed
3 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ option(
105
105
ON
106
106
)
107
107
108
+ option (SLANG_ENABLE_DXIL "Enable generating DXIL with DXC" ON )
109
+
108
110
option (SLANG_ENABLE_FULL_IR_VALIDATION "Enable full IR validation (SLOW!)" )
109
111
option (SLANG_ENABLE_IR_BREAK_ALLOC, "Enable _debugUID on IR allocation" )
110
112
option (SLANG_ENABLE_ASAN "Enable ASAN (address sanitizer)" )
Original file line number Diff line number Diff line change @@ -198,23 +198,14 @@ function(set_default_compile_options target)
198
198
# Settings dependent on config options
199
199
#
200
200
201
- if (SLANG_ENABLE_FULL_DEBUG_VALIDATION)
202
- target_compile_definitions (
203
- ${target}
204
- PRIVATE SLANG_ENABLE_FULL_IR_VALIDATION
205
- )
206
- endif ()
207
-
208
- if (SLANG_ENABLE_IR_BREAK_ALLOC)
209
- target_compile_definitions (
210
- ${target}
211
- PRIVATE SLANG_ENABLE_IR_BREAK_ALLOC
212
- )
213
- endif ()
214
-
215
- if (SLANG_ENABLE_DX_ON_VK)
216
- target_compile_definitions (${target} PRIVATE SLANG_CONFIG_DX_ON_VK)
217
- endif ()
201
+ target_compile_definitions (
202
+ ${target}
203
+ PRIVATE
204
+ SLANG_ENABLE_DXIL_SUPPORT=$<BOOL :${SLANG_ENABLE_DXIL} >
205
+ $<$<BOOL :${SLANG_ENABLE_FULL_DEBUG_VALIDATION} >:SLANG_ENABLE_FULL_IR_VALIDATION>
206
+ $<$<BOOL :${SLANG_ENABLE_IR_BREAK_ALLOC} >:SLANG_ENABLE_IR_BREAK_ALLOC>
207
+ $<$<BOOL :${SLANG_ENABLE_DX_ON_VK} >:SLANG_CONFIG_DX_ON_VK>
208
+ )
218
209
219
210
if (SLANG_ENABLE_ASAN)
220
211
add_supported_cxx_flags(
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ See the [documentation on testing](../tools/slang-test/README.md) for more infor
152
152
| ` SLANG_VERSION ` | Latest ` v* ` tag | The project version, detected using git if available |
153
153
| ` SLANG_EMBED_CORE_MODULE ` | ` TRUE ` | Build slang with an embedded version of the core module |
154
154
| ` SLANG_EMBED_CORE_MODULE_SOURCE ` | ` TRUE ` | Embed the core module source in the binary |
155
+ | ` SLANG_ENABLE_DXIL ` | ` TRUE ` | Enable generating DXIL using DXC |
155
156
| ` SLANG_ENABLE_ASAN ` | ` FALSE ` | Enable ASAN (address sanitizer) |
156
157
| ` SLANG_ENABLE_FULL_IR_VALIDATION ` | ` FALSE ` | Enable full IR validation (SLOW!) |
157
158
| ` SLANG_ENABLE_IR_BREAK_ALLOC ` | ` FALSE ` | Enable IR BreakAlloc functionality for debugging. |
You can’t perform that action at this time.
0 commit comments