add set cache for apple cmake

Signed-off-by: xiehuc <xiehuc@gmail.com>