diff options
author | Brad King <brad.king@kitware.com> | 2013-12-23 15:51:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-12-23 15:51:38 (GMT) |
commit | 2f7c1691580a08b53eef63411c93f59121d95397 (patch) | |
tree | 46caf591f24f050fb4951b995176e5af12e6f566 /Source/kwsys/testFStream.cxx | |
parent | e73d1ad003c50730a8141db757462574c0c2dddc (diff) | |
parent | d4efa5f81caf87a3ac170c5a4a1aa1fe78520f4d (diff) | |
download | CMake-2f7c1691580a08b53eef63411c93f59121d95397.zip CMake-2f7c1691580a08b53eef63411c93f59121d95397.tar.gz CMake-2f7c1691580a08b53eef63411c93f59121d95397.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/testFStream.cxx')
-rw-r--r-- | Source/kwsys/testFStream.cxx | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Source/kwsys/testFStream.cxx b/Source/kwsys/testFStream.cxx new file mode 100644 index 0000000..8942549 --- /dev/null +++ b/Source/kwsys/testFStream.cxx @@ -0,0 +1,48 @@ +/*============================================================================ + KWSys - Kitware System Library + Copyright 2000-2009 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#include "kwsysPrivate.h" + +#if defined(_MSC_VER) +# pragma warning (disable:4786) +#endif + +#include KWSYS_HEADER(FStream.hxx) + +// Work-around CMake dependency scanning limitation. This must +// duplicate the above list of headers. +#if 0 +# include "FStream.hxx.in" +#endif + + +//---------------------------------------------------------------------------- +static int testNoFile() +{ + kwsys::ifstream in_file("NoSuchFile.txt"); + if(in_file) + { + return 1; + } + + return 0; +} + + +//---------------------------------------------------------------------------- +int testFStream(int, char*[]) +{ + int ret = 0; + + ret |= testNoFile(); + + return ret; +} |