def execute( self, path ): if os.path.exists( os.path.join(path, "CMakeLists.txt") ): fileptr = file( os.path.join(path, "CMakeLists.txt"), 'r' ) for line in fileptr: if not line.lower().find('add_subdirectory') == -1: print "subdirectory: ", line else: return -1