diff options
Diffstat (limited to 'external')
| -rw-r--r-- | external/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 6b8b5a527..12d5490c7 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -152,8 +152,12 @@ if(SLANG_ENABLE_SLANG_GLSLANG) # Enable mimalloc for SPIRV-Tools to improve compilation performance # Based on SPIRV-Tools PR #6267: https://github.com/KhronosGroup/SPIRV-Tools/pull/6267 if(SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC) - # Place mimalloc in slang/external instead of spirv-tools/external for better organization - set(MIMALLOC_PATH "${CMAKE_CURRENT_SOURCE_DIR}/mimalloc") + if(NOT SLANG_OVERRIDE_MIMALLOC_PATH) + # Place mimalloc in slang/external instead of spirv-tools/external for better organization + set(MIMALLOC_PATH "${CMAKE_CURRENT_SOURCE_DIR}/mimalloc") + else() + set(MIMALLOC_PATH "${SLANG_OVERRIDE_MIMALLOC_PATH}/mimalloc") + endif() # Download mimalloc if it's not available if(NOT EXISTS "${MIMALLOC_PATH}/CMakeLists.txt") |
