Fixed a problem that compile error occurs in cmake.

Fixed a problem that compile error occurs in cmake.