summaryrefslogtreecommitdiffstats
path: root/Tests/FindTIFF/Test/main.cxx
diff options
context:
space:
mode:
authorJoachim Wuttke (h) <j.wuttke@fz-juelich.de>2020-06-23 09:50:54 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-29 15:55:22 (GMT)
commita468cc431cf910a95d839594a2916a25165023e1 (patch)
tree91a0c4b9e648135c2b1e60961a2b5a70b7ad139b /Tests/FindTIFF/Test/main.cxx
parent9692931f8376c47ea335c90f3544e281ddc4ca8d (diff)
downloadCMake-a468cc431cf910a95d839594a2916a25165023e1.zip
CMake-a468cc431cf910a95d839594a2916a25165023e1.tar.gz
CMake-a468cc431cf910a95d839594a2916a25165023e1.tar.bz2
FindTIFF: add component CXX to include the C++ wrapper libtiffxx
Fixes: #20860
Diffstat (limited to 'Tests/FindTIFF/Test/main.cxx')
-rw-r--r--Tests/FindTIFF/Test/main.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/FindTIFF/Test/main.cxx b/Tests/FindTIFF/Test/main.cxx
new file mode 100644
index 0000000..f80a31f
--- /dev/null
+++ b/Tests/FindTIFF/Test/main.cxx
@@ -0,0 +1,16 @@
+#include <fstream>
+
+#include <assert.h>
+#include <tiffio.hxx>
+
+int main()
+{
+ /* Without any TIFF file to open, test that the call fails as
+ expected. This tests that linking worked. */
+ TIFF* tiff = TIFFOpen("invalid.tiff", "r");
+ assert(!tiff);
+
+ std::ifstream s;
+ TIFF* tiffxx = TIFFStreamOpen("invalid.tiff", &s);
+ return 0;
+}