Warning, /utilities/filelight/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
0002     message(FATAL_ERROR "Building tests in-source is not supported, please use a separate build dir or -DBUILD_TESTING=OFF.")
0003 endif()
0004 
0005 include(ECMAddTests)
0006 
0007 find_package(Qt6Test ${QT_MIN_VERSION} REQUIRED Test)
0008 
0009 add_subdirectory(core)
0010 
0011 # Synthesize links. On some windowses the git install is set to not support symlinks (plus it may not be able to
0012 # create them). Instead synthesize the links at configure time and configure the test accordingly.
0013 file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/iterator-tree.in ${CMAKE_CURRENT_BINARY_DIR}/iterator-tree)
0014 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/iterator-tree.in DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
0015 file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/iterator-tree.in ${CMAKE_CURRENT_BINARY_DIR}/iterator-tree)
0016 set(ITERATOR_TREE_WITH_SYMLINK ON)
0017 file(CREATE_LINK ${CMAKE_CURRENT_BINARY_DIR}/iterator-tree/bar ${CMAKE_CURRENT_BINARY_DIR}/iterator-tree/symlink RESULT ITERATOR_TREE_WITH_SYMLINK SYMBOLIC)
0018 set(ITERATOR_TREE_WITH_LINK ON)
0019 file(CREATE_LINK ${CMAKE_CURRENT_BINARY_DIR}/iterator-tree/bar ${CMAKE_CURRENT_BINARY_DIR}/iterator-tree/link RESULT ITERATOR_TREE_WITH_LINK)
0020 configure_file(test-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/test-config.h)
0021 
0022 ecm_add_test(directoryIteratorTest.cpp TEST_NAME directoryIteratorTest LINK_LIBRARIES Qt::Test filelightInternal)
0023 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
0024     # Fails on freebsd for unknown reasons -> only run it on linux.
0025     ecm_add_test(localListerTest.cpp TEST_NAME localListerTest LINK_LIBRARIES Qt::Test filelightInternal)
0026 endif()
0027 ecm_add_test(scanManagerTest.cpp TEST_NAME scanManagerTest LINK_LIBRARIES Qt::Test filelightInternal)