Skip to content

Commit 05f5632

Browse files
committed
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.
1 parent 9e4da6e commit 05f5632

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/slang-core-module/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ set(core_module_common_args
152152
slang_add_target(
153153
${core_module_common_args}
154154
TARGET_NAME slang-embedded-core-module
155-
EXPLICIT_SOURCE ${core_module_generated_header}
155+
REQUIRES generate_core_module_headers
156156
EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_CORE_MODULE
157157
INCLUDE_DIRECTORIES_PRIVATE ${core_module_generated_header_dir}
158158
)

0 commit comments

Comments
 (0)