Removed duplicated codes from CMakeLists.txt.