added a option for divert socket to CMakeLists.txt