fixed the compile error in gcc. update the CMakeLists.txt