summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-04-19 13:52:00 (GMT)
committerBrad King <brad.king@kitware.com>2005-04-19 13:52:00 (GMT)
commit6187081358505b340dd7db8561b26f4cc860cd90 (patch)
treef1e644c9d674feb80312fb3357acd6c23b2eb5c3
parenteebd1fb2dcaaddbadbf1b949e00265bb791c9537 (diff)
downloadCMake-6187081358505b340dd7db8561b26f4cc860cd90.zip
CMake-6187081358505b340dd7db8561b26f4cc860cd90.tar.gz
CMake-6187081358505b340dd7db8561b26f4cc860cd90.tar.bz2
BUG: Do not provide HAVE_UNICODE_WCHAR option if wchar.h is not available.
-rw-r--r--Utilities/cmxmlrpc/CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/Utilities/cmxmlrpc/CMakeLists.txt b/Utilities/cmxmlrpc/CMakeLists.txt
index 4aa2ca3..8a03e8f 100644
--- a/Utilities/cmxmlrpc/CMakeLists.txt
+++ b/Utilities/cmxmlrpc/CMakeLists.txt
@@ -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)