BUG: Do not provide HAVE_UNICODE_WCHAR option if wchar.h is not available.
This commit is contained in:
parent
eebd1fb2dc
commit
6187081358
|
@ -5,9 +5,6 @@ INCLUDE_REGULAR_EXPRESSION("^.*$")
|
|||
# Include all the necessary files for macros
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
|
||||
|
||||
OPTION(HAVE_UNICODE_WCHAR "Enable Unicode Support" YES)
|
||||
MARK_AS_ADVANCED(HAVE_UNICODE_WCHAR)
|
||||
|
||||
# Check if header file exists and add it to the list.
|
||||
SET(CURRENT_INCLUDES)
|
||||
INCLUDE (CheckIncludeFiles)
|
||||
|
@ -24,6 +21,13 @@ CHECK_INCLUDE_FILE_CONCAT("sys/filio.h" HAVE_SYS_FILIO_H)
|
|||
CHECK_INCLUDE_FILE_CONCAT("sys/ioctl.h" HAVE_SYS_IOCTL_H)
|
||||
CHECK_INCLUDE_FILE_CONCAT("wchar.h" HAVE_WCHAR_H)
|
||||
|
||||
IF(HAVE_WCHAR_H)
|
||||
OPTION(HAVE_UNICODE_WCHAR "Enable Unicode Support" YES)
|
||||
MARK_AS_ADVANCED(HAVE_UNICODE_WCHAR)
|
||||
ELSE(HAVE_WCHAR_H)
|
||||
SET(HAVE_UNICODE_WCHAR 0)
|
||||
ENDIF(HAVE_WCHAR_H)
|
||||
|
||||
INCLUDE (CheckSymbolExists)
|
||||
CHECK_SYMBOL_EXISTS(asprintf "${CURRENT_INCLUDES}" HAVE_ASPRINTF)
|
||||
CHECK_SYMBOL_EXISTS(setgroups "${CURRENT_INCLUDES}" HAVE_SETGROUPS)
|
||||
|
|
Loading…
Reference in New Issue