Detect <codecvt> header automatically

This commit is contained in:
Tsuda kageyu
2013-04-18 00:32:14 +09:00
parent 266e8f5ae4
commit 1370a1cc83
3 changed files with 21 additions and 11 deletions

View File

@ -14,6 +14,13 @@ else()
set(HAVE_ZLIB 0)
endif()
# Determine whether your compiler supports codecvt header.
check_cxx_source_compiles("
#include <codecvt>
int main() { std::codecvt_utf8_utf16<wchar_t> x; return 0; }
" HAVE_CODECVT)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
find_package(CppUnit)
if(NOT CppUnit_FOUND AND BUILD_TESTS)