Skip to content

Commit

Permalink
FMT experiment [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
XanthosXanthopoulos committed Jan 8, 2025
1 parent 5eac48e commit a8dd214
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/python-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
with:
xcode-version: '15.4'
- name: Build wheels
uses: pypa/cibuildwheel@v2.18.1
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: tiledbsoma.tar.gz
only: cp${{ matrix.python-version }}-${{ matrix.cibw_build }}
Expand All @@ -112,7 +112,8 @@ jobs:
CIBW_ENVIRONMENT_LINUX : CC=/opt/rh/gcc-toolset-13/root/usr/bin/gcc CXX=/opt/rh/gcc-toolset-13/root/usr/bin/g++
CIBW_TEST_SKIP: "*_arm64"
CMAKE_OSX_ARCHITECTURES: ${{ matrix.cibw_archs_macos }}
MACOSX_DEPLOYMENT_TARGET: "13.3"
MACOSX_DEPLOYMENT_TARGET: "11.0"

- name: Upload wheel-${{ matrix.wheel-name }}-${{ matrix.python-version }} to GitHub Actions storage
uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion apis/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ def run(self):
CXX_FLAGS.append(f'-Wl,-rpath,{str(tiledb_dir / "lib")}')

if sys.platform == "darwin":
CXX_FLAGS.append("-mmacosx-version-min=13.3")
CXX_FLAGS.append("-D_LIBCPP_DISABLE_AVAILABILITY")
CXX_FLAGS.append("-mmacosx-version-min=11.0")

if os.name == "posix" and sys.platform != "darwin":
LIB_DIRS.append(str(tiledbsoma_dir / "lib" / "x86_64-linux-gnu"))
Expand Down
2 changes: 1 addition & 1 deletion apis/r/configure
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ tools/build_libtiledbsoma.sh
pkgincl="-I../inst/tiledb/include -I../inst/tiledbsoma/include -I../inst/tiledbsoma/include/tiledbsoma"
pkglibs="-ltiledb -L../inst/tiledb/lib -ltiledbsoma -L../inst/tiledbsoma/lib"
rpath="-Wl,-rpath,'\$\$ORIGIN/../tiledb/lib' -Wl,-rpath,'\$\$ORIGIN/../tiledbsoma/lib'"
macosver=`${R_HOME}/bin/Rscript -e 'if (Sys.info()["sysname"] == "Darwin") cat("-mmacosx-version-min=13.3") else cat("")'`
macosver=`${R_HOME}/bin/Rscript -e 'if (Sys.info()["sysname"] == "Darwin") cat("-mmacosx-version-min=11.0") else cat("")'`

sed -e "s|@tiledb_include@|$pkgincl |" \
-e "s|@tiledb_libs@|$pkglibs|" \
Expand Down
2 changes: 1 addition & 1 deletion apis/r/src/Makevars.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CXX_STD = CXX20

## We need the TileDB Headers, and for macOS aka Darwin need to set minimum version 13.3 for macOS
PKG_CPPFLAGS = -I. -I../inst/include/ @tiledb_include@ @cxx20_macos@ -D SPDLOG_USE_STD_FORMAT
PKG_CPPFLAGS = -I. -I../inst/include/ @tiledb_include@ @cxx20_macos@ -DSPDLOG_FMT_EXTERNAL_HO

## We also need the TileDB library
PKG_LIBS = @cxx20_macos@ @tiledb_libs@ @tiledb_rpath@
Expand Down
4 changes: 2 additions & 2 deletions libtiledbsoma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if(APPLE)
set(CMAKE_MACOSX_RPATH ON)

# Set minimum macOS version to enable certain C++20 features
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.3)
# set(CMAKE_OSX_DEPLOYMENT_TARGET 13.3)

# Don't allow macOS .frameworks to be used for dependencies.
set(CMAKE_FIND_FRAMEWORK NEVER)
Expand Down Expand Up @@ -221,7 +221,7 @@ if(MSVC)
)
else()

set(TILEDBSOMA_COMPILE_OPTIONS -Wall -Wextra -DSPDLOG_USE_STD_FORMAT)
set(TILEDBSOMA_COMPILE_OPTIONS -Wall -Wextra -DSPDLOG_FMT_EXTERNAL_HO)

