LYX_OPTION(ENABLE_URLTESTS "Enable for URL tests" OFF ALL)
LYX_OPTION(ENABLE_EXPORT_TESTS "Enable for export tests" OFF ALL)
LYX_OPTION(ENABLE_KEYTESTS "Enable for keytests" OFF ALL)
+if (NOT CMAKE_VERSION VERSION_LESS "3.17")
+LYX_OPTION(ENABLE_VALGRIND_TESTS "Enable for tests involving valgrind" OFF ALL)
+else()
+unset(LYX_ENABLE_VALGRIND_TESTS CACHE)
+endif()
LYX_OPTION(ASAN "Use address sanitizer" OFF ALL)
#LYX_COMBO(USE_FILEDIALOG "Use native or QT file dialog" QT NATIVE)
LYX_COMBO(USE_QT "Use Qt version as frontend" AUTO QT4 QT5)
#LYX_OPTION(3RDPARTY_BUILD "Build 3rdparty libs" OFF ALL)
LYX_OPTION(DISABLE_CALLSTACK_PRINTING "do not print a callstack when crashing" OFF ALL)
LYX_OPTION(EXTERNAL_Z "OFF := Build 3rdparty lib zlib" ON ALL)
+LYX_OPTION(EXTERNAL_DTL "OFF := Build 3rdparty commands dt2dv and dv2dt" ON ALL)
LYX_OPTION(EXTERNAL_ICONV "OFF := Build 3rdparty lib iconvlib" ON ALL)
LYX_OPTION(EXTERNAL_HUNSPELL "OFF := Build 3rdparty lib hunspelllib" ON ALL)
LYX_COMBO(EXTERNAL_MYTHES "OFF := Build 3rdparty lib mytheslib" AUTO OFF ON)
endif()
# Check option dependencies
+if (LYX_ENABLE_VALGRIND_TESTS)
+ find_program(VALGRIND_EXECUTABLE "valgrind")
+ if (NOT VALGRIND_EXECUTABLE)
+ message(FATAL_ERROR "Cannot use valgrind tests, executable valgrind is missing. Please disable LYX_ENABLE_VALGRIND_TESTS")
+ endif()
+endif()
if(LYX_DMG)
set(LYX_BUNDLE ON)
add_subdirectory(3rdparty/zlib)
endif()
+if(NOT LYX_EXTERNAL_DTL)
+ add_subdirectory(3rdparty/dtl)
+endif()
+
if(LYX_USE_STD_REGEX)
# Set only include path.
# Use internal boost, which is known to exist