1.modified the cmakefiles for installation. 2. add test cases for common files.