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.
When the required Boost components are unavailable,
make rebuildreports success even thoughbuild/test/c/Testwas not generated. The failure is only reported later bymake test-all:Before this change
The old
test/c/test.shexplicitly ran:If Boost was unavailable and the
Testtarget was not created,make Testfailed immediately.After this change
test/c/CMakeLists.txtdoes not mark Boost asREQUIREDand only createsTestwhenBoost_FOUNDis true.The new
build.shruns the defaultmaketarget. It can succeed without buildingTestand then records the build as completed.Later,
test/c/test.shtrusts the build stamp and attempts to execute the missing binary.Expected behavior
make rebuildshould fail with a clear error if the required C test binary cannot be built. For example:REQUIRED; orTesttarget and verify thatbuild/test/c/Testexists before marking the build successful.