William Cheng eff3e6df53
[cpp-qt] Add option for download progress, add test (#19297)
* add option for download progress, add test

* add cmake file

* remove test

* update
2024-08-05 16:06:36 +08:00

32 lines
737 B
CMake

cmake_minimum_required(VERSION 3.2)
project(cpp-qt-petstore)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Network Gui Test)
if(MSVC)
add_compile_options(/W4 /WX)
else()
add_compile_options(-Wall -Wextra -Werror)
endif()
add_subdirectory(client)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)
add_executable(cpp-qt-petstore
PetStore/main.cpp
PetStore/PetApiTests.cpp
PetStore/StoreApiTests.cpp
PetStore/UserApiTests.cpp
)
target_link_libraries(cpp-qt-petstore PRIVATE CppQtPetstoreClient Qt${QT_VERSION_MAJOR}::Test)
enable_testing()
add_test(NAME cpp-qt-petstore-test COMMAND cpp-qt-petstore)