aboutsummaryrefslogtreecommitdiff
path: root/quotest/CMakeLists.txt
diff options
context:
space:
mode:
authorarawaaa <77910862+arawaaa@users.noreply.github.com>2021-12-27 17:35:28 -0600
committerGitHub <noreply@github.com>2021-12-27 17:35:28 -0600
commit7ec3ba834dd313c4408622da30e04cdc6f4cf7c7 (patch)
tree679d7dc5939a229ad46676cd1d7aeaea7a25abce /quotest/CMakeLists.txt
parent17bf4d180297c7e87363e179b8afa79ddb15dca7 (diff)
parent674e984e459375974f619d0e778d43a2cc928dc3 (diff)
downloadlibquotient-7ec3ba834dd313c4408622da30e04cdc6f4cf7c7.tar.gz
libquotient-7ec3ba834dd313c4408622da30e04cdc6f4cf7c7.zip
Merge branch 'dev' into pinned
Diffstat (limited to 'quotest/CMakeLists.txt')
-rw-r--r--quotest/CMakeLists.txt20
1 files changed, 18 insertions, 2 deletions
diff --git a/quotest/CMakeLists.txt b/quotest/CMakeLists.txt
index 29c53fae..cb41141d 100644
--- a/quotest/CMakeLists.txt
+++ b/quotest/CMakeLists.txt
@@ -4,10 +4,26 @@
set(quotest_SRCS quotest.cpp)
+find_package(${Qt} COMPONENTS Concurrent)
add_executable(quotest ${quotest_SRCS})
-target_link_libraries(quotest PRIVATE Qt5::Core Qt5::Test ${PROJECT_NAME})
+target_link_libraries(quotest PRIVATE ${Qt}::Core ${Qt}::Test ${Qt}::Concurrent ${PROJECT_NAME})
-option(${PROJECT_NAME}_INSTALL_TESTS "install quotest (former qmc-example) application" ON)
+if (MSVC)
+ target_compile_options(quotest PUBLIC /EHsc /W4
+ /wd4100 /wd4127 /wd4242 /wd4244 /wd4245 /wd4267 /wd4365 /wd4456 /wd4459
+ /wd4464 /wd4505 /wd4514 /wd4571 /wd4619 /wd4623 /wd4625 /wd4626 /wd4706
+ /wd4710 /wd4774 /wd4820 /wd4946 /wd5026 /wd5027)
+else()
+ foreach (FLAG W Wall Wpedantic Wextra Wno-unused-parameter Werror=return-type)
+ CHECK_CXX_COMPILER_FLAG("-${FLAG}" COMPILER_${FLAG}_SUPPORTED)
+ if (COMPILER_${FLAG}_SUPPORTED AND
+ NOT CMAKE_CXX_FLAGS MATCHES "(^| )-?${FLAG}($| )")
+ target_compile_options(quotest PUBLIC -${FLAG})
+ endif ()
+ endforeach ()
+endif()
+
+option(${PROJECT_NAME}_INSTALL_TESTS "install quotest application" ON)
add_feature_info(InstallQuotest ${PROJECT_NAME}_INSTALL_TESTS
"the library functional test suite")