summaryrefslogtreecommitdiff
path: root/source/slang-core-module
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2025-03-14 10:38:19 +0800
committerGitHub <noreply@github.com>2025-03-13 19:38:19 -0700
commit3431640427e8fa6f81a0b267a6c6cdd9bec38516 (patch)
treec96c9f88e1f4ad75b4faed3d4b569bc8bb51de09 /source/slang-core-module
parent1e20eed6e8749ed09639ef9d788900edbab0ff83 (diff)
Use an explicit dependency for generated headers instead of source file dependency (#6594)
* Simplify text writing for core module headers * Use an explicit dependency for generated headers instead of source file dependency From the CMake Docs > Do not list the output in more than one independent target that may build in parallel or the instances of the rule may conflict. Instead, use the add_custom_target() command to drive the command and make the other targets depend on that one. See the Example: Generating Files for Multiple Targets below. --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang-core-module')
-rw-r--r--source/slang-core-module/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang-core-module/CMakeLists.txt b/source/slang-core-module/CMakeLists.txt
index 67b0e9af2..50b45c90c 100644
--- a/source/slang-core-module/CMakeLists.txt
+++ b/source/slang-core-module/CMakeLists.txt
@@ -152,7 +152,7 @@ set(core_module_common_args
slang_add_target(
${core_module_common_args}
TARGET_NAME slang-embedded-core-module
- EXPLICIT_SOURCE ${core_module_generated_header}
+ REQUIRES generate_core_module_headers
EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_CORE_MODULE
INCLUDE_DIRECTORIES_PRIVATE ${core_module_generated_header_dir}
)