mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 10:22:58 -05:00
Migrate the build system to cmake
This commit is contained in:
4
tests/CMakeLists.txt
Normal file
4
tests/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
# YACReader tests
|
||||
|
||||
add_subdirectory(concurrent_queue_test)
|
||||
add_subdirectory(compressed_archive_test)
|
||||
13
tests/compressed_archive_test/CMakeLists.txt
Normal file
13
tests/compressed_archive_test/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Compressed archive test
|
||||
|
||||
qt_add_executable(compressed_archive_test
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(compressed_archive_test PRIVATE
|
||||
Qt::Core
|
||||
cbx_backend
|
||||
)
|
||||
if(WIN32)
|
||||
target_link_libraries(compressed_archive_test PRIVATE oleaut32 ole32)
|
||||
endif()
|
||||
add_test(NAME compressed_archive_test COMMAND compressed_archive_test)
|
||||
@ -1,26 +0,0 @@
|
||||
TEMPLATE = app
|
||||
CONFIG += console
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
|
||||
QT += core
|
||||
|
||||
win32 {
|
||||
LIBS += -loleaut32 -lole32
|
||||
msvc {
|
||||
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT
|
||||
QMAKE_LFLAGS_RELEASE += /LTCG
|
||||
}
|
||||
CONFIG -= embed_manifest_exe
|
||||
}
|
||||
|
||||
CONFIG(7zip) {
|
||||
include(../../compressed_archive/wrapper.pri)
|
||||
} else:CONFIG(unarr) {
|
||||
include(../../compressed_archive/unarr/unarr-wrapper.pri)
|
||||
} else:CONFIG(libarchive) {
|
||||
include(../../compressed_archive/libarchive/libarchive-wrapper.pri)
|
||||
} else {
|
||||
include(../../compressed_archive/wrapper.pri)
|
||||
}
|
||||
12
tests/concurrent_queue_test/CMakeLists.txt
Normal file
12
tests/concurrent_queue_test/CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
||||
# Concurrent queue test
|
||||
|
||||
qt_add_executable(concurrent_queue_test
|
||||
concurrent_queue_test.cpp
|
||||
)
|
||||
target_link_libraries(concurrent_queue_test PRIVATE
|
||||
Qt::Core
|
||||
Qt::Test
|
||||
concurrent_queue
|
||||
)
|
||||
add_test(NAME concurrent_queue_test
|
||||
COMMAND concurrent_queue_test -maxwarnings 100000)
|
||||
@ -1,9 +0,0 @@
|
||||
include(../qt_test.pri)
|
||||
|
||||
PATH_TO_common = ../../common
|
||||
|
||||
INCLUDEPATH += $$PATH_TO_common
|
||||
HEADERS += $${PATH_TO_common}/concurrent_queue.h
|
||||
SOURCES += \
|
||||
$${PATH_TO_common}/concurrent_queue.cpp \
|
||||
concurrent_queue_test.cpp
|
||||
@ -1,9 +0,0 @@
|
||||
QT += testlib
|
||||
QT -= gui
|
||||
|
||||
CONFIG += qt console warn_on testcase no_testcase_installs
|
||||
CONFIG -= app_bundle
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
include(../config.pri)
|
||||
@ -1,2 +0,0 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS += concurrent_queue_test
|
||||
Reference in New Issue
Block a user