summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-14 14:21:06 +0800
committerGitHub <noreply@github.com>2024-10-13 23:21:06 -0700
commit3b12b66a45fa48131eee181731682a02a72d54e6 (patch)
tree801926ba012b22ed0e887aca518639446d70b5ff /source
parentbba14dc4b443b3be8ccbc3aac3ec44960a87ee51 (diff)
Fix race condition for building stdlib headers (#5272)
Fixes https://github.com/shader-slang/slang/issues/5270
Diffstat (limited to 'source')
-rw-r--r--source/slang-stdlib/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang-stdlib/CMakeLists.txt b/source/slang-stdlib/CMakeLists.txt
index eca23859a..6303bc1b9 100644
--- a/source/slang-stdlib/CMakeLists.txt
+++ b/source/slang-stdlib/CMakeLists.txt
@@ -87,6 +87,8 @@ add_custom_command(
VERBATIM
)
+add_custom_target(generate_stdlib_headers DEPENDS ${stdlib_meta_generated_headers})
+
#
# Generate embedded stdlib source
#
@@ -106,6 +108,7 @@ set(stdlib_source_common_args
EXPLICIT_SOURCE
./slang-embedded-stdlib-source.cpp
${stdlib_meta_generated_headers}
+ REQUIRES generate_stdlib_headers
EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_STDLIB_SOURCE
INCLUDE_DIRECTORIES_PRIVATE
${stdlib_meta_output_dir}