Return there's no current cmake build directory if there's none
Instead of just returning values for the first one.
(cherry picked from commit 128e900e381b1e41eb2eb80d3d96d7fe56779e91)