Error in pass registration

Hello guys,

I’m trying to register my custom pass by following the pass registration steps from llvm cookbook(Doing this on llvm 7)

Upon building it, I’m getting this error

make[2]: *** No rule to make target ‘lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/build’. Stop.
CMakeFiles/Makefile2:3134: recipe for target ‘lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/all’ failed
make[1]: *** [lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 44%] Built target LLVMInstCombine
[ 47%] Built target LLVMTransformUtils
[ 57%] Built target LLVMCodeGen
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2

Can anyone please explain how to solve this?