Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition in CMake code. #1555

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Fix race condition in CMake code. #1555

merged 1 commit into from
Nov 7, 2024

Conversation

1uc
Copy link
Collaborator

@1uc 1uc commented Nov 7, 2024

The race is cause by the fact that two targets exist to copy the Python files. The first one because of cpp_cc_build_time_copy without NO_TARGET. The second because of the:

add_custom_target(nmodl_copy_python_files ALL DEPENDS ...)

The solution is to not create the per file target by passing NO_TARGET to cpp_cc_build_time_copy.

The race is cause by the fact that two targets exist to copy the Python
files. The first one because of `cpp_cc_build_time_copy` with
`NO_TARGET`. The second because of the:

    add_custom_target(nmodl_copy_python_files ALL DEPENDS ...)

The solution is to not create the per file target by passing
`NO_TARGET` to `cpp_cc_build_time_copy`.
@1uc
Copy link
Collaborator Author

1uc commented Nov 7, 2024

I suspect this has been the cause for the very infrequent build failure I see when using --parallel.

@1uc 1uc marked this pull request as ready for review November 7, 2024 08:31
@1uc 1uc merged commit 1f0c5c1 into master Nov 7, 2024
12 checks passed
@1uc 1uc deleted the 1uc/fix-cmake-race branch November 7, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants