diff options
author | Brad King <brad.king@kitware.com> | 2009-08-31 17:00:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-08-31 17:00:55 (GMT) |
commit | 207aab6acf214e05572c772e19a53ad4bff151f0 (patch) | |
tree | ba878ff5f922f71223f849cf69fb9a8aee620370 /Source/kwsys/CMakeLists.txt | |
parent | 6d0b6f2b9e959be073a91d6040810b3057f2b1b1 (diff) | |
download | CMake-207aab6acf214e05572c772e19a53ad4bff151f0.zip CMake-207aab6acf214e05572c772e19a53ad4bff151f0.tar.gz CMake-207aab6acf214e05572c772e19a53ad4bff151f0.tar.bz2 |
Define kwsys_ios_binary macro for std::ios::binary
The 'binary' openmode does not exist on all compilers. We define macro
<kwsys>_ios_binary, where <kwsys> is the KWSys namespace, to refer to
std::ios::binary if it exists and 0 otherwise. Sample usage:
kwsys_ios::ifstream fin(fn, kwsys_ios::ios::in | kwsys_ios_binary);
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 00d301e..07d54ca 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -447,6 +447,11 @@ ELSE(KWSYS_IOS_USE_ANSI AND NOT WATCOM) KWSYS_PLATFORM_CXX_TEST(KWSYS_STL_STRING_HAVE_ISTREAM "Checking whether stl string has istream operator>>" DIRECT) ENDIF(KWSYS_IOS_USE_ANSI AND NOT WATCOM) +SET(KWSYS_PLATFORM_CXX_TEST_DEFINES + -DKWSYS_IOS_USE_ANSI=${KWSYS_IOS_USE_ANSI} + -DKWSYS_IOS_HAVE_STD=${KWSYS_IOS_HAVE_STD}) +KWSYS_PLATFORM_CXX_TEST(KWSYS_IOS_HAVE_BINARY + "Checking whether ios has binary openmode" DIRECT) SET(KWSYS_PLATFORM_CXX_TEST_DEFINES) KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS |