[cmake] Make tests with EXPECT_COMPILE_FAIL work with ninja
ninja can only be called from the root builddirectory, and make can also be called from there, so just set the working directory to the project root.
ninja can only be called from the root builddirectory, and make can also be called from there, so just set the working directory to the project root.