Due to the latest version of CMAKE CLI behavior had changed, so we need to refactor our spec accordlly. (cherry picked from commit 1afe08ed62f672fea75b0319a11e9b10a60867d8)