Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Fix race condition in CMake code.#1555

Merged
1uc merged 1 commit into
masterfrom
1uc/fix-cmake-race
Nov 7, 2024
Merged

Fix race condition in CMake code.#1555
1uc merged 1 commit into
masterfrom
1uc/fix-cmake-race

Conversation

@1uc

@1uc 1uc commented Nov 7, 2024

Copy link
Copy Markdown
Collaborator

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

1uc commented Nov 7, 2024

Copy link
Copy Markdown
Collaborator Author

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
@1uc 1uc deleted the 1uc/fix-cmake-race branch November 7, 2024 09:37
JCGoran pushed a commit to neuronsimulator/nrn that referenced this pull request Mar 12, 2025
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`.

NMODL Repo SHA: BlueBrain/nmodl@1f0c5c1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants