This repository contains a simple CMake project that demonstrates the behavior of POST_BUILD commands when using the FASTBuild generator.
- CMake
- FASTBuild
- Just
justjust build_engine=NinjaSuccessfully compiled and executes the POST_BUILD command, printing:
Post-build step executed.
Post-build step executed.
Post-build step executed.
When using the FASTBuild generator, the fbuild command fails with the following error:
CMake Error: Failed to run FASTBuild command:
'/usr/local/bin/fbuild' '-config' '/Users/objectx/Workspace/GitHub/cmake-fastbuild/0.B/FASTBuild/fbuild.bff' 'rebuild-bff' '-why'
Output:
/Users/objectx/Workspace/GitHub/cmake-fastbuild/0.B/FASTBuild/fbuild.bff(149,3): FASTBuild Error #1100 - Exec() - Target '/Users/objectx/Workspace/GitHub/cmake-fastbuild/0.B/FASTBuild/_fbuild_dummy/cc-bafa92b77bf103.fbuild-cc-out' already defined.
Exec('cc-bafa92b77bf103')
^
\--here
/Users/objectx/Workspace/GitHub/cmake-fastbuild/0.B/FASTBuild/fbuild.bff(140,3): FASTBuild Error #1100 - Previously declared here:
Exec('cc-bafa92b77bf103')
^
\--here
/Users/objectx/Workspace/GitHub/cmake-fastbuild/0.B/FASTBuild/fbuild.bff(149,3): FASTBuild Error #1100 - Exec() - Target '/Users/objectx/Workspace/GitHub/cmake-fastbuild/0.B/FASTBuild/_fbuild_dummy/cc-bafa92b77bf103.fbuild-cc-out' already defined.
Exec('cc-bafa92b77bf103')
^
\--here
/Users/objectx/Workspace/GitHub/cmake-fastbuild/0.B/FASTBuild/fbuild.bff(140,3): FASTBuild Error #1100 - Previously declared here:
Exec('cc-bafa92b77bf103')
^
\--here
When using the Ninja generator, the build completes successfully and the POST_BUILD commands are executed as expected.