Skip to content

make rebuild succeeds even when the C test binary is not built #2

Description

@qzhodl

When the required Boost components are unavailable, make rebuild reports success even though build/test/c/Test was not generated. The failure is only reported later by make test-all:

build/test/c/Test: No such file or directory

Before this change

The old test/c/test.sh explicitly ran:

cmake ../../..
make Test
./test/c/Test

If Boost was unavailable and the Test target was not created, make Test failed immediately.

After this change

test/c/CMakeLists.txt does not mark Boost as REQUIRED and only creates Test when Boost_FOUND is true.

The new build.sh runs the default make target. It can succeed without building Test and then records the build as completed.

Later, test/c/test.sh trusts the build stamp and attempts to execute the missing binary.

Expected behavior

make rebuild should fail with a clear error if the required C test binary cannot be built. For example:

  • Make the required Boost components REQUIRED; or
  • Explicitly build the Test target and verify that build/test/c/Test exists before marking the build successful.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions