Merge pull request #150 from itay-grudev/cmake-flags

Use more stricter Qt compile definitions
This commit is contained in:
Itay Grudev 2022-04-03 22:19:32 +03:00 committed by GitHub
commit 73c5b9a330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.7.0)
cmake_minimum_required(VERSION 3.12.0)
project(SingleApplication LANGUAGES CXX)
@ -38,3 +38,13 @@ endif()
target_compile_definitions(${PROJECT_NAME} PUBLIC QAPPLICATION_CLASS=${QAPPLICATION_CLASS})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(${PROJECT_NAME} PRIVATE
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_ASCII
QT_NO_URL_CAST_FROM_STRING
QT_NO_CAST_FROM_BYTEARRAY
QT_USE_QSTRINGBUILDER
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
QT_NO_KEYWORDS
QT_NO_FOREACH
)