Skip to content

Commit

Permalink
Merge branch 'main' into increase-warning-level
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyTinni committed Nov 7, 2024
2 parents 1e8bcfd + dcaf749 commit 41c3807
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
-DBUILD=TESTING=OFF
-DBUILD_SHELL=OFF
-DBUILD_EXTENSIONS="autocomplete"
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON

- name: Build Tests
run: cmake
Expand Down
22 changes: 11 additions & 11 deletions QtDuckDBDriver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ target_include_directories(QtSqlPrivate INTERFACE "${Qt${QT_VERSION}Sql_PRIVATE_
set_property(TARGET QtSqlPrivate PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Qt${QT_VERSION}Sql_PRIVATE_INCLUDE_DIRS}")

include(../cmake/get_cpm.cmake)
CPMAddPackage(
NAME DuckDB
"gh:duckdb/duckdb#v1.1.2"
OPTIONS "CMAKE_COMPILE_WARNING_AS_ERROR=OFF")
CPMAddPackage("gh:duckdb/duckdb#v1.1.3")

get_property(duckdb_include_dirs TARGET duckdb_static PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
set_property(TARGET duckdb_static PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${duckdb_include_dirs}")
Expand All @@ -27,13 +24,16 @@ set_property(TARGET QtDuckDBDriver PROPERTY AUTOMOC ON)
set_property(TARGET QtDuckDBDriver PROPERTY DEBUG_POSTFIX "d")
set_property(TARGET QtDuckDBDriver PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
set_property(TARGET QtDuckDBDriver PROPERTY INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE)

target_compile_options(QtDuckDBDriver PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
-Wall -Wextra -Wconversion -pedantic-errors
$<$<NOT:$<STREQUAL:"${QT_VERSION}","5">>:-Wsign-conversion>> # disables sign conversion for qt5 as qt6 is the future and they fixed a lot of data types there
$<$<CXX_COMPILER_ID:MSVC>:/W4>
)
set_property(TARGET QtDuckDBDriver PROPERTY COMPILE_WARNING_AS_ERROR ON)

# disables sign conversion for qt5 as qt6 is the future and they fixed a lot of data types there
if (NOT "${QT_VERSION}" STREQUAL "5")
target_compile_options(QtDuckDBDriver PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
-Wall -Wextra -Wconversion -pedantic-errors -Wsign-conversion
$<$<CXX_COMPILER_ID:MSVC>:/W4>
)
endif()


if (NOT WIN32) # seems like duckdb disabled sanitizer on windows build
Expand Down

0 comments on commit 41c3807

Please sign in to comment.