Fix CMake Unix Makefiles parallel build race for conflict-set.o #52

Merged
andrew merged 1 commits from weaselbot/conflict-set:weaselbot/issue-47 into main 2026-06-22 19:08:10 +00:00
Member

Closes #47

Closes #47
andrew force-pushed weaselbot/issue-47 from 7d6fc39ce1 to 8352868ff0 2026-06-21 23:28:55 +00:00 Compare
weaselbot force-pushed weaselbot/issue-47 from cf80b86f9c to a2b3455930 2026-06-22 06:50:29 +00:00 Compare
andrew added 1 commit 2026-06-22 18:09:08 +00:00
CMake: add target-level dependencies for conflict-set-object
CI / release (arm64, ubuntu-latest-arm64) (pull_request) Successful in 3m25s
CI / pre-commit (pull_request) Successful in 2m5s
CI / test (-DCMAKE_BUILD_TYPE=Debug, debug) (pull_request) Successful in 3m36s
CI / test (-DCMAKE_CXX_FLAGS=-DUSE_64_BIT=1, 64-bit-versions) (pull_request) Successful in 3m28s
CI / test (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc) (pull_request) Successful in 3m35s
CI / test (-DUSE_SIMD_FALLBACK=ON, simd-fallback) (pull_request) Successful in 3m28s
CI / release (amd64, ubuntu-latest-amd64) (pull_request) Successful in 4m51s
CI / coverage (pull_request) Successful in 3m36s
4515af3662
The custom command that links conflict-set.o depends on
$<TARGET_OBJECTS:conflict-set-object>, but that generator expression
does not create a target-level dependency.  With the Unix Makefiles
generator, parallel builds can start building the consuming libraries
before the object library's build rule is available, producing:

  gmake[3]: *** No rule to make target
  'CMakeFiles/conflict-set-object.dir/ConflictSet.cpp.o', needed by
  'conflict-set.o'.  Stop.

Add add_dependencies() so that conflict-set and conflict-set-static
cannot build until conflict-set-object has produced its object files.

Closes #47
andrew force-pushed weaselbot/issue-47 from a2b3455930 to 0021c6e4e7 2026-06-22 18:09:08 +00:00 Compare
andrew force-pushed weaselbot/issue-47 from 0021c6e4e7 to 4515af3662 2026-06-22 19:08:01 +00:00 Compare
andrew merged commit 52eb13cc0b into main 2026-06-22 19:08:10 +00:00
andrew deleted branch weaselbot/issue-47 2026-06-22 19:08:10 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weaselab/conflict-set#52