Fixed CMake argument omission causing build failure in Shader modules chapter#146
Merged
gpx1000 merged 2 commits intoKhronosGroup:mainfrom Aug 22, 2025
Merged
Conversation
gpx1000
approved these changes
Aug 21, 2025
SaschaWillems
approved these changes
Aug 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CMake documentation defines the version of
cmake_parse_arguments()used in theadd_slang_shader_target()function provided in this chapter with the following signature:The current usage of
cmake_parse_arguments()in this chapter produces a multiple definition warning and causes build failures due to${ARGN}being interpreted as the<multi_value_keywords>parameter.The proposed solution is to add an additional empty set of quotation marks before the "SOURCES" argument to properly pass the arguments to the
${SHADER_SOURCES}variable.This categorizes
${SHADER_SOURCES}as a multi value keyword. I do not know if${SHADER_SOURCES}was intended to be a multi or single value keyword, but I opted to select multi value keyword to be consistent with the plurality used throughout the chapter.This was tested using CMake version 3.29