Skip to content

Commit

Permalink
Fix icu dependency
Browse files Browse the repository at this point in the history
Fix macos codeql workflow
Fix unsigned char convertion
  • Loading branch information
florianbecker committed Nov 14, 2024
1 parent d2d9d0a commit d2ebc1c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/macos-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
]
config: [Debug, Release]
include:
- name: macos-13-xcode-15-x86_64
- name: macos-13-xcode-14-x86_64
os: macos-13
compiler: xcode
version: "14.3"
architecture: x86_64

- name: macos-13-xcode-15-arm64
- name: macos-13-xcode-14-arm64
os: macos-13
compiler: xcode
version: "14.3"
Expand Down
10 changes: 5 additions & 5 deletions cmake/external/icu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ else()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(ICU_I18N_LIBRARY ${ICU_SRC}/src/ICU/lib${ICU_ARCH}/icuind.lib)
set(ICU_UC_LIBRARY ${ICU_SRC}/src/ICU/lib${ICU_ARCH}/icuucd.lib)
set(ICU_I18N_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuin72d.dll)
set(ICU_UC_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuuc72d.dll)
set(ICU_I18N_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuin76d.dll)
set(ICU_UC_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuuc76d.dll)
else()
set(ICU_I18N_LIBRARY ${ICU_SRC}/src/ICU/lib${ICU_ARCH}/icuin.lib)
set(ICU_UC_LIBRARY ${ICU_SRC}/src/ICU/lib${ICU_ARCH}/icuuc.lib)
set(ICU_I18N_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuin72.dll)
set(ICU_UC_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuuc72.dll)
set(ICU_I18N_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuin76.dll)
set(ICU_UC_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icuuc76.dll)
endif()
set(ICU_DATA_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icudt72.dll)
set(ICU_DATA_DLL ${ICU_SRC}/src/ICU/bin${ICU_ARCH}/icudt76.dll)
set(ICU_INCLUDE_DIR ${ICU_SRC}/src/ICU/include)
endif()

Expand Down
5 changes: 5 additions & 0 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ target_include_directories(${PROJECT_NAME}
${PROJECT_SOURCE_DIR}
)

target_compile_definitions(${PROJECT_NAME}
PRIVATE
$<$<BOOL:${HAVE_SPAN}>:HAVE_SPAN>
)

if(CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
set(${PROJECT_NAME}_LIBS -lc++fs)
endif()
Expand Down
5 changes: 5 additions & 0 deletions source/SqliteUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,12 @@ namespace vx::sqlite_utils {
return { SQLITE_IOERR, SqliteErrorCategory::instance() };
}

#ifdef HAVE_SPAN
const std::span spanDump( dump.get(), static_cast<std::size_t>( serializationSize ) );
std::vector<char> converted( std::begin( spanDump ), std::end( spanDump ) );
#else
std::vector<char> converted( dump.get(), dump.get() + serializationSize );
#endif
if ( converted.empty() ) {

SqliteErrorCategory::instance().setMessage( "Export not convertable." );
Expand Down

0 comments on commit d2ebc1c

Please sign in to comment.