Skip to content

Commit b39878e

Browse files
committed
Merge branch 'bigendian-testsuite-workaround'
2 parents 3d4a313 + 8353731 commit b39878e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ option(UseQtFive "Build with Qt5 and libpoppler-qt5" ON)
3636
option(UpdateTranslations "Do you want to update the .ts files (WARNING: running make clean will delete them!)" OFF)
3737
option(BuildTests "Build unit tests (this requires pdflatex or internet access and DownloadTestPDFs=ON)" ON)
3838
option(RunDualScreenTests "Also run tests that require two screens to be connected" ON)
39+
option(RunTestsOnBigEndian "Run tests on a big-endian system" OFF)
3940
option(BoostStaticLink "Link statically against the boost libraries" OFF)
4041
option(WindowsStaticLink "Windows/MSVC only: Link statically against the dependencies and set /MT instead of /MD" ON)
4142
option(UsePrerenderedPDF "Use prerendered PDFs included in the source for testing, instead of building with pdflatex" OFF)
@@ -75,8 +76,17 @@ if(BuildTests)
7576
# Set a default timeout to 60 seconds
7677
set(DART_TESTING_TIMEOUT 60)
7778
set(CTEST_TEST_TIMEOUT 60)
78-
include(CTest)
79-
add_subdirectory(testing)
79+
# Check for big endian
80+
include(TestBigEndian)
81+
TEST_BIG_ENDIAN(BigEndian)
82+
if( NOT BigEndian OR RunTestsOnBigEndian)
83+
include(CTest)
84+
add_subdirectory(testing)
85+
else()
86+
message(WARNING "The unit tests have been temporarily disabled on big-endian "
87+
"systems. If you want to help in debugging this, please pass "
88+
"-DRunTestsOnBigEndian=ON to cmake to force their execution.")
89+
endif()
8090
endif()
8191

8292
#### Installation

0 commit comments

Comments
 (0)