forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkTestStreamsLibrary.cmake
68 lines (67 loc) · 3.63 KB
/
vtkTestStreamsLibrary.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Check the severity of EOF bugs in the streams library.
SET(VTK_TEST_STREAM_EOF_CXX ${VTK_CMAKE_DIR}/vtkTestStreamEOF.cxx.in)
CONFIGURE_FILE(${VTK_CMAKE_DIR}/vtkTestStreamEOF.cxx.in
${VTK_BINARY_DIR}/CMake/vtkTestStreamEOF.cxx @ONLY IMMEDIATE)
IF("VTK_ANSI_STREAM_EOF_RESULT" MATCHES "^VTK_ANSI_STREAM_EOF_RESULT$")
MESSAGE(STATUS "Checking ANSI streams end-of-file bug level")
TRY_RUN(VTK_ANSI_STREAM_EOF_RESULT VTK_ANSI_STREAM_EOF_COMPILED
${VTK_BINARY_DIR}/CMakeTmp
${VTK_BINARY_DIR}/CMake/vtkTestStreamEOF.cxx)
IF(VTK_ANSI_STREAM_EOF_COMPILED)
MESSAGE(STATUS "Checking ANSI streams end-of-file bug level - ${VTK_ANSI_STREAM_EOF_RESULT}")
ELSE(VTK_ANSI_STREAM_EOF_COMPILED)
SET(VTK_ANSI_STREAM_EOF_RESULT 0)
MESSAGE(STATUS "Checking ANSI streams end-of-file bug level - failed to compile test")
ENDIF(VTK_ANSI_STREAM_EOF_COMPILED)
ENDIF("VTK_ANSI_STREAM_EOF_RESULT" MATCHES "^VTK_ANSI_STREAM_EOF_RESULT$")
SET(VTK_STREAM_EOF_SEVERITY ${VTK_ANSI_STREAM_EOF_RESULT})
IF(VTK_SIZEOF_LONG_LONG)
CONFIGURE_FILE(${VTK_CMAKE_DIR}/vtkTestStreamLongLong.cxx.in
${VTK_BINARY_DIR}/CMake/vtkTestStreamLongLong.cxx @ONLY IMMEDIATE)
IF("VTK_OSTREAM_SUPPORTS_LONG_LONG" MATCHES "^VTK_OSTREAM_SUPPORTS_LONG_LONG$")
MESSAGE(STATUS "Checking if ostream supports long long")
TRY_COMPILE(VTK_OSTREAM_SUPPORTS_LONG_LONG
${VTK_BINARY_DIR}
${VTK_BINARY_DIR}/CMake/vtkTestStreamLongLong.cxx
COMPILE_DEFINITIONS -DVTK_TEST_OSTREAM_LONG_LONG
OUTPUT_VARIABLE OUTPUT)
IF(VTK_OSTREAM_SUPPORTS_LONG_LONG)
MESSAGE(STATUS "Checking if ostream supports long long -- yes")
SET(VTK_OSTREAM_SUPPORTS_LONG_LONG 1 CACHE INTERNAL "Whether ostream supports long long")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining if ostream supports long long "
"passed with the following output:\n"
"${OUTPUT}\n")
ELSE(VTK_OSTREAM_SUPPORTS_LONG_LONG)
MESSAGE(STATUS "Checking if ostream supports long long -- no")
SET(VTK_OSTREAM_SUPPORTS_LONG_LONG 0 CACHE INTERNAL "Whether ostream supports long long")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Determining if ostream supports long long "
"failed with the following output:\n"
"${OUTPUT}\n")
ENDIF(VTK_OSTREAM_SUPPORTS_LONG_LONG)
ENDIF("VTK_OSTREAM_SUPPORTS_LONG_LONG" MATCHES "^VTK_OSTREAM_SUPPORTS_LONG_LONG$")
IF("VTK_ISTREAM_SUPPORTS_LONG_LONG" MATCHES "^VTK_ISTREAM_SUPPORTS_LONG_LONG$")
MESSAGE(STATUS "Checking if istream supports long long")
TRY_COMPILE(VTK_ISTREAM_SUPPORTS_LONG_LONG
${VTK_BINARY_DIR}
${VTK_BINARY_DIR}/CMake/vtkTestStreamLongLong.cxx
COMPILE_DEFINITIONS -DVTK_TEST_ISTREAM_LONG_LONG
OUTPUT_VARIABLE OUTPUT)
IF(VTK_ISTREAM_SUPPORTS_LONG_LONG)
MESSAGE(STATUS "Checking if istream supports long long -- yes")
SET(VTK_ISTREAM_SUPPORTS_LONG_LONG 1 CACHE INTERNAL "Whether istream supports long long")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining if istream supports long long "
"passed with the following output:\n"
"${OUTPUT}\n")
ELSE(VTK_ISTREAM_SUPPORTS_LONG_LONG)
MESSAGE(STATUS "Checking if istream supports long long -- no")
SET(VTK_ISTREAM_SUPPORTS_LONG_LONG 0 CACHE INTERNAL "Whether istream supports long long")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Determining if istream supports long long "
"failed with the following output:\n"
"${OUTPUT}\n")
ENDIF(VTK_ISTREAM_SUPPORTS_LONG_LONG)
ENDIF("VTK_ISTREAM_SUPPORTS_LONG_LONG" MATCHES "^VTK_ISTREAM_SUPPORTS_LONG_LONG$")
ENDIF(VTK_SIZEOF_LONG_LONG)