Skip to content

Conversation

@wenju-he
Copy link
Contributor

Commit 0c21d6b fixed sequential build of libclc on Windows by adding a target for each compile command.
This PR conditionally enables DEPENDS_EXPLICIT_ONLY and requires at least cmake version 3.27. DEPENDS_EXPLICIT_ONLY avoids adding too many targets.

Commit 0c21d6b fixed sequential build of libclc on Windows by
adding a target for each compile command.
This PR conditionally enables DEPENDS_EXPLICIT_ONLY and requires at
least cmake version 3.27. DEPENDS_EXPLICIT_ONLY avoids adding too
many targets.
@wenju-he wenju-he requested a review from frasercrmck August 18, 2025 09:29
@llvmbot llvmbot added the libclc libclc OpenCL library label Aug 18, 2025
@wenju-he
Copy link
Contributor Author

wenju-he commented Aug 18, 2025

sorry, DEPENDS_EXPLICIT_ONLY only works for Ninja generator, see https://cmake.org/cmake/help/latest/command/add_custom_command.html#command:add_custom_command
The main issue of sequential compilation we was is related to MSVC generator.
So the comments at

# FIXME: The target is added to ensure the parallel build of source files.
# However, this may result in a large number of targets.
# Starting with CMake 3.27, DEPENDS_EXPLICIT_ONLY can be used with
# add_custom_command to enable parallel build.
# Refer to https://gitlab.kitware.com/cmake/cmake/-/issues/17097 for details.
is probably unrelated to the issue that 0c21d6b addressed.
Close this PR. I'll fix the comment in another PR.

@wenju-he wenju-he closed this Aug 18, 2025
@wenju-he wenju-he deleted the libclc-enable-DEPENDS_EXPLICIT_ONLY-for-cmake-3.27 branch August 18, 2025 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libclc libclc OpenCL library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants