Fix issues in CMakeList and add test for basket option