if(${TILEDBSOMA_ENABLE_WERROR})
set(TILEDBSOMA_WERROR_OPTION -Werror)
Expand Down
39 changes: 38 additions & 1 deletion libtiledbsoma/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ add_library(TILEDB_SOMA_OBJECTS OBJECT
${CMAKE_CURRENT_SOURCE_DIR}/soma/array_buffers.cc
${CMAKE_CURRENT_SOURCE_DIR}/soma/column_buffer.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/arrow_adapter.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/logger.cc
# ${CMAKE_CURRENT_SOURCE_DIR}/utils/logger.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/stats.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/util.cc
${CMAKE_CURRENT_SOURCE_DIR}/utils/version.cc
Expand Down Expand Up @@ -129,6 +129,40 @@ target_include_directories(TILEDB_SOMA_GEOMETRY_OBJECTS
${CMAKE_CURRENT_SOURCE_DIR}/vendor
)

# ###########################################################
# tiledbsoma logging library target
# ###########################################################

add_library(TILEDB_SOMA_LOGGING_OBJECTS OBJECT
${CMAKE_CURRENT_SOURCE_DIR}/utils/logger.cc
)

target_link_options(TILEDB_SOMA_LOGGING_OBJECTS
PRIVATE
${TILEDBSOMA_SANITIZER_FLAG}
)

target_compile_definitions(TILEDB_SOMA_LOGGING_OBJECTS
PRIVATE
-DTILEDB_NO_API_DEPRECATION_WARNINGS
)

target_compile_options(TILEDB_SOMA_LOGGING_OBJECTS
PRIVATE
${TILEDBSOMA_COMPILE_OPTIONS}
${TILEDBSOMA_WERROR_OPTION}
${TILEDBSOMA_SANITIZER_OPTIONS}
)

set_property(TARGET TILEDB_SOMA_LOGGING_OBJECTS PROPERTY POSITION_INDEPENDENT_CODE ON)

target_include_directories(TILEDB_SOMA_LOGGING_OBJECTS
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/vendor
$<TARGET_PROPERTY:spdlog::spdlog,INTERFACE_INCLUDE_DIRECTORIES>
)

# ###########################################################
# tiledbsoma library target
# ###########################################################
Expand All @@ -137,6 +171,7 @@ if(TILEDBSOMA_BUILD_STATIC)
add_library(tiledbsoma_static STATIC
$<TARGET_OBJECTS:TILEDB_SOMA_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_GEOMETRY_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_LOGGING_OBJECTS>
$<TARGET_OBJECTS:TILEDBSOMA_NANOARROW_OBJECT>
)
list(APPEND TILEDBSOMA_INSTALL_TARGETS tiledbsoma_static)
Expand All @@ -160,6 +195,7 @@ else()
add_library(tiledbsoma SHARED
$<TARGET_OBJECTS:TILEDB_SOMA_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_GEOMETRY_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_LOGGING_OBJECTS>
$<TARGET_OBJECTS:TILEDBSOMA_NANOARROW_OBJECT>
)
list(APPEND TILEDBSOMA_INSTALL_TARGETS tiledbsoma)
Expand Down Expand Up @@ -297,6 +333,7 @@ if(TILEDBSOMA_BUILD_CLI)
add_executable(tiledbsoma-cli
${CMAKE_CURRENT_SOURCE_DIR}/cli/cli.cc
$<TARGET_OBJECTS:TILEDB_SOMA_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_LOGGING_OBJECTS>
$<TARGET_OBJECTS:TILEDBSOMA_NANOARROW_OBJECT>
)

Expand Down
1 change: 1 addition & 0 deletions libtiledbsoma/src/reindexer/reindexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <memory>
#include <stdexcept>
#include <vector>
#include <format>

struct kh_m64_s;

Expand Down
2 changes: 0 additions & 2 deletions libtiledbsoma/src/soma/soma_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "../utils/logger.h"
#include "../utils/util.h"

#include <format>

namespace tiledbsoma {
using namespace tiledb;

Expand Down
2 changes: 2 additions & 0 deletions libtiledbsoma/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ find_package(Catch_EP REQUIRED)
add_executable(unit_soma
$<TARGET_OBJECTS:TILEDB_SOMA_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_GEOMETRY_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_LOGGING_OBJECTS>
$<TARGET_OBJECTS:TILEDBSOMA_NANOARROW_OBJECT>
common.cc
common.h
Expand Down Expand Up @@ -98,6 +99,7 @@ endif()
add_executable(unit_geometry
$<TARGET_OBJECTS:TILEDB_SOMA_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_GEOMETRY_OBJECTS>
$<TARGET_OBJECTS:TILEDB_SOMA_LOGGING_OBJECTS>
$<TARGET_OBJECTS:TILEDBSOMA_NANOARROW_OBJECT>
common.cc
common.h
Expand Down

0 comments on commit a8dd214

Please sign in to comment.